merge from master
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
commit
014a438e96
@ -0,0 +1,32 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: EfCsLoL
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
|
||||
steps:
|
||||
# docker image build
|
||||
- name: docker-build-and-push
|
||||
image: plugins/docker
|
||||
settings:
|
||||
dockerfile: Sources/API_LoL/Dockerfile
|
||||
context: Sources/
|
||||
registry: hub.codefirst.iut.uca.fr
|
||||
repo: hub.codefirst.iut.uca.fr/corentin.richard/entityframework_consodeservices_tp
|
||||
|
||||
username:
|
||||
from_secret: SECRET_REGISTRY_USERNAME
|
||||
password:
|
||||
from_secret: SECRET_REGISTRY_PASSWORD
|
||||
|
||||
# docker test
|
||||
- name: tests
|
||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||
commands:
|
||||
- cd Sources/
|
||||
- dotnet restore LeagueOfLegends.sln
|
||||
- dotnet test LeagueOfLegends.sln --no-restore
|
||||
depends_on: [docker-build-and-push]
|
||||
|
@ -0,0 +1,25 @@
|
||||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
|
||||
#For more information, please see https://aka.ms/containercompat
|
||||
|
||||
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 ["API_LoL/API_LoL.csproj", "API_LoL/"]
|
||||
RUN dotnet restore "API_LoL/API_LoL.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/API_LoL"
|
||||
RUN dotnet build "API_LoL.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "API_LoL.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "API_LoL.dll"]
|
@ -0,0 +1,30 @@
|
||||
//using Model;
|
||||
//using StubLib;
|
||||
|
||||
//var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
//// Add services to the container.
|
||||
|
||||
//builder.Services.AddControllers();
|
||||
//// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
//builder.Services.AddEndpointsApiExplorer();
|
||||
//builder.Services.AddSwaggerGen();
|
||||
|
||||
//builder.Services.AddScoped<IDataManager,StubData>();
|
||||
|
||||
//var app = builder.Build();
|
||||
|
||||
//// Configure the HTTP request pipeline.
|
||||
//if (app.Environment.IsDevelopment())
|
||||
//{
|
||||
// app.UseSwagger();
|
||||
// app.UseSwaggerUI();
|
||||
//}
|
||||
|
||||
//app.UseHttpsRedirection();
|
||||
|
||||
//app.UseAuthorization();
|
||||
|
||||
//app.MapControllers();
|
||||
|
||||
//app.Run();
|
@ -0,0 +1,27 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\API_LoL\API_LoL.csproj" />
|
||||
<ProjectReference Include="..\Api_UT\Api_UT.csproj" />
|
||||
<ProjectReference Include="..\DTO\DTO.csproj" />
|
||||
<ProjectReference Include="..\EntityFramework\EntityFramework.csproj" />
|
||||
<ProjectReference Include="..\Model\Model.csproj" />
|
||||
<ProjectReference Include="..\StubLib\StubLib.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1 @@
|
||||
global using Microsoft.VisualStudio.TestTools.UnitTesting;
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue