Environments are deployment targets
CI variables can be scoped to environments
Environments are auto-created by the first job using them
Your demo environment has hidden services
WebDAV endpoints emulate deployment targets
PASS
twice with scope dev
and live
SEAT_INDEX
with your seat numberdeploy
dev
using curl
See new .gitlab-ci.yml
:
git checkout origin/160_gitlab_ci/100_environments/demo1 -- '*'
Branches can be used to represent target environments:
dev
for development branchlive
for production codedev
${CI_COMMIT_REF_NAME}
live
from dev
See new .gitlab-ci.yml
:
git checkout origin/160_gitlab_ci/100_environments/demo2 -- '*'
Additonal use of environments: disposable review apps
Environments can have a stop action for disposal
Environments can have an expiration time
vscode:
when: manual
environment:
name: quick-help
url: https://quick-help.vscode.inmylab.de
on_stop: vscode-cleanup
auto_stop_in: 1h
script: echo DEPLOY
vscode-cleanup:
needs:
- vscode
environment:
name: quick-help
url: https://quick-help.vscode.inmylab.de
action: stop
when: manual
script: echo DESTROY