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
d4a96c57
Commit
d4a96c57
authored
May 24, 2021
by
Marcel Amirault
Committed by
Craig Norris
May 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove more references to master in CI docs
parent
7a6e4f24
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
36 deletions
+35
-36
doc/api/job_artifacts.md
doc/api/job_artifacts.md
+7
-7
doc/ci/merge_request_pipelines/pipelines_for_merged_results/merge_trains/index.md
...elines/pipelines_for_merged_results/merge_trains/index.md
+1
-2
doc/ci/multi_project_pipelines.md
doc/ci/multi_project_pipelines.md
+1
-1
doc/ci/triggers/README.md
doc/ci/triggers/README.md
+7
-7
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+19
-19
No files found.
doc/api/job_artifacts.md
View file @
d4a96c57
...
@@ -90,7 +90,7 @@ Parameters
...
@@ -90,7 +90,7 @@ Parameters
Example request using the
`PRIVATE-TOKEN`
header:
Example request using the
`PRIVATE-TOKEN`
header:
```
shell
```
shell
curl
--header
"PRIVATE-TOKEN: <your_access_token>"
"https://gitlab.example.com/api/v4/projects/1/jobs/artifacts/ma
ster
/download?job=test"
curl
--header
"PRIVATE-TOKEN: <your_access_token>"
"https://gitlab.example.com/api/v4/projects/1/jobs/artifacts/ma
in
/download?job=test"
```
```
To use this in a
[
`script` definition
](
../ci/yaml/README.md#script
)
inside
To use this in a
[
`script` definition
](
../ci/yaml/README.md#script
)
inside
...
@@ -98,25 +98,25 @@ To use this in a [`script` definition](../ci/yaml/README.md#script) inside
...
@@ -98,25 +98,25 @@ To use this in a [`script` definition](../ci/yaml/README.md#script) inside
-
The
`JOB-TOKEN`
header with the GitLab-provided
`CI_JOB_TOKEN`
variable.
-
The
`JOB-TOKEN`
header with the GitLab-provided
`CI_JOB_TOKEN`
variable.
For example, the following job downloads the artifacts of the
`test`
job
For example, the following job downloads the artifacts of the
`test`
job
of the
`ma
ster
`
branch. Note that the command is wrapped into single quotes
of the
`ma
in
`
branch. Note that the command is wrapped into single quotes
because it contains a colon (
`:`
):
because it contains a colon (
`:`
):
```
yaml
```
yaml
artifact_download
:
artifact_download
:
stage
:
test
stage
:
test
script
:
script
:
-
'
curl
--location
--output
artifacts.zip
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
"https://gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/ma
ster
/download?job=test"'
-
'
curl
--location
--output
artifacts.zip
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
"https://gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/ma
in
/download?job=test"'
```
```
-
Or the
`job_token`
attribute with the GitLab-provided
`CI_JOB_TOKEN`
variable.
-
Or the
`job_token`
attribute with the GitLab-provided
`CI_JOB_TOKEN`
variable.
For example, the following job downloads the artifacts of the
`test`
job
For example, the following job downloads the artifacts of the
`test`
job
of the
`ma
ster
`
branch:
of the
`ma
in
`
branch:
```
yaml
```
yaml
artifact_download
:
artifact_download
:
stage
:
test
stage
:
test
script
:
script
:
-
'
curl
--location
--output
artifacts.zip
"https://gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/ma
ster
/download?job=test&job_token=$CI_JOB_TOKEN"'
-
'
curl
--location
--output
artifacts.zip
"https://gitlab.example.com/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/ma
in
/download?job=test&job_token=$CI_JOB_TOKEN"'
```
```
Possible response status codes:
Possible response status codes:
...
@@ -193,7 +193,7 @@ Parameters:
...
@@ -193,7 +193,7 @@ Parameters:
Example request:
Example request:
```
shell
```
shell
curl
--location
--header
"PRIVATE-TOKEN: <your_access_token>"
"https://gitlab.example.com/api/v4/projects/1/jobs/artifacts/ma
ster
/raw/some/release/file.pdf?job=pdf"
curl
--location
--header
"PRIVATE-TOKEN: <your_access_token>"
"https://gitlab.example.com/api/v4/projects/1/jobs/artifacts/ma
in
/raw/some/release/file.pdf?job=pdf"
```
```
Possible response status codes:
Possible response status codes:
...
@@ -243,7 +243,7 @@ Example response:
...
@@ -243,7 +243,7 @@ Example response:
"download_url"
:
null
,
"download_url"
:
null
,
"id"
:
42
,
"id"
:
42
,
"name"
:
"rubocop"
,
"name"
:
"rubocop"
,
"ref"
:
"ma
ster
"
,
"ref"
:
"ma
in
"
,
"artifacts"
:
[],
"artifacts"
:
[],
"runner"
:
null
,
"runner"
:
null
,
"stage"
:
"test"
,
"stage"
:
"test"
,
...
...
doc/ci/merge_request_pipelines/pipelines_for_merged_results/merge_trains/index.md
View file @
d4a96c57
...
@@ -59,8 +59,7 @@ to run. If more merge requests are added to the train, they now include the `A`
...
@@ -59,8 +59,7 @@ to run. If more merge requests are added to the train, they now include the `A`
changes that are included in the target branch, and the
`C`
changes that are from
changes that are included in the target branch, and the
`C`
changes that are from
the merge request already in the train.
the merge request already in the train.
Read more about
Read more about
[
how merge trains keep your master green
](
https://about.gitlab.com/blog/2020/01/30/all-aboard-merge-trains/
)
.
[
how merge trains keep your master green
](
https://about.gitlab.com/blog/2020/01/30/all-aboard-merge-trains/
)
.
<i
class=
"fa fa-youtube-play youtube"
aria-hidden=
"true"
></i>
<i
class=
"fa fa-youtube-play youtube"
aria-hidden=
"true"
></i>
Watch this video for a demonstration on
[
how parallel execution
Watch this video for a demonstration on
[
how parallel execution
...
...
doc/ci/multi_project_pipelines.md
View file @
d4a96c57
...
@@ -271,7 +271,7 @@ trigger_job:
...
@@ -271,7 +271,7 @@ trigger_job:
### Mirroring status from upstream pipeline
### Mirroring status from upstream pipeline
You can mirror the pipeline status from an upstream pipeline to a bridge job by
You can mirror the pipeline status from an upstream pipeline to a bridge job by
using the
`needs:pipeline`
keyword. The latest pipeline status from
master
is
using the
`needs:pipeline`
keyword. The latest pipeline status from
the default branch
is
replicated to the bridge job.
replicated to the bridge job.
Example:
Example:
...
...
doc/ci/triggers/README.md
View file @
d4a96c57
...
@@ -140,21 +140,21 @@ By using cURL you can trigger a pipeline rerun with minimal effort, for example:
...
@@ -140,21 +140,21 @@ By using cURL you can trigger a pipeline rerun with minimal effort, for example:
```
shell
```
shell
curl
--request
POST
\
curl
--request
POST
\
--form
token
=
TOKEN
\
--form
token
=
TOKEN
\
--form
ref
=
ma
ster
\
--form
ref
=
ma
in
\
"https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"
"https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"
```
```
In this case, the pipeline for the project with ID
`9`
runs on the
`ma
ster
`
branch.
In this case, the pipeline for the project with ID
`9`
runs on the
`ma
in
`
branch.
Alternatively, you can pass the
`token`
and
`ref`
arguments in the query string:
Alternatively, you can pass the
`token`
and
`ref`
arguments in the query string:
```
shell
```
shell
curl
--request
POST
\
curl
--request
POST
\
"https://gitlab.example.com/api/v4/projects/9/trigger/pipeline?token=TOKEN&ref=ma
ster
"
"https://gitlab.example.com/api/v4/projects/9/trigger/pipeline?token=TOKEN&ref=ma
in
"
```
```
You can also benefit by using triggers in your
`.gitlab-ci.yml`
. Let's say that
You can also benefit by using triggers in your
`.gitlab-ci.yml`
. Let's say that
you have two projects, A and B, and you want to trigger a pipeline on the
`ma
ster
`
you have two projects, A and B, and you want to trigger a pipeline on the
`ma
in
`
branch of project B whenever a tag on project A is created. This is the job you
branch of project B whenever a tag on project A is created. This is the job you
need to add in project A's
`.gitlab-ci.yml`
:
need to add in project A's
`.gitlab-ci.yml`
:
...
@@ -162,7 +162,7 @@ need to add in project A's `.gitlab-ci.yml`:
...
@@ -162,7 +162,7 @@ need to add in project A's `.gitlab-ci.yml`:
trigger_pipeline
:
trigger_pipeline
:
stage
:
deploy
stage
:
deploy
script
:
script
:
-
'
curl
--request
POST
--form
token=TOKEN
--form
ref=ma
ster
"https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"'
-
'
curl
--request
POST
--form
token=TOKEN
--form
ref=ma
in
"https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"'
only
:
only
:
-
tags
-
tags
```
```
...
@@ -261,11 +261,11 @@ of all types of variables.
...
@@ -261,11 +261,11 @@ of all types of variables.
## Using cron to trigger nightly pipelines
## Using cron to trigger nightly pipelines
Whether you craft a script or just run cURL directly, you can trigger jobs
Whether you craft a script or just run cURL directly, you can trigger jobs
in conjunction with cron. The example below triggers a job on the
`ma
ster`
in conjunction with cron. The example below triggers a job on the
`ma
in`
branch
branch of project with ID
`9`
every night at
`00:30`
:
branch of project with ID
`9`
every night at
`00:30`
:
```
shell
```
shell
30 0
*
*
*
curl
--request
POST
--form
token
=
TOKEN
--form
ref
=
ma
ster
"https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"
30 0
*
*
*
curl
--request
POST
--form
token
=
TOKEN
--form
ref
=
ma
in
"https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"
```
```
This behavior can also be achieved through the GitLab UI with
This behavior can also be achieved through the GitLab UI with
...
...
doc/ci/yaml/README.md
View file @
d4a96c57
...
@@ -253,7 +253,7 @@ variables:
...
@@ -253,7 +253,7 @@ variables:
workflow
:
workflow
:
rules
:
rules
:
-
if
:
$CI_COMMIT_REF_NAME =
~ /master/
-
if
:
$CI_COMMIT_REF_NAME =
= $CI_DEFAULT_BRANCH
variables
:
variables
:
DEPLOY_VARIABLE
:
"
deploy-production"
# Override globally-defined DEPLOY_VARIABLE
DEPLOY_VARIABLE
:
"
deploy-production"
# Override globally-defined DEPLOY_VARIABLE
-
if
:
$CI_COMMIT_REF_NAME =~ /feature/
-
if
:
$CI_COMMIT_REF_NAME =~ /feature/
...
@@ -265,7 +265,7 @@ job1:
...
@@ -265,7 +265,7 @@ job1:
variables
:
variables
:
DEPLOY_VARIABLE
:
"
job1-default-deploy"
DEPLOY_VARIABLE
:
"
job1-default-deploy"
rules
:
rules
:
-
if
:
$CI_COMMIT_REF_NAME =
~ /master/
-
if
:
$CI_COMMIT_REF_NAME =
= $CI_DEFAULT_BRANCH
variables
:
# Override DEPLOY_VARIABLE defined
variables
:
# Override DEPLOY_VARIABLE defined
DEPLOY_VARIABLE
:
"
job1-deploy-production"
# at the job level.
DEPLOY_VARIABLE
:
"
job1-deploy-production"
# at the job level.
-
when
:
on_success
# Run the job in other cases
-
when
:
on_success
# Run the job in other cases
...
@@ -279,7 +279,7 @@ job2:
...
@@ -279,7 +279,7 @@ job2:
-
echo "Run another script if $IS_A_FEATURE exists"
-
echo "Run another script if $IS_A_FEATURE exists"
```
```
When the branch is
`master`
:
When the branch is
the default branch
:
-
job1's
`DEPLOY_VARIABLE`
is
`job1-deploy-production`
.
-
job1's
`DEPLOY_VARIABLE`
is
`job1-deploy-production`
.
-
job2's
`DEPLOY_VARIABLE`
is
`deploy-production`
.
-
job2's
`DEPLOY_VARIABLE`
is
`deploy-production`
.
...
@@ -559,7 +559,7 @@ You can also specify a `ref`. If you do not specify a value, the ref defaults to
...
@@ -559,7 +559,7 @@ You can also specify a `ref`. If you do not specify a value, the ref defaults to
```
yaml
```
yaml
include
:
include
:
-
project
:
'
my-group/my-project'
-
project
:
'
my-group/my-project'
ref
:
ma
ster
ref
:
ma
in
file
:
'
/templates/.gitlab-ci-template.yml'
file
:
'
/templates/.gitlab-ci-template.yml'
-
project
:
'
my-group/my-project'
-
project
:
'
my-group/my-project'
...
@@ -584,7 +584,7 @@ You can include multiple files from the same project:
...
@@ -584,7 +584,7 @@ You can include multiple files from the same project:
```
yaml
```
yaml
include
:
include
:
-
project
:
'
my-group/my-project'
-
project
:
'
my-group/my-project'
ref
:
ma
ster
ref
:
ma
in
file
:
file
:
-
'
/templates/.builds.yml'
-
'
/templates/.builds.yml'
-
'
/templates/.tests.yml'
-
'
/templates/.tests.yml'
...
@@ -598,7 +598,7 @@ authentication in the remote URL is not supported. For example:
...
@@ -598,7 +598,7 @@ authentication in the remote URL is not supported. For example:
```
yaml
```
yaml
include
:
include
:
-
remote
:
'
https://gitlab.com/example-project/-/raw/ma
ster
/.gitlab-ci.yml'
-
remote
:
'
https://gitlab.com/example-project/-/raw/ma
in
/.gitlab-ci.yml'
```
```
All
[
nested includes
](
#nested-includes
)
execute without context as a public user,
All
[
nested includes
](
#nested-includes
)
execute without context as a public user,
...
@@ -1137,7 +1137,7 @@ For example:
...
@@ -1137,7 +1137,7 @@ For example:
docker build
:
docker build
:
script
:
docker build -t my-image:$CI_COMMIT_REF_SLUG .
script
:
docker build -t my-image:$CI_COMMIT_REF_SLUG .
rules
:
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"master"'
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when
:
delayed
when
:
delayed
start_in
:
'
3
hours'
start_in
:
'
3
hours'
allow_failure
:
true
allow_failure
:
true
...
@@ -1335,7 +1335,7 @@ For example:
...
@@ -1335,7 +1335,7 @@ For example:
job
:
job
:
script
:
echo "Hello, Rules!"
script
:
echo "Hello, Rules!"
rules
:
rules
:
-
if
:
'
$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
=~
/^feature/
&&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
==
"master"
'
-
if
:
'
$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
=~
/^feature/
&&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
==
$CI_DEFAULT_BRANCH
'
when
:
always
when
:
always
-
if
:
'
$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
=~
/^feature/'
-
if
:
'
$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
=~
/^feature/'
when
:
manual
when
:
manual
...
@@ -1533,7 +1533,7 @@ the particular rule triggers the job.
...
@@ -1533,7 +1533,7 @@ the particular rule triggers the job.
job
:
job
:
script
:
echo "Hello, Rules!"
script
:
echo "Hello, Rules!"
rules
:
rules
:
-
if
:
'
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
==
"master"
'
-
if
:
'
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
==
$CI_DEFAULT_BRANCH
'
when
:
manual
when
:
manual
allow_failure
:
true
allow_failure
:
true
```
```
...
@@ -1554,7 +1554,7 @@ job:
...
@@ -1554,7 +1554,7 @@ job:
variables
:
variables
:
DEPLOY_VARIABLE
:
"
default-deploy"
DEPLOY_VARIABLE
:
"
default-deploy"
rules
:
rules
:
-
if
:
$CI_COMMIT_REF_NAME =
~ /master/
-
if
:
$CI_COMMIT_REF_NAME =
= $CI_DEFAULT_BRANCH
variables
:
# Override DEPLOY_VARIABLE defined
variables
:
# Override DEPLOY_VARIABLE defined
DEPLOY_VARIABLE
:
"
deploy-production"
# at the job level.
DEPLOY_VARIABLE
:
"
deploy-production"
# at the job level.
-
if
:
$CI_COMMIT_REF_NAME =~ /feature/
-
if
:
$CI_COMMIT_REF_NAME =~ /feature/
...
@@ -1602,7 +1602,7 @@ job1:
...
@@ -1602,7 +1602,7 @@ job1:
script
:
script
:
-
echo This rule uses parentheses.
-
echo This rule uses parentheses.
rules
:
rules
:
if
:
($CI_COMMIT_BRANCH ==
"master"
|| $CI_COMMIT_BRANCH == "develop") && $MY_VARIABLE
if
:
($CI_COMMIT_BRANCH ==
$CI_DEFAULT_BRANCH
|| $CI_COMMIT_BRANCH == "develop") && $MY_VARIABLE
```
```
WARNING:
WARNING:
...
@@ -1968,12 +1968,12 @@ build_job:
...
@@ -1968,12 +1968,12 @@ build_job:
needs
:
needs
:
-
project
:
namespace/group/project-name
-
project
:
namespace/group/project-name
job
:
build-1
job
:
build-1
ref
:
ma
ster
ref
:
ma
in
artifacts
:
true
artifacts
:
true
```
```
`build_job`
downloads the artifacts from the latest successful
`build-1`
job
`build_job`
downloads the artifacts from the latest successful
`build-1`
job
on the
`ma
ster
`
branch in the
`group/project-name`
project. If the project is in the
on the
`ma
in
`
branch in the
`group/project-name`
project. If the project is in the
same group or namespace, you can omit them from the
`project:`
keyword. For example,
same group or namespace, you can omit them from the
`project:`
keyword. For example,
`project: group/project-name`
or
`project: project-name`
.
`project: group/project-name`
or
`project: project-name`
.
...
@@ -2091,9 +2091,9 @@ error similar to:
...
@@ -2091,9 +2091,9 @@ error similar to:
In this example:
In this example:
-
When the branch is
`master`
, the
`build`
job exists in the pipeline, and the
`rspec`
-
When the branch is
the default branch
, the
`build`
job exists in the pipeline, and the
`rspec`
job waits for it to complete before starting.
job waits for it to complete before starting.
-
When the branch is not
`master`
, the
`build`
job does not exist in the pipeline.
-
When the branch is not
the default branch
, the
`build`
job does not exist in the pipeline.
The
`rspec`
job runs immediately (similar to
`needs: []`
) because its
`needs`
The
`rspec`
job runs immediately (similar to
`needs: []`
) because its
`needs`
relationship to the
`build`
job is optional.
relationship to the
`build`
job is optional.
...
@@ -2101,7 +2101,7 @@ In this example:
...
@@ -2101,7 +2101,7 @@ In this example:
build
:
build
:
stage
:
build
stage
:
build
rules
:
rules
:
-
if
:
$CI_COMMIT_
REF_NAME == "master"
-
if
:
$CI_COMMIT_
BRANCH == $CI_DEFAULT_BRANCH
rspec
:
rspec
:
stage
:
test
stage
:
test
...
@@ -2356,7 +2356,7 @@ To protect a manual job:
...
@@ -2356,7 +2356,7 @@ To protect a manual job:
url
:
https://example.com
url
:
https://example.com
when
:
manual
when
:
manual
only
:
only
:
-
ma
ster
-
ma
in
```
```
1.
In the
[
protected environments settings
](
../environments/protected_environments.md#protecting-environments
)
,
1.
In the
[
protected environments settings
](
../environments/protected_environments.md#protecting-environments
)
,
...
@@ -4065,7 +4065,7 @@ child-pipeline:
...
@@ -4065,7 +4065,7 @@ child-pipeline:
trigger
:
trigger
:
include
:
include
:
-
project
:
'
my-group/my-pipeline-library'
-
project
:
'
my-group/my-pipeline-library'
ref
:
'
ma
ster
'
ref
:
'
ma
in
'
file
:
'
/path/to/child-pipeline.yml'
file
:
'
/path/to/child-pipeline.yml'
```
```
...
@@ -4664,7 +4664,7 @@ pages:
...
@@ -4664,7 +4664,7 @@ pages:
paths
:
paths
:
-
public
-
public
only
:
only
:
-
ma
ster
-
ma
in
```
```
View the
[
GitLab Pages user documentation
](
../../user/project/pages/index.md
)
.
View the
[
GitLab Pages user documentation
](
../../user/project/pages/index.md
)
.
...
...
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