Cache build files and remove docker and deploy stages

This commit is contained in:
Daniel_I_Am 2020-08-15 18:43:12 -04:00
parent 7212166e47
commit 7f7c582069

View File

@ -11,8 +11,6 @@ stages:
- build - build
- test - test
- release - release
- docker
- deploy
cache: cache:
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG" key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
@ -76,37 +74,4 @@ release:
- 'dotnet publish -c Release --runtime linux-musl-x64 -o ../build' - 'dotnet publish -c Release --runtime linux-musl-x64 -o ../build'
artifacts: artifacts:
paths: paths:
- build/* - ../build/*
docker:
stage: docker
only:
changes:
- ChaosBot/**/*
refs:
- master
tags:
- docker
- hawkeye
dependencies:
- release
script:
- docker info
deploy:
stage: deploy
only:
changes:
- ChaosBot/**/*
refs:
- master
tags:
- docker
- hawkeye
dependencies:
- docker
script:
- 'apk add curl jq'
- '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"`"'