.gitlab-ci.yml 2.72 KB
Newer Older
Marian Dovgialo's avatar
Marian Dovgialo committed
1
stages:
2
  - test
Marian Dovgialo's avatar
Marian Dovgialo committed
3
  - builddeb
Marian Dovgialo's avatar
Marian Dovgialo committed
4
  - sign
Marian Dovgialo's avatar
Marian Dovgialo committed
5
  - deploy
Marian Dovgialo's avatar
Marian Dovgialo committed
6 7 8 9
  


build:
Marian Dovgialo's avatar
Marian Dovgialo committed
10
  image: svarog-build-test-image:u1604
Marian Dovgialo's avatar
Marian Dovgialo committed
11 12
  stage: builddeb
  script:
13
    - ./scripts/ci/builddeb.sh
Marian Dovgialo's avatar
Marian Dovgialo committed
14
  artifacts:
15
    name: svarog_deb_$CI_BUILD_NAME_$CI_BUILD_REF_NAME
Marian Dovgialo's avatar
Marian Dovgialo committed
16
    paths: 
17 18 19 20 21 22
    - ./dist/*.deb
    
buildstandalone:
  image: svarog-build-test-image:u1604
  stage: builddeb
  before_script:
Marian Dovgialo's avatar
Marian Dovgialo committed
23 24
    - apt-get update -y
    - apt-get install -y zip
25
  script:
26
    - ./scripts/ci/buildzip.sh
27 28 29
  artifacts:
    name: Svarog_standalone_$CI_BUILD_NAME_$CI_BUILD_REF_NAME
    paths: 
Marian Dovgialo's avatar
Marian Dovgialo committed
30
    - ./dist/svarog-*.zip
Marian Dovgialo's avatar
Marian Dovgialo committed
31 32

mvntest:
Marian Dovgialo's avatar
Marian Dovgialo committed
33
  image: svarog-build-test-image:u1604
Marian Dovgialo's avatar
Marian Dovgialo committed
34 35 36
  stage: test
  script:
    - mvn test
Marian Dovgialo's avatar
Marian Dovgialo committed
37 38
    
signdebs:
Marian Dovgialo's avatar
Marian Dovgialo committed
39
  image: signdebs-image
Marian Dovgialo's avatar
Marian Dovgialo committed
40 41 42 43
  stage: sign
  before_script:
  - apt-get update -qq
  - apt-get install -y gnupg debsigs
44
  script: ./scripts/ci/signdebs.sh
Marian Dovgialo's avatar
Marian Dovgialo committed
45 46 47 48 49 50
  dependencies:
  - build
  artifacts:
    name: "svarog_signed_{$CI_BUILD_NAME_$CI_BUILD_REF_NAME}"
    paths:
    - ./dist/*.deb
Marian Dovgialo's avatar
Marian Dovgialo committed
51 52
    
deploy_xenial_development:
Marian Dovgialo's avatar
Marian Dovgialo committed
53
  image: deployment-image
Marian Dovgialo's avatar
Marian Dovgialo committed
54 55 56 57 58 59 60 61 62 63 64 65 66
  stage: deploy
  only:
    - development
  before_script:
    - apt-get update -qq -y
    - apt-get install -y -qq sshpass openssh-client uuid-runtime
  dependencies:
    - signdebs
  script:
    - export DEB_SRV=$DEB_NIGHTLY_SRV
    - export DEB_USER=$DEB_NIGHTLY_USER
    - export SSHPASS=$DEB_NIGHTLY_PASSWD
    - export RELEASE=xenial
67
    - ./scripts/ci/deploydebs.sh
68
  environment: nightly_ubuntu1604
Marian Dovgialo's avatar
Marian Dovgialo committed
69 70

deploy_xenial_testing:
Marian Dovgialo's avatar
Marian Dovgialo committed
71
  image: deployment-image
Marian Dovgialo's avatar
Marian Dovgialo committed
72 73
  stage: deploy
  only:
Marian Dovgialo's avatar
Marian Dovgialo committed
74
    - /^release.*/
Marian Dovgialo's avatar
Marian Dovgialo committed
75 76 77 78 79 80 81 82 83 84
  before_script:
    - apt-get update -qq -y
    - apt-get install -y -qq sshpass openssh-client uuid-runtime
  dependencies:
    - signdebs
  script:
    - export DEB_SRV=$DEB_TESTING_SRV
    - export DEB_USER=$DEB_TESTING_USER
    - export SSHPASS=$DEB_TESTING_PASSWD
    - export RELEASE=xenial
85
    - ./scripts/ci/deploydebs.sh
86
  environment: testing_ubuntu1604
Marian Dovgialo's avatar
Marian Dovgialo committed
87 88

deploy_xenial_master:
Marian Dovgialo's avatar
Marian Dovgialo committed
89
  image: deployment-image
Marian Dovgialo's avatar
Marian Dovgialo committed
90 91 92
  stage: deploy
  only:
    - master
93
  when: manual
Marian Dovgialo's avatar
Marian Dovgialo committed
94 95 96 97 98 99 100 101 102 103
  before_script:
    - apt-get update -qq -y
    - apt-get install -y -qq sshpass openssh-client uuid-runtime
  dependencies:
    - signdebs
  script:
    - export DEB_SRV=$DEB_STABLE_SRV
    - export DEB_USER=$DEB_STABLE_USER
    - export SSHPASS=$DEB_STABLE_PASSWD
    - export RELEASE=xenial
104
    - ./scripts/ci/deploydebs.sh
105
  environment: production_ubuntu1604
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120

deploy_standalone_braintech:
  image: deployment-image
  stage: deploy
  only:
    - master
  before_script:
    - apt-get update -qq -y
    - apt-get install -y -qq sshpass openssh-client uuid-runtime
  dependencies:
    - buildstandalone
  script:
    - export ADDRESS=$BRAINTECH_SRV
    - export USR=$BRAINTECH_USR
    - export PSW=$BRAINTECH_PWD
121
    - ./scripts/ci/deployjar.sh
122 123 124
  when: manual
  environment: braintech_pl_standalone_jar_production