Use Alpine packages
This commit is contained in:
parent
63dae4c3f3
commit
340a8c311c
@ -1,19 +1,20 @@
|
|||||||
deploy_production:
|
deploy_production:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
before_script:
|
before_script:
|
||||||
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
- 'which ssh-agent || ( apk add --update --no-cache openssh )'
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/gitlab
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/gitlab
|
||||||
- chmod 700 ~/.ssh/gitlab
|
- chmod 700 ~/.ssh/gitlab
|
||||||
- eval "$(ssh-agent -s)"
|
- eval "$(ssh-agent -s)"
|
||||||
- ssh-add ~/.ssh/gitlab
|
- ssh-add ~/.ssh/gitlab
|
||||||
|
- ssh-keyscan -H 'vimium.com' >> ~/.ssh/known_hosts
|
||||||
- ssh-keyscan -H 'git.vimium.com' >> ~/.ssh/known_hosts
|
- ssh-keyscan -H 'git.vimium.com' >> ~/.ssh/known_hosts
|
||||||
- apt-get install rsync -y -qq
|
- apk add --no-cache rsync
|
||||||
- apt-get install curl -y -qq
|
- apk add --no-cache curl
|
||||||
script:
|
script:
|
||||||
- echo "Deploying to pki.vimium.com"
|
- echo "Deploying to pki.vimium.com"
|
||||||
- ssh -i ~/.ssh/gitlab -o StrictHostKeyChecking=no pki@vimium.com -p PORT
|
- rsync -avz --progress *.{cer,crl,html} pki@vimium.com:/var/www/pki.vimium.com
|
||||||
- rsync -avz --progress -a -e "ssh -p PORT" *.cer pki@vimium.com:/var/www/pki.vimium.com
|
- ssh -t pki@vimium.com 'sudo systemctl reload nginx'
|
||||||
- echo "Deployed"
|
- echo "Deployed"
|
||||||
environment:
|
environment:
|
||||||
name: production
|
name: production
|
||||||
|
Loading…
x
Reference in New Issue
Block a user