Difference between revisions of "GitLab CI include:"

From wikieduonline
Jump to navigation Jump to search
 
(14 intermediate revisions by 3 users not shown)
Line 2: Line 2:
  
  
Example:  
+
== Examples ==
 +
 
 +
include:
 +
  - remote: 'https://gitlab.com/awesome-project/raw/main/.before-script-template.yml'
 +
  - local: '/templates/.after-script-template.yml'
 +
  - template: Auto-DevOps.gitlab-ci.yml
 +
 
 
  include:
 
  include:
   - [[local:]] .gitlab/variables.yml
+
   - [[local:]] [[.gitlab/]]variables.yml
 
   - local: .gitlab/build.yaml
 
   - local: .gitlab/build.yaml
 
   - local: .gitlab/deploy.yaml
 
   - local: .gitlab/deploy.yaml
  
 +
include: (introduced in [[GitLab 13.6]])
 +
  - [[GitLab CI project:|project]]: 'your-org/your-project'
 +
    file: 'path/to/your/file/to/include'
 +
 +
include:
 +
  - project: 'your-org/your-project'
 +
    [[ref:]] my-branch-name
 +
    file: 'path/to/your/file/to/include'
 +
 +
== Related ==
 +
* [[GitLab templates]]
 +
* [[Branch]]
 +
* <code>[[GitLab CI extends:|extends:]]</code>
  
 +
== News ==
 +
* Conditional includes https://about.gitlab.com/releases/2021/11/22/gitlab-14-5-released/#conditional-includes-with-exists-keyword
  
 
== See also ==
 
== See also ==

Latest revision as of 15:03, 13 December 2022


Examples[edit]

include:
 - remote: 'https://gitlab.com/awesome-project/raw/main/.before-script-template.yml'
 - local: '/templates/.after-script-template.yml'
 - template: Auto-DevOps.gitlab-ci.yml
include:
  - local: .gitlab/variables.yml
  - local: .gitlab/build.yaml
  - local: .gitlab/deploy.yaml
include: (introduced in GitLab 13.6)
  - project: 'your-org/your-project'
    file: 'path/to/your/file/to/include'
include:
  - project: 'your-org/your-project'
    ref: my-branch-name
    file: 'path/to/your/file/to/include'

Related[edit]

News[edit]

See also[edit]

Advertising: