CI: automatic image deployment for zeronet

This commit is contained in:
Grégoire Henry 2018-03-08 06:16:18 +01:00
parent c4146d1d46
commit 8638a2bb98

View File

@ -519,58 +519,86 @@ documentation:
- gitlab-org - gitlab-org
## Relaunching the bootstrap servers of the alphanet.zeronet ## Relaunching the bootstrap servers of the alphanet/zeronet
.bootstrap_template: &bootstrap_definition .bootstrap_template: &bootstrap_definition
image: ${opam_image} image: ${opam_image}
stage: deploy stage: deploy
dependencies: [] dependencies: []
only:
- alphanet@tezos/tezos
- zeronet@tezos/tezos
before_script: before_script:
- echo "${CI_KH}" > ~/.ssh/known_hosts - echo "${CI_KH}" > ~/.ssh/known_hosts
- if [ "${CI_COMMIT_REF_NAME}" = "alphanet" ]; then - echo "${CI_PK_ALPHANET}" | tr -d "\r" > ~/.ssh/id_ed25519 ;
echo "${CI_PK_ALPHANET}" | tr -d "\r" > ~/.ssh/id_ed25519 ;
else
echo "${CI_PK_ZERONET}" | tr -d "\r" > ~/.ssh/id_ed25519 ;
fi
- echo "${CI_SSH_CONFIG}" | tr -d "\r" > ~/.ssh/config - echo "${CI_SSH_CONFIG}" | tr -d "\r" > ~/.ssh/config
- chmod 600 ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519
- sudo apk add --no-cache openssh
allow_failure: true allow_failure: true
tags: tags:
- gitlab-org - gitlab-org
deploy:bootstrap1: deploy:bootstrap1:
<<: *bootstrap_definition <<: *bootstrap_definition
only:
- alphanet@tezos/tezos
script: script:
- ssh bootstrap1 - ssh bootstrap1
deploy:bootstrap2: deploy:bootstrap2:
<<: *bootstrap_definition <<: *bootstrap_definition
only:
- alphanet@tezos/tezos
script: script:
- ssh bootstrap2 - ssh bootstrap2
deploy:bootstrap3: deploy:bootstrap3:
<<: *bootstrap_definition <<: *bootstrap_definition
only:
- alphanet@tezos/tezos
script: script:
- ssh bootstrap3 - ssh bootstrap3
deploy:bootstrap4: deploy:bootstrap4:
<<: *bootstrap_definition <<: *bootstrap_definition
only:
- alphanet@tezos/tezos
script: script:
- ssh bootstrap4 - ssh bootstrap4
deploy:bootstrap5: deploy:bootstrap5:
<<: *bootstrap_definition <<: *bootstrap_definition
only:
- alphanet@tezos/tezos
script: script:
- ssh bootstrap5 - ssh bootstrap5
deploy:bootstrap6: deploy:bootstrap6:
<<: *bootstrap_definition <<: *bootstrap_definition
only:
- alphanet@tezos/tezos
script: script:
- ssh bootstrap6 - ssh bootstrap6
deploy:zeronet1:
<<: *bootstrap_definition
only:
- zeronet@tezos/tezos
script:
- ssh zeronet1
deploy:zeronet2:
<<: *bootstrap_definition
only:
- zeronet@tezos/tezos
script:
- ssh zeronet2
deploy:zeronet3:
<<: *bootstrap_definition
only:
- zeronet@tezos/tezos
script:
- ssh zeronet3
# cleanup: # cleanup:
# <<: *dind_definition # <<: *dind_definition
# stage: cleanup # stage: cleanup