.gitlab-ci.yml 1.21 KB
Newer Older
j38560's avatar
j38560 committed
1 2
before_script:
  - export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
j38560's avatar
j38560 committed
3
  - chmod 600 keys/deploykey.private
j38560's avatar
j38560 committed
4 5 6 7 8 9

stages:
  - createenv
  - startenv
  - setupenv
  - deploytotest
j38560's avatar
j38560 committed
10
  - diff
j38560's avatar
j38560 committed
11 12 13
  - stopenv
  - deleteenv
  - deploytolive
j38560's avatar
j38560 committed
14
  - cleanup_build
j38560's avatar
j38560 committed
15 16 17 18
 
createEnvironment:
  stage: createenv
  script:
j38560's avatar
j38560 committed
19
    - source bin/create_env.sh
j38560's avatar
j38560 committed
20 21 22 23 24 25
  tags:
    - db
    
startEnvironment:
  stage: startenv
  script:
j38560's avatar
j38560 committed
26
    - source bin/start_env.sh
j38560's avatar
j38560 committed
27 28 29 30 31 32
  tags:
    - db

setupEnvironment:
  stage: setupenv
  script:
33
    - source bin/install_environment.sh
j38560's avatar
j38560 committed
34 35 36 37 38 39
  tags:
    - db
    
deploymentTest:
  stage: deploytotest
  script:
j38560's avatar
j38560 committed
40
    - source bin/deploy_to_test.sh
j38560's avatar
j38560 committed
41 42 43
  tags:
    - db
    
j38560's avatar
j38560 committed
44 45 46 47
diffTestToProduction:
  stage: diff
  script:
    - source bin/diff.sh
j38560's avatar
j38560 committed
48 49 50
  artifacts:
    paths:
    - changes.sql
j38560's avatar
j38560 committed
51 52 53
  tags:
    - db    
    
j38560's avatar
j38560 committed
54 55 56
stopEnvironment:
  stage: stopenv
  script:
j38560's avatar
j38560 committed
57
    - source bin/stop_env.sh
j38560's avatar
j38560 committed
58 59 60 61 62 63
  tags:
    - db    
    
deleteEnvironment:
  stage: deleteenv
  script:
j38560's avatar
j38560 committed
64
    - source bin/delete_env.sh
j38560's avatar
j38560 committed
65 66 67 68 69 70 71 72 73 74
  tags:
    - db    
        
deployToLive:
  stage: deploytolive
  script:
    - echo "deploytolive not yet implemented"
  only:
    - master
  tags:
j38560's avatar
j38560 committed
75 76 77 78 79 80 81
    - db
    
cleanup_build_job:
  stage: cleanup_build
  script:
    - source bin/onfailure.sh
  when: on_failure