From 8ac90d1a51ab15c2b291bb87ae19070ea52a93d6 Mon Sep 17 00:00:00 2001 From: Daan Date: Tue, 28 Aug 2018 20:32:24 +0000 Subject: [PATCH] Change deployment IP --- .gitlab-ci.yml | 96 +++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd67b30..93afe34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,49 +1,49 @@ -stages: - - build - - deploy - -before_script: - - set -e - - set -u - - set -o pipefail - -build: - stage: build - image: microsoft/dotnet:2.1.300-sdk-stretch - artifacts: - expire_in: 1h - paths: - - Geekbot.net/Binaries/ - script: - - dotnet restore - - dotnet test Tests - - dotnet publish --version-suffix ${CI_COMMIT_SHA:0:8} --configuration Release -o Binaries ./ - -deploy: - stage: deploy - image: instrumentisto/rsync-ssh - only: - - master - dependencies: - - build - environment: - name: Production - url: https://discordapp.com/oauth2/authorize?client_id=171249478546882561&scope=bot&permissions=1416834054 - before_script: - - eval $(ssh-agent -s) - - mkdir -p ~/.ssh - - '[[ -f /.dockerenv ]] && echo -e "Host *\n StrictHostKeyChecking no" > ~/.ssh/config' - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - - chmod 700 ~/.ssh - script: - - rsync -rav -e "ssh -p 65432" ./Geekbot.net/Binaries/* geekbot@172.104.156.220:$DEPPATH - - ssh -p 65432 geekbot@172.104.156.220 "sudo systemctl restart geekbot.service" - -mirror: - stage: deploy - image: bravissimolabs/alpine-git:latest - only: - - master - script: - - git push https://runebaas:$TOKEN@github.com/pizzaandcoffee/Geekbot.net.git origin/master:master -f +stages: + - build + - deploy + +before_script: + - set -e + - set -u + - set -o pipefail + +build: + stage: build + image: microsoft/dotnet:2.1.300-sdk-stretch + artifacts: + expire_in: 1h + paths: + - Geekbot.net/Binaries/ + script: + - dotnet restore + - dotnet test Tests + - dotnet publish --version-suffix ${CI_COMMIT_SHA:0:8} --configuration Release -o Binaries ./ + +deploy: + stage: deploy + image: instrumentisto/rsync-ssh + only: + - master + dependencies: + - build + environment: + name: Production + url: https://discordapp.com/oauth2/authorize?client_id=171249478546882561&scope=bot&permissions=1416834054 + before_script: + - eval $(ssh-agent -s) + - mkdir -p ~/.ssh + - '[[ -f /.dockerenv ]] && echo -e "Host *\n StrictHostKeyChecking no" > ~/.ssh/config' + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null + - chmod 700 ~/.ssh + script: + - rsync -rav -e "ssh -p 65432" ./Geekbot.net/Binaries/* geekbot@192.168.156.175:$DEPPATH + - ssh -p 65432 geekbot@192.168.156.175 "sudo systemctl restart geekbot.service" + +mirror: + stage: deploy + image: bravissimolabs/alpine-git:latest + only: + - master + script: + - git push https://runebaas:$TOKEN@github.com/pizzaandcoffee/Geekbot.net.git origin/master:master -f \ No newline at end of file