parent
e63e285156
commit
6d18ec1dd7
@ -1,34 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: blazor
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build
|
|
||||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
|
||||||
commands:
|
|
||||||
- cd myBlazorApp/
|
|
||||||
- dotnet restore myBlazorApp.sln
|
|
||||||
- dotnet build myBlazorApp.sln -c Release --no-restore
|
|
||||||
|
|
||||||
- name: tests
|
|
||||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
|
||||||
commands:
|
|
||||||
- cd myBlazorApp/
|
|
||||||
- dotnet restore myBlazorApp.sln
|
|
||||||
- dotnet test myBlazorApp.sln --no-restore
|
|
||||||
depends_on: [build]
|
|
||||||
|
|
||||||
- name: docker-build
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
dockerfile: myBlazorApp/myBlazorApp/Dockerfile
|
|
||||||
context: .
|
|
||||||
registry: hub.codefirst.iut.uca.fr
|
|
||||||
repo: hub.codefirst.iut.uca.fr/libreton/myBlazorApp
|
|
||||||
username:
|
|
||||||
libreton
|
|
||||||
password:
|
|
||||||
Li17br51&*
|
|
@ -1,22 +0,0 @@
|
|||||||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
|
||||||
WORKDIR /app
|
|
||||||
EXPOSE 80
|
|
||||||
EXPOSE 443
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
|
||||||
WORKDIR /src
|
|
||||||
COPY ["myBlazorApp/myBlazorApp.csproj", "myBlazorApp/"]
|
|
||||||
RUN dotnet restore "myBlazorApp/myBlazorApp.csproj"
|
|
||||||
COPY . .
|
|
||||||
WORKDIR "/src/myBlazorApp"
|
|
||||||
RUN dotnet build "myBlazorApp.csproj" -c Release -o /app/build
|
|
||||||
|
|
||||||
FROM build AS publish
|
|
||||||
RUN dotnet publish "myBlazorApp.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
|
||||||
|
|
||||||
FROM base AS final
|
|
||||||
WORKDIR /app
|
|
||||||
COPY --from=publish /app/publish .
|
|
||||||
ENTRYPOINT ["dotnet", "myBlazorApp.dll"]
|
|
Loading…
Reference in new issue