Update .gitlab-ci.yml
This commit is contained in:
parent
8f28b32dbe
commit
3516b128a0
@ -10,7 +10,9 @@ 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"
|
||||||
paths:
|
paths:
|
||||||
@ -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"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user