BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3878a774
Unverified
Commit
3878a774
authored
Mar 23, 2017
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix after_script processing for Runners APIv4
parent
22682f6e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
+8
-9
fix-ci-api-regression-for-after-script.yml
...ogs/unreleased/fix-ci-api-regression-for-after-script.yml
+4
-0
step.rb
lib/gitlab/ci/build/step.rb
+2
-7
builds.rb
spec/factories/ci/builds.rb
+1
-1
step_spec.rb
spec/lib/gitlab/ci/build/step_spec.rb
+1
-1
No files found.
changelogs/unreleased/fix-ci-api-regression-for-after-script.yml
0 → 100644
View file @
3878a774
---
title
:
Fix after_script processing for Runners APIv4
merge_request
:
10185
author
:
lib/gitlab/ci/build/step.rb
View file @
3878a774
...
...
@@ -7,13 +7,12 @@ module Gitlab
WHEN_ALWAYS
=
'always'
.
freeze
attr_reader
:name
attr_writer
:script
attr_accessor
:timeout
,
:when
,
:allow_failure
attr_accessor
:script
,
:timeout
,
:when
,
:allow_failure
class
<<
self
def
from_commands
(
job
)
self
.
new
(
:script
).
tap
do
|
step
|
step
.
script
=
job
.
commands
step
.
script
=
job
.
commands
.
split
(
"
\n
"
)
step
.
timeout
=
job
.
timeout
step
.
when
=
WHEN_ON_SUCCESS
end
...
...
@@ -36,10 +35,6 @@ module Gitlab
@name
=
name
@allow_failure
=
false
end
def
script
@script
.
split
(
"
\n
"
)
end
end
end
end
...
...
spec/factories/ci/builds.rb
View file @
3878a774
...
...
@@ -172,7 +172,7 @@ FactoryGirl.define do
{
image:
'ruby:2.1'
,
services:
[
'postgres'
],
after_script:
"ls
\n
date"
,
after_script:
%w(ls date)
,
artifacts:
{
name:
'artifacts_file'
,
untracked:
false
,
...
...
spec/lib/gitlab/ci/build/step_spec.rb
View file @
3878a774
...
...
@@ -25,7 +25,7 @@ describe Gitlab::Ci::Build::Step do
end
context
'when after_script is not empty'
do
let
(
:job
)
{
create
(
:ci_build
,
options:
{
after_script:
"ls -la
\n
date"
})
}
let
(
:job
)
{
create
(
:ci_build
,
options:
{
after_script:
[
'ls -la'
,
'date'
]
})
}
it
'fabricates an object'
do
expect
(
subject
.
name
).
to
eq
(
:after_script
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment