Skip to content
GitLab
Next
Projects
Groups
Snippets
Help
Loading...
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gitlab-runner
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1,985
Issues
1,985
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
213
Merge Requests
213
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GitLab.org
gitlab-runner
Commits
d5bddb9e
Commit
d5bddb9e
authored
May 12, 2016
by
Kamil Trzciński
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make variables to work at job level in exec mode
parent
541d92c3
Pipeline
#2976033
passed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
CHANGELOG.md
CHANGELOG.md
+1
-0
commands/exec.go
commands/exec.go
+16
-1
No files found.
CHANGELOG.md
View file @
d5bddb9e
v 1.2.0 (unreleased)
-
Extend version information when using
`--version`
flag
-
Make checkout quiet
-
Make variables to work at job level in exec mode
v 1.1.0
-
Use Go 1.5
...
...
commands/exec.go
View file @
d5bddb9e
...
...
@@ -101,6 +101,21 @@ func (c *ExecCommand) buildVariables(configVariables interface{}) (buildVariable
return
}
func
(
c
*
ExecCommand
)
buildGlobalAndJobVariables
(
global
,
job
interface
{})
(
buildVariables
common
.
BuildVariables
,
err
error
)
{
buildVariables
,
err
=
c
.
buildVariables
(
global
)
if
err
!=
nil
{
return
}
jobVariables
,
err
:=
c
.
buildVariables
(
job
)
if
err
!=
nil
{
return
}
buildVariables
=
append
(
buildVariables
,
jobVariables
...
)
return
}
func
(
c
*
ExecCommand
)
buildOptions
(
config
,
jobConfig
common
.
BuildOptions
)
(
options
common
.
BuildOptions
,
err
error
)
{
options
=
make
(
common
.
BuildOptions
)
...
...
@@ -151,7 +166,7 @@ func (c *ExecCommand) parseYaml(job string, build *common.GetBuildResponse) erro
return
err
}
build
.
Variables
,
err
=
c
.
build
Variables
(
c
onfig
[
"variables"
])
build
.
Variables
,
err
=
c
.
build
GlobalAndJobVariables
(
config
[
"variables"
],
jobC
onfig
[
"variables"
])
if
err
!=
nil
{
return
err
}
...
...
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