Difference between revisions of "GitLab environments"
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
- echo "Deploy a review app" | - echo "Deploy a review app" | ||
environment: | environment: | ||
− | name: review/$CI_COMMIT_REF_SLUG | + | name: review/[[$CI_COMMIT_REF_SLUG]] |
url: https://$CI_ENVIRONMENT_SLUG.example.com | url: https://$CI_ENVIRONMENT_SLUG.example.com | ||
rules: | rules: | ||
− | - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | + | - if: [[$CI_COMMIT_BRANCH]] == [[$CI_DEFAULT_BRANCH]] |
when: never | when: never | ||
− | - if: $CI_COMMIT_BRANCH | + | - if: [[$CI_COMMIT_BRANCH]] |
− | |||
== Related == | == Related == |
Revision as of 10:59, 29 July 2022
Dynamic environment official example
deploy_review: stage: deploy script: - echo "Deploy a review app" environment: name: review/$CI_COMMIT_REF_SLUG url: https://$CI_ENVIRONMENT_SLUG.example.com rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH when: never - if: $CI_COMMIT_BRANCH
Related
See also
- GitLab: Install GitLab, Upgrade GitLab Gitlab runner (changelog),
gitlab.rb, .gitlab/, gitlab-ci.yml
,gitlab-ctl, gitlab-rake, gitlab-backup, gitlab-rails
, GitLab editions, GitLab Security Dashboards, GitLab environments, GitLab environment variables, Auto DevOps, permissions, GitLab Pages,gitlab-rails
, GitLab scheduled pipelines, GitLab logs, GitLab changelog , GitLab Release CLI, GitLab Omnibus, GitLab Advanced Search, GitLab container registry, GitLab infrastructure registry
Advertising: