Commit ca5c6ecb authored by Mark Harding's avatar Mark Harding
Browse files

(feat): allow for staging environments to be decided

-subdomain: sgtpepper
parent 19bd3740
Loading
Loading
Loading
Loading
+18 −0
Original line number Original line Diff line number Diff line
@@ -7,6 +7,7 @@ stages:
  - build
  - build
  - test
  - test
  - prepare
  - prepare
  - staging
  - deploy
  - deploy


cache:
cache:
@@ -56,6 +57,23 @@ prepare:runners:
  environment:
  environment:
    name: staging
    name: staging


staging:start:
  stage: staging
  image: minds/ci:latest
  script:
    - STAGING_SUBDOMAIN=$(echo $CI_COMMIT_MESSAGE | awk -F'-subdomain:' '{print $2}')
    - echo "Subdomain will be setup at $STAGING_SUBDOMAIN"
  - /-subdomain/

staging:stop:
  stage: staging
  image: minds/ci:latest
  script:
    - STAGING_SUBDOMAIN=$(echo $CI_COMMIT_MESSAGE | awk -F'-subdomain:' '{print $2}') 
    - echo "TODO tear down $STAGING_SUBDOMAIN"
  when: manual
  - /-subdomain/

deploy:fpm:
deploy:fpm:
  stage: deploy
  stage: deploy
  image: minds/ci:latest
  image: minds/ci:latest