Select Git revision
.gitlab-ci.yml
-
uıןǝnbsɐW ןǝɐʞɔıW authoreduıןǝnbsɐW ןǝɐʞɔıW authored
This GitLab CI configuration is valid.
Learn more
.gitlab-ci.yml 931 B
variables: # Env vars
NOMAD_ADDR: http://nomad-dashboard.priv.lifl.fr/
stages: # List of stages for jobs, and their order of execution
- build
- deploy
build: # This job runs in the build stage, which runs first.
stage: build
script:
- echo $CI_JOB_ID > build_job_id
artifacts:
paths:
- deploy.sh
- mesinfos.php
- build_job_id
- project.nomad
expire_in: 1 week
deploy: # This job runs in the deploy stage.
image: mmasquelin/nomad-deployer:latest
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
dependencies:
- build
script:
- envsubst '${CI_COMMIT_SHORT_SHA}' < project.nomad > job.nomad
- cat job.nomad
- nomad validate job.nomad
- nomad plan job.nomad || if [ $? -eq 255 ]; then exit 255; else echo "success"; fi
- nomad run job.nomad
environment:
name: production