From ca7f6913a6600356139c4786eafb731257c3be8c Mon Sep 17 00:00:00 2001 From: solao Date: Sat, 15 Aug 2020 13:10:10 -0400 Subject: [PATCH] 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"`"'