update ci
This commit is contained in:
parent
4373b3c422
commit
85999de4c9
1 changed files with 14 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue