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