Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4967fe94
Commit
4967fe94
authored
5 years ago
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not assigne unused attributes to CI/CD builds
parent
3a8b9aad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
34 deletions
+1
-34
lib/gitlab/ci/yaml_processor.rb
lib/gitlab/ci/yaml_processor.rb
+1
-1
spec/lib/gitlab/ci/yaml_processor_spec.rb
spec/lib/gitlab/ci/yaml_processor_spec.rb
+0
-33
No files found.
lib/gitlab/ci/yaml_processor.rb
View file @
4967fe94
...
@@ -55,7 +55,7 @@ module Gitlab
...
@@ -55,7 +55,7 @@ module Gitlab
instance:
job
[
:instance
],
instance:
job
[
:instance
],
start_in:
job
[
:start_in
],
start_in:
job
[
:start_in
],
trigger:
job
[
:trigger
]
trigger:
job
[
:trigger
]
}.
compact
}
}.
compact
}
.
compact
end
end
def
stage_builds_attributes
(
stage
)
def
stage_builds_attributes
(
stage
)
...
...
This diff is collapsed.
Click to expand it.
spec/lib/gitlab/ci/yaml_processor_spec.rb
View file @
4967fe94
...
@@ -21,15 +21,12 @@ module Gitlab
...
@@ -21,15 +21,12 @@ module Gitlab
stage:
"test"
,
stage:
"test"
,
stage_idx:
1
,
stage_idx:
1
,
name:
"rspec"
,
name:
"rspec"
,
coverage_regex:
nil
,
tag_list:
[],
options:
{
options:
{
before_script:
[
"pwd"
],
before_script:
[
"pwd"
],
script:
[
"rspec"
]
script:
[
"rspec"
]
},
},
allow_failure:
false
,
allow_failure:
false
,
when:
"on_success"
,
when:
"on_success"
,
environment:
nil
,
yaml_variables:
[]
yaml_variables:
[]
})
})
end
end
...
@@ -154,12 +151,9 @@ module Gitlab
...
@@ -154,12 +151,9 @@ module Gitlab
builds:
builds:
[{
stage_idx:
1
,
[{
stage_idx:
1
,
stage:
"test"
,
stage:
"test"
,
tag_list:
[],
name:
"rspec"
,
name:
"rspec"
,
allow_failure:
false
,
allow_failure:
false
,
when:
"on_success"
,
when:
"on_success"
,
environment:
nil
,
coverage_regex:
nil
,
yaml_variables:
[],
yaml_variables:
[],
options:
{
script:
[
"rspec"
]
},
options:
{
script:
[
"rspec"
]
},
only:
{
refs:
[
"branches"
]
},
only:
{
refs:
[
"branches"
]
},
...
@@ -169,12 +163,9 @@ module Gitlab
...
@@ -169,12 +163,9 @@ module Gitlab
builds:
builds:
[{
stage_idx:
2
,
[{
stage_idx:
2
,
stage:
"deploy"
,
stage:
"deploy"
,
tag_list:
[],
name:
"prod"
,
name:
"prod"
,
allow_failure:
false
,
allow_failure:
false
,
when:
"on_success"
,
when:
"on_success"
,
environment:
nil
,
coverage_regex:
nil
,
yaml_variables:
[],
yaml_variables:
[],
options:
{
script:
[
"cap prod"
]
},
options:
{
script:
[
"cap prod"
]
},
only:
{
refs:
[
"tags"
]
},
only:
{
refs:
[
"tags"
]
},
...
@@ -344,8 +335,6 @@ module Gitlab
...
@@ -344,8 +335,6 @@ module Gitlab
stage:
"test"
,
stage:
"test"
,
stage_idx:
1
,
stage_idx:
1
,
name:
"rspec"
,
name:
"rspec"
,
coverage_regex:
nil
,
tag_list:
[],
options:
{
options:
{
before_script:
[
"pwd"
],
before_script:
[
"pwd"
],
script:
[
"rspec"
],
script:
[
"rspec"
],
...
@@ -356,7 +345,6 @@ module Gitlab
...
@@ -356,7 +345,6 @@ module Gitlab
},
},
allow_failure:
false
,
allow_failure:
false
,
when:
"on_success"
,
when:
"on_success"
,
environment:
nil
,
yaml_variables:
[]
yaml_variables:
[]
})
})
end
end
...
@@ -378,8 +366,6 @@ module Gitlab
...
@@ -378,8 +366,6 @@ module Gitlab
stage:
"test"
,
stage:
"test"
,
stage_idx:
1
,
stage_idx:
1
,
name:
"rspec"
,
name:
"rspec"
,
coverage_regex:
nil
,
tag_list:
[],
options:
{
options:
{
before_script:
[
"pwd"
],
before_script:
[
"pwd"
],
script:
[
"rspec"
],
script:
[
"rspec"
],
...
@@ -390,7 +376,6 @@ module Gitlab
...
@@ -390,7 +376,6 @@ module Gitlab
},
},
allow_failure:
false
,
allow_failure:
false
,
when:
"on_success"
,
when:
"on_success"
,
environment:
nil
,
yaml_variables:
[]
yaml_variables:
[]
})
})
end
end
...
@@ -410,8 +395,6 @@ module Gitlab
...
@@ -410,8 +395,6 @@ module Gitlab
stage:
"test"
,
stage:
"test"
,
stage_idx:
1
,
stage_idx:
1
,
name:
"rspec"
,
name:
"rspec"
,
coverage_regex:
nil
,
tag_list:
[],
options:
{
options:
{
before_script:
[
"pwd"
],
before_script:
[
"pwd"
],
script:
[
"rspec"
],
script:
[
"rspec"
],
...
@@ -420,7 +403,6 @@ module Gitlab
...
@@ -420,7 +403,6 @@ module Gitlab
},
},
allow_failure:
false
,
allow_failure:
false
,
when:
"on_success"
,
when:
"on_success"
,
environment:
nil
,
yaml_variables:
[]
yaml_variables:
[]
})
})
end
end
...
@@ -438,8 +420,6 @@ module Gitlab
...
@@ -438,8 +420,6 @@ module Gitlab
stage:
"test"
,
stage:
"test"
,
stage_idx:
1
,
stage_idx:
1
,
name:
"rspec"
,
name:
"rspec"
,
coverage_regex:
nil
,
tag_list:
[],
options:
{
options:
{
before_script:
[
"pwd"
],
before_script:
[
"pwd"
],
script:
[
"rspec"
],
script:
[
"rspec"
],
...
@@ -448,7 +428,6 @@ module Gitlab
...
@@ -448,7 +428,6 @@ module Gitlab
},
},
allow_failure:
false
,
allow_failure:
false
,
when:
"on_success"
,
when:
"on_success"
,
environment:
nil
,
yaml_variables:
[]
yaml_variables:
[]
})
})
end
end
...
@@ -763,8 +742,6 @@ module Gitlab
...
@@ -763,8 +742,6 @@ module Gitlab
stage:
"test"
,
stage:
"test"
,
stage_idx:
1
,
stage_idx:
1
,
name:
"rspec"
,
name:
"rspec"
,
coverage_regex:
nil
,
tag_list:
[],
options:
{
options:
{
before_script:
[
"pwd"
],
before_script:
[
"pwd"
],
script:
[
"rspec"
],
script:
[
"rspec"
],
...
@@ -779,7 +756,6 @@ module Gitlab
...
@@ -779,7 +756,6 @@ module Gitlab
},
},
when:
"on_success"
,
when:
"on_success"
,
allow_failure:
false
,
allow_failure:
false
,
environment:
nil
,
yaml_variables:
[]
yaml_variables:
[]
})
})
end
end
...
@@ -976,14 +952,11 @@ module Gitlab
...
@@ -976,14 +952,11 @@ module Gitlab
stage:
"test"
,
stage:
"test"
,
stage_idx:
1
,
stage_idx:
1
,
name:
"normal_job"
,
name:
"normal_job"
,
coverage_regex:
nil
,
tag_list:
[],
options:
{
options:
{
script:
[
"test"
]
script:
[
"test"
]
},
},
when:
"on_success"
,
when:
"on_success"
,
allow_failure:
false
,
allow_failure:
false
,
environment:
nil
,
yaml_variables:
[]
yaml_variables:
[]
})
})
end
end
...
@@ -1023,28 +996,22 @@ module Gitlab
...
@@ -1023,28 +996,22 @@ module Gitlab
stage:
"build"
,
stage:
"build"
,
stage_idx:
0
,
stage_idx:
0
,
name:
"job1"
,
name:
"job1"
,
coverage_regex:
nil
,
tag_list:
[],
options:
{
options:
{
script:
[
"execute-script-for-job"
]
script:
[
"execute-script-for-job"
]
},
},
when:
"on_success"
,
when:
"on_success"
,
allow_failure:
false
,
allow_failure:
false
,
environment:
nil
,
yaml_variables:
[]
yaml_variables:
[]
})
})
expect
(
subject
.
second
).
to
eq
({
expect
(
subject
.
second
).
to
eq
({
stage:
"build"
,
stage:
"build"
,
stage_idx:
0
,
stage_idx:
0
,
name:
"job2"
,
name:
"job2"
,
coverage_regex:
nil
,
tag_list:
[],
options:
{
options:
{
script:
[
"execute-script-for-job"
]
script:
[
"execute-script-for-job"
]
},
},
when:
"on_success"
,
when:
"on_success"
,
allow_failure:
false
,
allow_failure:
false
,
environment:
nil
,
yaml_variables:
[]
yaml_variables:
[]
})
})
end
end
...
...
This diff is collapsed.
Click to expand it.
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