Lucas Delanier 2 years ago
commit 0029d29a11

@ -26,26 +26,6 @@ steps:
- dotnet test Solution.sln --no-restore - dotnet test Solution.sln --no-restore
depends_on: [build] depends_on: [build]
#- name: code-analysis
#image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dronesonarplugin-dotnet6
#commands:
#- cd Sources/
#- dotnet restore LeagueOfLegends.sln
#- dotnet sonarscanner begin /k:TEST /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 LeagueOfLegends.sln -c Release --no-restore
#- dotnet test LeagueOfLegends.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 LeagueOfLegends.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
#- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
#secrets: [ SECRET_SONAR_LOGIN ]
# settings:
# accessible en ligne de commande par ${PLUGIN_SONAR_HOST}
#sonar_host: https://codefirst.iut.uca.fr/sonar/
# accessible en ligne de commande par ${PLUGIN_SONAR_TOKEN}
#sonar_token:
#from_secret: SECRET_SONAR_LOGIN
#depends_on: [tests]
- name: generate-and-deploy-docs - name: generate-and-deploy-docs
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
failure: ignore failure: ignore
@ -67,7 +47,7 @@ steps:
dockerfile: Sources/MovieFinder_API/Dockerfile dockerfile: Sources/MovieFinder_API/Dockerfile
context: Sources/ context: Sources/
registry: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dronesonarplugin-dotnet6 registry: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dronesonarplugin-dotnet6
repo: hub.codefirst.iut.uca.fr/lucas.delanier/MovieFinderAPI repo: hub.codefirst.iut.uca.fr/lucas.delanier/MovieFinder_API
username: username:
from_secret: SECRET_REGISTRY_USERNAME from_secret: SECRET_REGISTRY_USERNAME
password: password:
@ -76,7 +56,7 @@ steps:
- name: deploy-container - name: deploy-container
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment: environment:
IMAGENAME: hub.codefirst.iut.uca.fr/lucas.delanier/MovieFinderAPI:latest IMAGENAME: hub.codefirst.iut.uca.fr/lucas.delanier/MovieFinder_API:latest
CONTAINERNAME: container_moviefinder_api CONTAINERNAME: container_moviefinder_api
COMMAND: create COMMAND: create
OVERWRITE: true OVERWRITE: true

@ -4,15 +4,15 @@ FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80
EXPOSE 443 EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src WORKDIR /src
COPY ["MovieFinder_API/MovieFinder_API.csproj", "MovieFinder_API/"] COPY ["MovieFinder_API/MovieFinder_API.csproj", "MovieFinder_API/"]
RUN dotnet restore "MovieFinder_API/MovieFinder_API.csproj" RUN dotnet restore "MovieFinder_API/MovieFinder_API.csproj"
COPY . . COPY . .
WORKDIR "/sources/MovieFinder_API" WORKDIR "/Sources/MovieFinder_API"
RUN dotnet build "MovieFinder_API.csproj" -c Release -o /app/build RUN dotnet build "MovieFinder_API.csproj" -c Release -o /app/build
FROM build AS publish FROM build AS publish
RUN dotnet publish "Solution.csproj" -c Release -o /app/publish /p:UseAppHost=false RUN dotnet publish "Solution.csproj" -c Release -o /app/publish /p:UseAppHost=false

Loading…
Cancel
Save