Update .gitlab-ci.yml
This commit is contained in:
parent
8f28b32dbe
commit
3516b128a0
@ -10,7 +10,9 @@ variables:
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
|
||||
- release
|
||||
- deploy
|
||||
|
||||
cache:
|
||||
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
|
||||
paths:
|
||||
@ -27,6 +29,9 @@ cache:
|
||||
policy: pull-push
|
||||
|
||||
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'
|
||||
|
||||
build:
|
||||
@ -41,6 +46,9 @@ build:
|
||||
- hawkeye
|
||||
script:
|
||||
- 'dotnet build --no-restore'
|
||||
artifacts:
|
||||
paths:
|
||||
- bin/
|
||||
|
||||
tests:
|
||||
stage: test
|
||||
@ -54,3 +62,22 @@ tests:
|
||||
- hawkeye
|
||||
script:
|
||||
- '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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user