|
|
|
@ -2,7 +2,7 @@ kind: pipeline
|
|
|
|
|
type: docker
|
|
|
|
|
name: "CI/CD"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
|
|
- image: mcr.microsoft.com/dotnet/sdk:8.0
|
|
|
|
@ -12,12 +12,12 @@ steps:
|
|
|
|
|
- dotnet tool install --global dotnet-sonarscanner
|
|
|
|
|
- dotnet tool install --global dotnet-coverage
|
|
|
|
|
- export PATH="$PATH:/root/.dotnet/tools"
|
|
|
|
|
- dotnet sonarscanner begin /k:"IQBall-WebAPI" /d:sonar.host.url="https://codefirst.iut.uca.fr/sonar" /d:sonar.login="sqp_b16ad09dcce1b9dde920e313b10c2fe85566624c"
|
|
|
|
|
- dotnet sonarscanner begin /k:"IQBall-WebAPI" /d:sonar.host.url="https://codefirst.iut.uca.fr/sonar" /d:sonar.login="sqp_b16ad09dcce1b9dde920e313b10c2fe85566624c" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
|
|
|
|
|
- dotnet build
|
|
|
|
|
- dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml"
|
|
|
|
|
- dotnet-coverage collect "dotnet test" -f xml -o coverage.xml
|
|
|
|
|
- dotnet sonarscanner end /d:sonar.login="sqp_b16ad09dcce1b9dde920e313b10c2fe85566624c"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- image: plugins/docker
|
|
|
|
|
name: "build and push docker image"
|
|
|
|
|
depends_on:
|
|
|
|
@ -33,20 +33,20 @@ steps:
|
|
|
|
|
from_secret: SECRET_REGISTRY_USERNAME
|
|
|
|
|
password:
|
|
|
|
|
from_secret: SECRET_REGISTRY_PASSWORD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# deploy staging database and server on codefirst
|
|
|
|
|
- image: ubuntu:latest
|
|
|
|
|
name: "Instantiate docker images on staging server"
|
|
|
|
|
depends_on:
|
|
|
|
|
- "build and push docker image"
|
|
|
|
|
environment:
|
|
|
|
|
environment:
|
|
|
|
|
PRIVATE_KEY:
|
|
|
|
|
from_secret: PRIVATE_KEY
|
|
|
|
|
commands:
|
|
|
|
|
- chmod +x ci/deploy_staging_server_step.sh
|
|
|
|
|
- ci/deploy_staging_server_step.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Deploy the production database and server on codefirst
|
|
|
|
|
# - image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
|
|
|
|
# name: "Instantiate dotnet api docker image on codefirst"
|
|
|
|
|