2019-08-11 18:53:55 +02:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
build:
|
|
|
|
image: python:3.6
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- 'which pip || ( apt-get update -y && apt-get install python3-pip -y )'
|
|
|
|
- pip3 install markdown2
|
|
|
|
- python3 --version
|
|
|
|
- python3 -c "from gitlabCI import build; build()"
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- assets/
|
|
|
|
- images/
|
|
|
|
- templates/
|
|
|
|
- index.html
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
image: ubuntu
|
|
|
|
stage: deploy
|
|
|
|
script:
|
|
|
|
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
|
|
|
- eval $(ssh-agent -s)
|
|
|
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- chmod 700 ~/.ssh
|
|
|
|
- ssh-keyscan proxy.auro.re >> ~/.ssh/known_hosts
|
|
|
|
- chmod 644 ~/.ssh/known_hosts
|
2019-08-11 19:28:05 +02:00
|
|
|
- ssh -o StrictHostKeyChecking=no -J git@proxy.auro.re git@10.128.0.52 "rm -r /var/www/aurore/*"
|
2019-08-11 18:53:55 +02:00
|
|
|
- scp -oProxyJump=git@proxy.auro.re -r assets/ images/ templates/ index.html git@10.128.0.52:/var/www/aurore
|