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
eb05d475
Commit
eb05d475
authored
Jun 04, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wording in spec. Add PIPELINE_IID in examples of debugged variables in documants.
parent
12b41a19
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
doc/ci/variables/README.md
doc/ci/variables/README.md
+3
-0
spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb
spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb
+4
-4
No files found.
doc/ci/variables/README.md
View file @
eb05d475
...
@@ -353,6 +353,8 @@ Running on runner-8a2f473d-project-1796893-concurrent-0 via runner-8a2f473d-mach
...
@@ -353,6 +353,8 @@ Running on runner-8a2f473d-project-1796893-concurrent-0 via runner-8a2f473d-mach
++
CI_PROJECT_URL
=
https://example.com/gitlab-examples/ci-debug-trace
++
CI_PROJECT_URL
=
https://example.com/gitlab-examples/ci-debug-trace
++
export
CI_PIPELINE_ID
=
52666
++
export
CI_PIPELINE_ID
=
52666
++
CI_PIPELINE_ID
=
52666
++
CI_PIPELINE_ID
=
52666
++
export
CI_PIPELINE_IID
=
123
++
CI_PIPELINE_IID
=
123
++
export
CI_RUNNER_ID
=
1337
++
export
CI_RUNNER_ID
=
1337
++
CI_RUNNER_ID
=
1337
++
CI_RUNNER_ID
=
1337
++
export
CI_RUNNER_DESCRIPTION
=
shared-runners-manager-1.example.com
++
export
CI_RUNNER_DESCRIPTION
=
shared-runners-manager-1.example.com
...
@@ -440,6 +442,7 @@ export CI_JOB_MANUAL="true"
...
@@ -440,6 +442,7 @@ export CI_JOB_MANUAL="true"
export
CI_JOB_TRIGGERED
=
"true"
export
CI_JOB_TRIGGERED
=
"true"
export
CI_JOB_TOKEN
=
"abcde-1234ABCD5678ef"
export
CI_JOB_TOKEN
=
"abcde-1234ABCD5678ef"
export
CI_PIPELINE_ID
=
"1000"
export
CI_PIPELINE_ID
=
"1000"
export
CI_PIPELINE_IID
=
"10"
export
CI_PROJECT_ID
=
"34"
export
CI_PROJECT_ID
=
"34"
export
CI_PROJECT_DIR
=
"/builds/gitlab-org/gitlab-ce"
export
CI_PROJECT_DIR
=
"/builds/gitlab-org/gitlab-ce"
export
CI_PROJECT_NAME
=
"gitlab-ce"
export
CI_PROJECT_NAME
=
"gitlab-ce"
...
...
spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb
View file @
eb05d475
...
@@ -143,7 +143,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
...
@@ -143,7 +143,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
it
'wastes pipeline iid'
do
it
'wastes pipeline iid'
do
expect
{
step
.
perform!
}.
to
raise_error
expect
{
step
.
perform!
}.
to
raise_error
expect
(
InternalId
.
ci_pipelines
.
where
(
project_id:
project
.
id
).
exists?
).
to
be_truthy
expect
(
InternalId
.
ci_pipelines
.
where
(
project_id:
project
.
id
).
last
.
last_value
).
to
be
>
0
end
end
end
end
end
end
...
@@ -157,7 +157,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
...
@@ -157,7 +157,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
end
end
context
'when variables policy is specified'
do
context
'when variables policy is specified'
do
shared_examples_for
'
populates pipeline according to used policies
'
do
shared_examples_for
'
a correct pipeline
'
do
it
'populates pipeline according to used policies'
do
it
'populates pipeline according to used policies'
do
step
.
perform!
step
.
perform!
...
@@ -177,7 +177,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
...
@@ -177,7 +177,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
build
(
:ci_pipeline
,
ref:
'master'
,
config:
config
)
build
(
:ci_pipeline
,
ref:
'master'
,
config:
config
)
end
end
it_behaves_like
'
populates pipeline according to used policies
'
it_behaves_like
'
a correct pipeline
'
context
'when variables expression is specified'
do
context
'when variables expression is specified'
do
context
'when pipeline iid is the subject'
do
context
'when pipeline iid is the subject'
do
...
@@ -186,7 +186,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
...
@@ -186,7 +186,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
prod:
{
script:
'cap prod'
,
only:
{
variables:
[
"$CI_PIPELINE_IID == '1000'"
]
}
}
}
prod:
{
script:
'cap prod'
,
only:
{
variables:
[
"$CI_PIPELINE_IID == '1000'"
]
}
}
}
end
end
it_behaves_like
'
populates pipeline according to used policies
'
it_behaves_like
'
a correct pipeline
'
end
end
end
end
end
end
...
...
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