Added docker file to create container and drone.yml for CI
This commit is contained in:
parent
9d0b2d4920
commit
3737ac3e93
@ -4,7 +4,6 @@ namespace AOC2021.Test.Models
|
||||
{
|
||||
public class Answer
|
||||
{
|
||||
|
||||
public string Day_A_Test { get; set; }
|
||||
public string Day_A_Input { get; set; }
|
||||
public string Day_B_Test { get; set; }
|
||||
|
@ -5,7 +5,7 @@ VisualStudioVersion = 16.0.31515.178
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AOC2021", "AOC2021\AOC2021.csproj", "{1C97C7BD-E112-4CC4-B870-BCEE6146C707}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AOC2021.Test", "AOC2021.Test\AOC2021.Test.csproj", "{00B6E578-8E4E-4722-A601-A8CEE90704E1}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AOC2021.Test", "AOC2021.Test\AOC2021.Test.csproj", "{00B6E578-8E4E-4722-A601-A8CEE90704E1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
24
AOC2021/.drone.yml
Normal file
24
AOC2021/.drone.yml
Normal file
@ -0,0 +1,24 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: AOC2021
|
||||
|
||||
steps:
|
||||
- name: init
|
||||
image: busybox
|
||||
commands:
|
||||
- echo 'Starting build pipeline for AOC2021'
|
||||
|
||||
- name: build-aoc-2021
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: 97waterpolo/aoc-2021
|
||||
dockerfile: AOC2021/Dockerfile
|
||||
|
||||
- name: finish
|
||||
image: busybox
|
||||
commands:
|
||||
- echo 'Finished deployment for Aincrad'
|
@ -5,5 +5,6 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ActiveDebugProfile>AOC2021</ActiveDebugProfile>
|
||||
<ShowAllFiles>false</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
18
AOC2021/Dockerfile
Normal file
18
AOC2021/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS base
|
||||
WORKDIR /app
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["AOC2021.csproj", "AOC2021/"]
|
||||
RUN dotnet restore "AOC2021/AOC2021.csproj"
|
||||
COPY [".", "AOC2021/."]
|
||||
WORKDIR "/src/AOC2021"
|
||||
RUN dotnet build "AOC2021.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "AOC2021.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "AOC2021.dll"]
|
Loading…
x
Reference in New Issue
Block a user