# .gitlab-ci.yml reference 已讀不回 追蹤 [.gitlab-ci.yml reference | Use CI/CD to build your application | Use GitLab | GitLab Docs](https://docs.gitlab.com/ee/ci/yaml/) 的數位內容閱讀進度 <https://hackmd.io/@brlin/orncb-gitlab-ci-yaml-reference> * [x] (preface) * [ ] [Keywords](https://docs.gitlab.com/ee/ci/yaml/index.html#keywords) * [x] Global keywords * [x] job keywords * [ ] [Global keywords](https://docs.gitlab.com/ee/ci/yaml/index.html#global-keywords) * [ ] [default](https://docs.gitlab.com/ee/ci/yaml/index.html#default) * [ ] [include](https://docs.gitlab.com/ee/ci/yaml/index.html#include) * [ ] [include\:local](https://docs.gitlab.com/ee/ci/yaml/index.html#includelocal) * [ ] [include\:project](https://docs.gitlab.com/ee/ci/yaml/index.html#includeproject) * [ ] [include\:remote](https://docs.gitlab.com/ee/ci/yaml/index.html#includeremote) * [ ] [include\:template](https://docs.gitlab.com/ee/ci/yaml/index.html#includetemplate) * [ ] [stages](https://docs.gitlab.com/ee/ci/yaml/index.html#stages) * [ ] [workflow](https://docs.gitlab.com/ee/ci/yaml/index.html#workflow) :question: * [ ] [workflow\:name](https://docs.gitlab.com/ee/ci/yaml/index.html#workflowname) * [ ] [workflow\:rules](https://docs.gitlab.com/ee/ci/yaml/index.html#workflowrules) * [ ] [workflow\:rules\:variables](https://docs.gitlab.com/ee/ci/yaml/index.html#workflowrulesvariables) * [ ] [Job keywords](https://docs.gitlab.com/ee/ci/yaml/index.html#job-keywords) * [ ] [after\_script](https://docs.gitlab.com/ee/ci/yaml/index.html#after\_script) * [ ] [allow\_failure](https://docs.gitlab.com/ee/ci/yaml/index.html#allow\_failure) * [ ] [allow\_failure\:exit\_codes](https://docs.gitlab.com/ee/ci/yaml/index.html#allow\_failureexit\_codes) * [ ] [artifacts](https://docs.gitlab.com/ee/ci/yaml/index.html#artifacts) * [x] (introduction) * [x] (job artifacts definitions) * [x] (how job artifacts are delivered) * [x] (whether the job artifacts are downloadable) * [x] (later stage behavior regarding job artifacts) * [x] (control artifact download behavior) * [x] (when using the `needs` keyword) * [x] (whether the job artifacts is collected) * [x] (timing of artifacts are restored) * [x] (read more) * [x] [artifacts\:paths](https://docs.gitlab.com/ee/ci/yaml/index.html#artifactspaths :exclamation: * [x] (limitation) * [x] Keyword type * [x] Possible inputs * [x] (array of file paths) * [x] (glob patterns) * [x] Example of `artifacts:paths` * [x] Additional details * [x] Related topics * [x] [artifacts\:exclude](https://docs.gitlab.com/ee/ci/yaml/index.html#artifactsexclude) :exclamation: * [x] (Version history) * [x] (introduction) :exclamation: * [x] Keyword type * [x] Possible inputs :exclamation: * [x] Example of `artifacts:exclude` * [x] Additional details * [x] Related topics * [ ] [artifacts\:expire\_in](https://docs.gitlab.com/ee/ci/yaml/index.html#artifactsexpire\_in) * [ ] [artifacts\:expose\_as](https://docs.gitlab.com/ee/ci/yaml/index.html#artifactsexpose\_as) * [ ] [artifacts\:name](https://docs.gitlab.com/ee/ci/yaml/index.html#artifactsname) * [ ] [artifacts\:public](https://docs.gitlab.com/ee/ci/yaml/index.html#artifactspublic) * [ ] [artifacts\:reports](https://docs.gitlab.com/ee/ci/yaml/index.html#artifactsreports) * [ ] [artifacts\:untracked](https://docs.gitlab.com/ee/ci/yaml/index.html#artifactsuntracked) * [ ] [artifacts\:when](https://docs.gitlab.com/ee/ci/yaml/index.html#artifactswhen) * [ ] [before\_script](https://docs.gitlab.com/ee/ci/yaml/index.html#before\_script) * [ ] [cache](https://docs.gitlab.com/ee/ci/yaml/index.html#cache) * [x] (note: behavior change: caches no longer shared between protected and unprotected branches) * [x] (introduction) * [ ] (limitations) :question: local working copies? * [x] (characteristics) * [ ] (disable caching for specific jobs) :question: * [x] (more information) * [ ] [cache\:paths](https://docs.gitlab.com/ee/ci/yaml/index.html#cachepaths) * [ ] [cache\:key](https://docs.gitlab.com/ee/ci/yaml/index.html#cachekey) * [x] (introduction) * [x] (the default key) * [x] (prerequisites) * [x] (keyword type) * [x] (possible inputs) * [x] (example config) * [x] (additional details) :exclamation: * [ ] (related topics) * [ ] [cache\:key\:files](https://docs.gitlab.com/ee/ci/yaml/index.html#cachekeyfiles) * [ ] [cache\:key\:prefix](https://docs.gitlab.com/ee/ci/yaml/index.html#cachekeyprefix) * [ ] [cache\:untracked](https://docs.gitlab.com/ee/ci/yaml/index.html#cacheuntracked) * [ ] [cache\:unprotect](https://docs.gitlab.com/ee/ci/yaml/index.html#cacheunprotect) * [ ] [cache\:when](https://docs.gitlab.com/ee/ci/yaml/index.html#cachewhen) * [ ] [cache\:policy](https://docs.gitlab.com/ee/ci/yaml/index.html#cachepolicy) * [ ] [cache\:fallback\_keys](https://docs.gitlab.com/ee/ci/yaml/index.html#cachefallback\_keys) * [ ] [coverage](https://docs.gitlab.com/ee/ci/yaml/index.html#coverage) * [ ] [dast\_configuration Ultimate All offerings ](https://docs.gitlab.com/ee/ci/yaml/index.html#dast\_configuration) * [ ] [dependencies](https://docs.gitlab.com/ee/ci/yaml/index.html#dependencies) * [ ] [environment](https://docs.gitlab.com/ee/ci/yaml/index.html#environment) * [ ] [environment\:name](https://docs.gitlab.com/ee/ci/yaml/index.html#environmentname) * [ ] [environment\:url](https://docs.gitlab.com/ee/ci/yaml/index.html#environmenturl) * [ ] [environment\:on\_stop](https://docs.gitlab.com/ee/ci/yaml/index.html#environmenton\_stop) * [ ] [environment\:action](https://docs.gitlab.com/ee/ci/yaml/index.html#environmentaction) * [ ] [environment\:auto\_stop\_in](https://docs.gitlab.com/ee/ci/yaml/index.html#environmentauto\_stop\_in) * [ ] [environment\:kubernetes](https://docs.gitlab.com/ee/ci/yaml/index.html#environmentkubernetes) * [ ] [environment\:deployment\_tier](https://docs.gitlab.com/ee/ci/yaml/index.html#environmentdeployment\_tier) * [ ] [Dynamic environments](https://docs.gitlab.com/ee/ci/yaml/index.html#dynamic-environments) * [ ] [extends](https://docs.gitlab.com/ee/ci/yaml/index.html#extends) * [ ] [hooks](https://docs.gitlab.com/ee/ci/yaml/index.html#hooks) * [ ] [hooks\:pre\_get\_sources\_script](https://docs.gitlab.com/ee/ci/yaml/index.html#hookspre\_get\_sources\_script) * [ ] [id\_tokens](https://docs.gitlab.com/ee/ci/yaml/index.html#id\_tokens) * [x] [image](https://docs.gitlab.com/ee/ci/yaml/index.html#image) :exclamation: :question: optional registry path * [x] [image\:name](https://docs.gitlab.com/ee/ci/yaml/index.html#imagename) * [ ] [image\:entrypoint](https://docs.gitlab.com/ee/ci/yaml/index.html#imageentrypoint) * [ ] [image\:pull\_policy](https://docs.gitlab.com/ee/ci/yaml/index.html#imagepull\_policy) * [ ] [inherit](https://docs.gitlab.com/ee/ci/yaml/index.html#inherit) * [ ] [inherit\:default](https://docs.gitlab.com/ee/ci/yaml/index.html#inheritdefault) * [ ] [inherit\:variables](https://docs.gitlab.com/ee/ci/yaml/index.html#inheritvariables) * [ ] [interruptible](https://docs.gitlab.com/ee/ci/yaml/index.html#interruptible) * [ ] [needs](https://docs.gitlab.com/ee/ci/yaml/index.html#needs) * [ ] [needs\:artifacts](https://docs.gitlab.com/ee/ci/yaml/index.html#needsartifacts) * [ ] [needs\:project Premium All offerings ](https://docs.gitlab.com/ee/ci/yaml/index.html#needsproject) * [ ] [needs\:pipeline\:job](https://docs.gitlab.com/ee/ci/yaml/index.html#needspipelinejob) * [ ] [needs\:optional](https://docs.gitlab.com/ee/ci/yaml/index.html#needsoptional) * [ ] [needs\:pipeline](https://docs.gitlab.com/ee/ci/yaml/index.html#needspipeline) * [ ] [needs\:parallel\:matrix](https://docs.gitlab.com/ee/ci/yaml/index.html#needsparallelmatrix) * [ ] [only / except](https://docs.gitlab.com/ee/ci/yaml/index.html#only--except) * [ ] [only\:refs / except\:refs](https://docs.gitlab.com/ee/ci/yaml/index.html#onlyrefs--exceptrefs) * [ ] [only\:variables / except\:variables](https://docs.gitlab.com/ee/ci/yaml/index.html#onlyvariables--exceptvariables) * [ ] [only\:changes / except\:changes](https://docs.gitlab.com/ee/ci/yaml/index.html#onlychanges--exceptchanges) * [ ] [only\:kubernetes / except\:kubernetes](https://docs.gitlab.com/ee/ci/yaml/index.html#onlykubernetes--exceptkubernetes) * [ ] [pages](https://docs.gitlab.com/ee/ci/yaml/index.html#pages) * [ ] [pages\:publish](https://docs.gitlab.com/ee/ci/yaml/index.html#pagespublish) * [ ] [parallel](https://docs.gitlab.com/ee/ci/yaml/index.html#parallel) * [ ] [parallel\:matrix](https://docs.gitlab.com/ee/ci/yaml/index.html#parallelmatrix) * [ ] [release](https://docs.gitlab.com/ee/ci/yaml/index.html#release) * [ ] [release\:tag\_name](https://docs.gitlab.com/ee/ci/yaml/index.html#releasetag\_name) * [ ] [release\:tag\_message](https://docs.gitlab.com/ee/ci/yaml/index.html#releasetag\_message) * [ ] [release\:name](https://docs.gitlab.com/ee/ci/yaml/index.html#releasename) * [ ] [release\:description](https://docs.gitlab.com/ee/ci/yaml/index.html#releasedescription) * [ ] [release\:ref](https://docs.gitlab.com/ee/ci/yaml/index.html#releaseref) * [ ] [release\:milestones](https://docs.gitlab.com/ee/ci/yaml/index.html#releasemilestones) * [ ] [release\:released\_at](https://docs.gitlab.com/ee/ci/yaml/index.html#releasereleased\_at) * [ ] [release\:assets\:links](https://docs.gitlab.com/ee/ci/yaml/index.html#releaseassetslinks) * [ ] [resource\_group](https://docs.gitlab.com/ee/ci/yaml/index.html#resource\_group) * [ ] [retry](https://docs.gitlab.com/ee/ci/yaml/index.html#retry) * [ ] [retry\:when](https://docs.gitlab.com/ee/ci/yaml/index.html#retrywhen) * [ ] [rules](https://docs.gitlab.com/ee/ci/yaml/index.html#rules) * [x] (introduction) * [x] (the evaluation behavior of the rules) * [x] (dotenv variables don't apply) * [x] (deprecation of `only`/`except` keywords) * [x] (what keywords are accepted in `rules`) * [x] (complex rules: combine multiple keywords together) * [x] (when the job is not added to the pipeline) * [x] (reusing `rules` configuration in different jobs) :exclamation: * [ ] [rules\:if](https://docs.gitlab.com/ee/ci/yaml/index.html#rulesif) * [x] (introduction) * [x] (the evaluation) :exclamation: * [x] Keyword type * [x] Possible inputs * [x] Example * [ ] [rules\:changes](https://docs.gitlab.com/ee/ci/yaml/index.html#ruleschanges) * [ ] [rules\:changes\:paths](https://docs.gitlab.com/ee/ci/yaml/index.html#ruleschangespaths) * [ ] [rules\:changes\:compare\_to](https://docs.gitlab.com/ee/ci/yaml/index.html#ruleschangescompare\_to) * [ ] [rules\:exists](https://docs.gitlab.com/ee/ci/yaml/index.html#rulesexists) * [ ] [rules\:allow\_failure](https://docs.gitlab.com/ee/ci/yaml/index.html#rulesallow\_failure) * [ ] [rules\:needs](https://docs.gitlab.com/ee/ci/yaml/index.html#rulesneeds) * [ ] [rules\:variables](https://docs.gitlab.com/ee/ci/yaml/index.html#rulesvariables) * [ ] [script](https://docs.gitlab.com/ee/ci/yaml/index.html#script) * [ ] [secrets Premium All offerings ](https://docs.gitlab.com/ee/ci/yaml/index.html#secrets) * [ ] [secrets\:vault](https://docs.gitlab.com/ee/ci/yaml/index.html#secretsvault) * [ ] [secrets\:azure\_key\_vault](https://docs.gitlab.com/ee/ci/yaml/index.html#secretsazure\_key\_vault) * [ ] [secrets\:file](https://docs.gitlab.com/ee/ci/yaml/index.html#secretsfile) * [ ] [secrets\:token](https://docs.gitlab.com/ee/ci/yaml/index.html#secretstoken) * [ ] [services](https://docs.gitlab.com/ee/ci/yaml/index.html#services) * [ ] [service\:pull\_policy](https://docs.gitlab.com/ee/ci/yaml/index.html#servicepull\_policy) * [ ] [stage](https://docs.gitlab.com/ee/ci/yaml/index.html#stage) * [ ] [stage: .pre](https://docs.gitlab.com/ee/ci/yaml/index.html#stage-pre) * [ ] [stage: .post](https://docs.gitlab.com/ee/ci/yaml/index.html#stage-post) * [ ] [tags](https://docs.gitlab.com/ee/ci/yaml/index.html#tags) * [ ] [timeout](https://docs.gitlab.com/ee/ci/yaml/index.html#timeout) * [ ] [trigger](https://docs.gitlab.com/ee/ci/yaml/index.html#trigger) * [ ] [trigger\:include](https://docs.gitlab.com/ee/ci/yaml/index.html#triggerinclude) * [ ] [trigger\:project](https://docs.gitlab.com/ee/ci/yaml/index.html#triggerproject) * [ ] [trigger\:strategy](https://docs.gitlab.com/ee/ci/yaml/index.html#triggerstrategy) * [ ] [trigger\:forward](https://docs.gitlab.com/ee/ci/yaml/index.html#triggerforward) * [ ] [variables](https://docs.gitlab.com/ee/ci/yaml/index.html#variables) * [ ] [variables\:description](https://docs.gitlab.com/ee/ci/yaml/index.html#variablesdescription) * [ ] [variables\:value](https://docs.gitlab.com/ee/ci/yaml/index.html#variablesvalue) * [ ] [variables\:options](https://docs.gitlab.com/ee/ci/yaml/index.html#variablesoptions) * [ ] [variables\:expand](https://docs.gitlab.com/ee/ci/yaml/index.html#variablesexpand) * [ ] [when](https://docs.gitlab.com/ee/ci/yaml/index.html#when) * [ ] [Deprecated keywords](https://docs.gitlab.com/ee/ci/yaml/index.html#deprecated-keywords) * [ ] [Globally-defined image, services, cache, before\_script, after\_script](https://docs.gitlab.com/ee/ci/yaml/index.html#globally-defined-image-services-cache-before\_script-after\_script) --- 本文件為[《已讀不回》專案](https://hackmd.io/@orncb/home)的衍生作品,以[《Creative Commons 姓名標示-相同方式分享》授權條款第 4.0 國際版](https://creativecommons.org/licenses/by-sa/4.0/deed.zh_TW)或其任意更近期版本釋出供大眾於授權範圍內自由使用