From 85999de4c99ca8ca7ae30a755724e92712ab977a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Berthaud-M=C3=BCller?= Date: Tue, 17 Aug 2021 22:38:12 +0200 Subject: [PATCH] update ci --- .gitlab-ci.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64b86fb..074c72b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,23 +1,14 @@ image: debian:stable-slim -before_script: - - apt-get update - - apt-get install -y ssh-client knot knot-dnsutils - # from https://docs.gitlab.com/ee/ci/ssh_keys/ - - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - - - mkdir -p $HOME/.ssh - - chmod 700 $HOME/.ssh - - echo "$SSH_KNOWN_HOSTS" >> $HOME/.ssh/known_hosts - - echo "$SSH_CONFIG" >> $HOME/.ssh/config - - chmod 644 $HOME/.ssh/{known_hosts,config} - stages: - build - deploy build: stage: build + before_script: + - apt-get update + - apt-get install -y knot-dnsutils script: - | for zonefile in zones/*; do @@ -36,4 +27,15 @@ deploy: script: - scp -r zones catalog-zones ${SSH_PRIMARY_NS}:/var/lib/knot/ - ssh ${SSH_PRIMARY_NS} /usr/sbin/knotc reload + before_script: + - apt-get update + - apt-get install -y ssh-client + # from https://docs.gitlab.com/ee/ci/ssh_keys/ + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - mkdir -p $HOME/.ssh + - chmod 700 $HOME/.ssh + - echo "$SSH_KNOWN_HOSTS" >> $HOME/.ssh/known_hosts + - echo "$SSH_CONFIG" >> $HOME/.ssh/config + - chmod 644 $HOME/.ssh/{known_hosts,config} when: manual