From 14237b35c386e451d4c4edb93662e6bbe1c70dd3 Mon Sep 17 00:00:00 2001 From: Daniel_I_Am Date: Fri, 14 Aug 2020 21:23:30 -0400 Subject: [PATCH 1/3] For now... the update to the pipeline from ptero to portainer --- .gitlab-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 99e0c61..55dc2b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,8 +93,9 @@ deploy: dependencies: - release script: - - 'apk add lftp openssh-client curl' + - 'apk add lftp openssh-client curl jq' - 'mkdir ~/.ssh' - - 'ssh-keyscan -p 2022 panel.chaoticlogic.us >> ~/.ssh/known_hosts' - - 'lftp sftp://$SFTP_USER:$SFTP_PASS@$SFTP_HOST -e "mirror -X .* -X .*/ -X *.db -X appsettings.json --reverse --verbose --delete --parallel=8 ../publish/ ./; bye"' - - 'curl -H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" -H "Accept: Application/vnd.pterodactyl.v1+json" "$API_URI/client/servers/$API_CONTAINER/power" -X POST -d "{ \"signal\": \"restart\" }"' + - 'ssh-keyscan -p 2303 panel.chaoticlogic.us >> ~/.ssh/known_hosts' + - 'echo "LFTP needs to be fixed"' + # - 'lftp sftp://$SFTP_USER:$SFTP_PASS@$SFTP_HOST -e "mirror -X .* -X .*/ -X *.db -X appsettings.json --reverse --verbose --delete --parallel=8 ../publish/ ./; bye"' + - 'curl -X POST $API_URI/api/endpoints/$ENDPOINT_URI/docker/containers/$CONTAINER_ID/restart -H "Authorization: Bearer `curl -X POST $API_URI/api/auth -H "Content-Type: application/json" -d "{\"Username\": \"$API_USER\", \"Password\": \"$API_PASS\"}"" | jq -r ".jwt"`"' From ca7f6913a6600356139c4786eafb731257c3be8c Mon Sep 17 00:00:00 2001 From: solao Date: Sat, 15 Aug 2020 13:10:10 -0400 Subject: [PATCH 2/3] Update .gitlab-ci.yml --- .gitlab-ci.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 55dc2b5..35b1514 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,9 +43,6 @@ build: - hawkeye script: - 'dotnet build --no-restore' - artifacts: - paths: - - bin/ tests: stage: test @@ -71,15 +68,15 @@ release: - master dependencies: - tests - artifacts: - paths: - - publish/ tags: - docker - hawkeye script: - - 'dotnet publish -c Release -o ../publish ChaosBot/ChaosBot.csproj' - + - 'dotnet publish -c Release -r linux-musl-x64 -o ../build --self-contained true' + artifacts: + paths: + - build/* + deploy: stage: deploy only: @@ -97,5 +94,5 @@ deploy: - 'mkdir ~/.ssh' - 'ssh-keyscan -p 2303 panel.chaoticlogic.us >> ~/.ssh/known_hosts' - 'echo "LFTP needs to be fixed"' - # - 'lftp sftp://$SFTP_USER:$SFTP_PASS@$SFTP_HOST -e "mirror -X .* -X .*/ -X *.db -X appsettings.json --reverse --verbose --delete --parallel=8 ../publish/ ./; bye"' + - 'lftp sftp://$SFTP_USER:$SFTP_PASS@$SFTP_HOST -e "mirror -X .* -X .*/ -X *.db -X appsettings.json --reverse --verbose --delete --parallel=8 build/ ./; bye"' - 'curl -X POST $API_URI/api/endpoints/$ENDPOINT_URI/docker/containers/$CONTAINER_ID/restart -H "Authorization: Bearer `curl -X POST $API_URI/api/auth -H "Content-Type: application/json" -d "{\"Username\": \"$API_USER\", \"Password\": \"$API_PASS\"}"" | jq -r ".jwt"`"' From 2bffde182c3833867718efb063d8fd4f6b23ef8a Mon Sep 17 00:00:00 2001 From: solao Date: Sat, 15 Aug 2020 13:13:10 -0400 Subject: [PATCH 3/3] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35b1514..84dfea9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,4 +95,4 @@ deploy: - 'ssh-keyscan -p 2303 panel.chaoticlogic.us >> ~/.ssh/known_hosts' - 'echo "LFTP needs to be fixed"' - 'lftp sftp://$SFTP_USER:$SFTP_PASS@$SFTP_HOST -e "mirror -X .* -X .*/ -X *.db -X appsettings.json --reverse --verbose --delete --parallel=8 build/ ./; bye"' - - 'curl -X POST $API_URI/api/endpoints/$ENDPOINT_URI/docker/containers/$CONTAINER_ID/restart -H "Authorization: Bearer `curl -X POST $API_URI/api/auth -H "Content-Type: application/json" -d "{\"Username\": \"$API_USER\", \"Password\": \"$API_PASS\"}"" | jq -r ".jwt"`"' + # - 'curl -X POST $API_URI/api/endpoints/$ENDPOINT_URI/docker/containers/$CONTAINER_ID/restart -H "Authorization: Bearer `curl -X POST $API_URI/api/auth -H "Content-Type: application/json" -d "{\"Username\": \"$API_USER\", \"Password\": \"$API_PASS\"}"" | jq -r ".jwt"`"'