Change deployment IP
This commit is contained in:
parent
b0758eb119
commit
5db3187f0d
1 changed files with 48 additions and 48 deletions
|
@ -1,49 +1,49 @@
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- set -e
|
- set -e
|
||||||
- set -u
|
- set -u
|
||||||
- set -o pipefail
|
- set -o pipefail
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
image: microsoft/dotnet:2.1.300-sdk-stretch
|
image: microsoft/dotnet:2.1.300-sdk-stretch
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1h
|
expire_in: 1h
|
||||||
paths:
|
paths:
|
||||||
- Geekbot.net/Binaries/
|
- Geekbot.net/Binaries/
|
||||||
script:
|
script:
|
||||||
- dotnet restore
|
- dotnet restore
|
||||||
- dotnet test Tests
|
- dotnet test Tests
|
||||||
- dotnet publish --version-suffix ${CI_COMMIT_SHA:0:8} --configuration Release -o Binaries ./
|
- dotnet publish --version-suffix ${CI_COMMIT_SHA:0:8} --configuration Release -o Binaries ./
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: instrumentisto/rsync-ssh
|
image: instrumentisto/rsync-ssh
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
dependencies:
|
dependencies:
|
||||||
- build
|
- build
|
||||||
environment:
|
environment:
|
||||||
name: Production
|
name: Production
|
||||||
url: https://discordapp.com/oauth2/authorize?client_id=171249478546882561&scope=bot&permissions=1416834054
|
url: https://discordapp.com/oauth2/authorize?client_id=171249478546882561&scope=bot&permissions=1416834054
|
||||||
before_script:
|
before_script:
|
||||||
- eval $(ssh-agent -s)
|
- eval $(ssh-agent -s)
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n StrictHostKeyChecking no" > ~/.ssh/config'
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n StrictHostKeyChecking no" > ~/.ssh/config'
|
||||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||||
- chmod 700 ~/.ssh
|
- chmod 700 ~/.ssh
|
||||||
script:
|
script:
|
||||||
- rsync -rav -e "ssh -p 65432" ./Geekbot.net/Binaries/* geekbot@172.104.156.220:$DEPPATH
|
- rsync -rav -e "ssh -p 65432" ./Geekbot.net/Binaries/* geekbot@192.168.156.175:$DEPPATH
|
||||||
- ssh -p 65432 geekbot@172.104.156.220 "sudo systemctl restart geekbot.service"
|
- ssh -p 65432 geekbot@192.168.156.175 "sudo systemctl restart geekbot.service"
|
||||||
|
|
||||||
mirror:
|
mirror:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: bravissimolabs/alpine-git:latest
|
image: bravissimolabs/alpine-git:latest
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
script:
|
script:
|
||||||
- git push https://runebaas:$TOKEN@github.com/pizzaandcoffee/Geekbot.net.git origin/master:master -f
|
- git push https://runebaas:$TOKEN@github.com/pizzaandcoffee/Geekbot.net.git origin/master:master -f
|
||||||
|
|
Loading…
Reference in a new issue