Update .gitlab-ci.yml

This commit is contained in:
Sean "Solao Bajiuik" Stoves 2020-06-06 12:48:53 -04:00
parent 8f28b32dbe
commit 3516b128a0

View File

@ -10,6 +10,8 @@ variables:
stages: stages:
- build - build
- test - test
- release
- deploy
cache: cache:
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG" key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
@ -27,6 +29,9 @@ cache:
policy: pull-push policy: pull-push
before_script: before_script:
- 'apk add lftp'
- 'apk add openssh-client'
- 'ssh-keyscan -p 2022 panel.chaoticlogic.us >> ~/.ssh/known_hosts'
- 'dotnet restore --packages $NUGET_PACKAGES_DIRECTORY' - 'dotnet restore --packages $NUGET_PACKAGES_DIRECTORY'
build: build:
@ -41,6 +46,9 @@ build:
- hawkeye - hawkeye
script: script:
- 'dotnet build --no-restore' - 'dotnet build --no-restore'
artifacts:
paths:
- bin/
tests: tests:
stage: test stage: test
@ -54,3 +62,22 @@ tests:
- hawkeye - hawkeye
script: script:
- 'dotnet test --no-restore' - 'dotnet test --no-restore'
release:
stage: release
only:
- master
artifacts:
paths:
- publish/
script:
- dotnet publish -c Release -o ../publish ChaosBot/ChaosBot.csproj
deploy:
stage: deploy
only:
- master
dependencies:
- release
script:
- lftp -e "open $SFTP_HOST; user $SFTP_USER $SFTP_PASS; mirror -X .* -X .*/ -X *.db -X appsettings.json --reverse --verbose --delete publish/ app/; bye"