You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
3.5 KiB
106 lines
3.5 KiB
kind: pipeline
|
|
type: docker
|
|
name: CI/CD
|
|
|
|
volumes:
|
|
- name: docs
|
|
temp: {}
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
|
|
steps:
|
|
- name: toto
|
|
image: hadolint/hadolint:latest-alpine
|
|
commands:
|
|
- cd Sources/
|
|
- hadolint --version
|
|
- hadolint Dockerfile
|
|
|
|
- name: docker-build-and-push
|
|
image: plugins/docker
|
|
settings:
|
|
dockerfile: Sources/Dockerfile
|
|
context: Sources/
|
|
registry: hub.codefirst.iut.uca.fr
|
|
repo: hub.codefirst.iut.uca.fr/felix.mielcarek/openlibraryws_wrapper
|
|
username:
|
|
from_secret: SECRET_REGISTRY_USERNAME
|
|
password:
|
|
from_secret: SECRET_REGISTRY_PASSWORD
|
|
|
|
|
|
- name: deploy-container
|
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
|
environment:
|
|
IMAGENAME: hub.codefirst.iut.uca.fr/felix.mielcarek/openlibraryws_wrapper:latest
|
|
CONTAINERNAME: openlibraryws_wrapper
|
|
COMMAND: create
|
|
OVERWRITE: true
|
|
depends_on: [docker-build-and-push]
|
|
|
|
|
|
# - name: generate-swagger
|
|
# image: mcr.microsoft.com/dotnet/sdk:7.0
|
|
# volumes:
|
|
# - name: docs
|
|
# path: /docs
|
|
# commands:
|
|
# - cd Sources/
|
|
# - dotnet add OpenLibraryWrapper/OpenLibraryWrapper.csproj package Swashbuckle.AspNetCore -v 6.5
|
|
# - dotnet new tool-manifest
|
|
# - dotnet tool install --version 6.5.0 Swashbuckle.AspNetCore.Cli
|
|
|
|
# - dotnet restore OpenLibraryWS_Wrapper.sln
|
|
# - dotnet build -c Release OpenLibraryWS_Wrapper.sln
|
|
|
|
# - dotnet swagger tofile --output /docs/swagger.json /drone/src/Sources/OpenLibraryWrapper/bin/Release/net7.0/OpenLibraryWrapper.dll v1
|
|
|
|
# - name: generate-and-deploy-docs
|
|
# image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
|
|
# failure: ignore
|
|
# volumes:
|
|
# - name: docs
|
|
# path: /docs
|
|
# commands:
|
|
# - /entrypoint.sh
|
|
# when:
|
|
# branch:
|
|
# - master
|
|
# event:
|
|
# - push
|
|
# - pull_request
|
|
# depends_on: [generate-swagger]
|
|
|
|
# - name: build
|
|
# image: mcr.microsoft.com/dotnet/sdk:7.0
|
|
# commands:
|
|
# - cd Sources
|
|
# - dotnet restore OpenLibraryWS_Wrapper.sln
|
|
# - dotnet build OpenLibraryWS_Wrapper.sln
|
|
|
|
# - name: tests
|
|
# image: mcr.microsoft.com/dotnet/sdk:7.0
|
|
# commands:
|
|
# - cd Sources/
|
|
# - dotnet restore OpenLibraryWS_Wrapper.sln
|
|
# - dotnet test OpenLibraryWS_Wrapper.sln --no-restore
|
|
# depends_on: [build]
|
|
|
|
# - name: code-inspection
|
|
# image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7
|
|
# secrets: [ SECRET_SONAR_LOGIN ]
|
|
# settings:
|
|
# sonar_host: https://codefirst.iut.uca.fr/sonar/
|
|
# sonar_token:
|
|
# from_secret: SECRET_SONAR_LOGIN
|
|
# commands:
|
|
# - cd Sources/
|
|
# - dotnet restore OpenLibraryWS_Wrapper.sln
|
|
# - dotnet sonarscanner begin /k:OpenLibraryWS_Wrapper_Mielcarek /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="Tests/**" /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
|
|
# - dotnet build OpenLibraryWS_Wrapper.sln -c Release --no-restore
|
|
# - dotnet test OpenLibraryWS_Wrapper.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
|
|
# - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
|
|
# - dotnet publish OpenLibraryWS_Wrapper.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
|
|
# - dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN} |