summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2016-04-19 11:11:31 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2016-04-19 11:11:31 +0000
commit479f4cccf15c8ff12ccaefa6ba2e46e0aefbe2ab (patch)
tree6ebf33a7a6c21db7ec1a645d160b1e1a73541f91 /doc
parent51b777fa9c0530cd2735f207e0d96d210c08fdca (diff)
parent0ce5cc99621c84dfc61f6105d177ced4d9a4ed85 (diff)
downloadgitlab-ce-479f4cccf15c8ff12ccaefa6ba2e46e0aefbe2ab.tar.gz
Merge branch 'after-script' into 'master'
Implement after_script which allows to do cleanups as part of the build process This implements `after_script` in global context. The `after_script` will be executed always after the job, even if the job were canceled. This requires changes on Runner side that will be implemented in 1.2. cc @tmaczukin @grzesiek See merge request !3771
Diffstat (limited to 'doc')
-rw-r--r--doc/ci/yaml/README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 61475b45988..bd3ec9e4688 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -15,6 +15,7 @@ If you want a quick introduction to GitLab CI, follow our
- [.gitlab-ci.yml](#gitlab-ci-yml)
- [image and services](#image-and-services)
- [before_script](#before_script)
+ - [after_script](#after_script)
- [stages](#stages)
- [types](#types)
- [variables](#variables)
@@ -81,6 +82,9 @@ services:
before_script:
- bundle install
+after_script:
+ - rm secrets
+
stages:
- build
- test
@@ -105,6 +109,7 @@ There are a few reserved `keywords` that **cannot** be used as job names:
| stages | no | Define build stages |
| types | no | Alias for `stages` |
| before_script | no | Define commands that run before each job's script |
+| after_script | no | Define commands that run after each job's script |
| variables | no | Define build variables |
| cache | no | Define list of files that should be cached between subsequent runs |
@@ -119,6 +124,14 @@ used for time of the build. The configuration of this feature is covered in
`before_script` is used to define the command that should be run before all
builds, including deploy builds. This can be an array or a multi-line string.
+### after_script
+
+>**Note:**
+Introduced in GitLab 8.7 and GitLab Runner v1.2.
+
+`after_script` is used to define the command that will be run after for all
+builds. This has to be an array or a multi-line string.
+
### stages
`stages` is used to define build stages that can be used by jobs.