isn/.gitlab-ci.yml

56 lines
1.6 KiB
YAML

# You can override the included template(s) by including variable overrides
# See https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#priority-of-environment-variables
image: busybox:latest
before_script:
- dotnet restore
- dotnet nuget remove source gitlab || true
3 years ago
nonreg:
stage: test
script:
- |
echo "$CI_JOB_STAGE"
cd test/isnd.tests/
ASPNETCORE_ENVIRONMENT=Development dotnet test
3 years ago
test2:
stage: test
script:
- echo "Do another parallel test here"
- echo "For example run a lint test"
3 years ago
publish:
stage: deploy
3 years ago
artifacts:
paths:
3 years ago
- src/isnd/bin/Release/netcoreapp2.1/publish/
3 years ago
when: always
script:
- dotnet publish --configuration Release
deploy-to-gitlab:
stage: deploy
3 years ago
artifacts:
paths:
- src/*/bin/Release/*.nupkg
3 years ago
when: always
script:
- dotnet pack -c Release
- dotnet nuget add source --name gitlab --username gitlab+deploy-token-2 --password
$CI_JOB_TOKEN --store-password-in-clear-text "$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/nuget/index.json"
- dotnet nuget push src/*/bin/Release/*.nupkg -s gitlab
3 years ago
deploy-to-isn:
3 years ago
stage: deploy
3 years ago
artifacts:
paths:
- src/*/bin/Release/*.nupkg
3 years ago
when: always
3 years ago
script:
- dotnet pack --configuration Release --no-restore
3 years ago
- cd src/isn
3 years ago
- dotnet run push -s $ISNSOURCE -k $ISNAPIKEY ../*/bin/Release/*.nupkg
environment:
name: production
3 years ago
url: https://isn.pschneider.fr
stages:
- test
- deploy