|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
kind: pipeline
|
|
|
|
|
type: docker
|
|
|
|
|
name: CI
|
|
|
|
|
name: CI/CD
|
|
|
|
|
volumes:
|
|
|
|
|
- name: docs
|
|
|
|
|
temp: {}
|
|
|
|
@ -10,37 +10,49 @@ trigger:
|
|
|
|
|
- push
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- 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
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
|
|
- dotnet restore OpenLibraryWS_Wrapper.sln
|
|
|
|
|
- dotnet build -c Release OpenLibraryWS_Wrapper.sln
|
|
|
|
|
# - 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 swagger tofile --output /docs/swagger.json /drone/src/Sources/OpenLibraryWrapper/bin/Release/net7.0/OpenLibraryWrapper.dll v1
|
|
|
|
|
# - 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: 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
|
|
|
|
|