Environments


Environments

Environments are deployment targets

CI variables can be scoped to environments

(Hint: Environments can also be assigned using branch names)


Hands-On

  1. Retrieve passwords for dev and live environments:

     docker ps --filter "label=com.docker.compose.service=nginx" --quiet \
     | xargs -I{} docker logs {} \
     | grep "Password for "
    
  2. Create unprotected CI variable PASS twice with scope dev/live
  3. Create unprotected CI variable SEAT_INDEX with your seat number
  4. Add new stage and job called deploy
  5. Upload to WebDAV server using curl
  6. Create branches dev and live
  7. Download from https://dev.seatN.inmylab.de/hello and live

(See new .gitlab-ci.yml)