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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
36b9cc3f
Commit
36b9cc3f
authored
Jul 21, 2016
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add allow_failure CI documentation
parent
479814b2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
23 deletions
+58
-23
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+58
-23
No files found.
doc/ci/yaml/README.md
View file @
36b9cc3f
...
@@ -27,12 +27,14 @@ If you want a quick introduction to GitLab CI, follow our
...
@@ -27,12 +27,14 @@ If you want a quick introduction to GitLab CI, follow our
-
[
only and except
](
#only-and-except
)
-
[
only and except
](
#only-and-except
)
-
[
job variables
](
#job-variables
)
-
[
job variables
](
#job-variables
)
-
[
tags
](
#tags
)
-
[
tags
](
#tags
)
-
[
allow_failure
](
#allow_failure
)
-
[
when
](
#when
)
-
[
when
](
#when
)
-
[
Manual actions
](
#manual-actions
)
-
[
environment
](
#environment
)
-
[
environment
](
#environment
)
-
[
artifacts
](
#artifacts
)
-
[
artifacts
](
#artifacts
)
-
[
artifacts:name
](
#artifacts
name
)
-
[
artifacts:name
](
#artifacts-
name
)
-
[
artifacts:when
](
#artifacts
when
)
-
[
artifacts:when
](
#artifacts-
when
)
-
[
artifacts:expire_in
](
#artifacts
expire_in
)
-
[
artifacts:expire_in
](
#artifacts-
expire_in
)
-
[
dependencies
](
#dependencies
)
-
[
dependencies
](
#dependencies
)
-
[
before_script and after_script
](
#before_script-and-after_script
)
-
[
before_script and after_script
](
#before_script-and-after_script
)
-
[
Git Strategy
](
#git-strategy
)
-
[
Git Strategy
](
#git-strategy
)
...
@@ -40,7 +42,7 @@ If you want a quick introduction to GitLab CI, follow our
...
@@ -40,7 +42,7 @@ If you want a quick introduction to GitLab CI, follow our
-
[
Hidden jobs
](
#hidden-jobs
)
-
[
Hidden jobs
](
#hidden-jobs
)
-
[
Special YAML features
](
#special-yaml-features
)
-
[
Special YAML features
](
#special-yaml-features
)
-
[
Anchors
](
#anchors
)
-
[
Anchors
](
#anchors
)
-
[
Validate the .gitlab-ci.yml
](
#validate-the-gitlab-ciyml
)
-
[
Validate the .gitlab-ci.yml
](
#validate-the-gitlab-ci
-
yml
)
-
[
Skipping builds
](
#skipping-builds
)
-
[
Skipping builds
](
#skipping-builds
)
-
[
Examples
](
#examples
)
-
[
Examples
](
#examples
)
...
@@ -473,6 +475,39 @@ job:
...
@@ -473,6 +475,39 @@ job:
The specification above, will make sure that
`job`
is built by a Runner that
The specification above, will make sure that
`job`
is built by a Runner that
has both
`ruby`
AND
`postgres`
tags defined.
has both
`ruby`
AND
`postgres`
tags defined.
### allow_failure
`allow_failure`
is used when you want to allow a build to fail without impacting
the rest of the CI suite. Failed builds don't contribute to the commit status.
When enabled and the build fails, the pipeline will be successful/green for all
intents and purposes, but a "CI build passed with warnings" message will be
displayed on the merge request or commit or build page. This is to be used by
builds that are allowed to fail, but where failure indicates some other (manual)
steps should be taken elsewhere.
In the example below,
`job1`
and
`job2`
will run in parallel, but if
`job1`
fails, it will not stop the next stage from running, since it's marked with
`allow_failure: true`
:
```
yaml
job1
:
stage
:
test
script
:
-
execute_script_that_will_fail
allow_failure
:
true
job2
:
stage
:
test
script
:
-
execute_script_that_will_succeed
job3
:
stage
:
deploy
script
:
-
deploy_to_staging
```
### when
### when
`when`
is used to implement jobs that are run in case of failure or despite the
`when`
is used to implement jobs that are run in case of failure or despite the
...
...
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