Compare commits

..

7 commits
main ... dev

Author SHA1 Message Date
3d5eaae48c Merge pull request 'Add docker and pipeline' (#9) from 2024-12-15-dockerise into dev
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #9
2024-12-17 09:57:13 +01:00
f89c0ae6d7 Add docker and pipeline
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
2024-12-15 20:49:25 +00:00
59fdfe1d3d Add docker and pipeline
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
2024-12-15 20:46:59 +00:00
cd81564849 Merge pull request 'Add docker and pipeline' (#8) from 2024-12-15-dockerise into dev
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #8
2024-12-15 21:46:35 +01:00
1dcee428d0 Add docker and pipeline
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline failed
2024-12-15 20:45:18 +00:00
90bcd867b0 Add docker and pipeline 2024-12-15 20:43:00 +00:00
9ba5b0e014 Merge pull request 'Add docker and pipeline' (#7) from 2024-12-15-dockerise into dev
Reviewed-on: #7
2024-12-15 21:42:01 +01:00
3 changed files with 52 additions and 4 deletions

View file

@ -1,9 +1,22 @@
steps: steps:
- name: Tests - name: Tests
when:
- branch: main
event: push
- event: tag
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- dotnet test - dotnet test
- name: Build and Publish Dev Docker Image
when:
- branch: dev
event: [pull_request_closed]
image: woodpeckerci/plugin-docker-buildx:4.2
settings:
platforms: linux/amd64,linux/arm64
repo: ${CI_REG_HOST}:${CI_REG_PORT}/${CI_REPO_OWNER}/${CI_REPO_NAME}
tags: dev
registry: http://${CI_REG_HOST}:${CI_REG_PORT}
insecure: true
buildkit_config: "[registry.\"${CI_REG_HOST}:${CI_REG_PORT}\"]\n http = true\n insecure = true"
username:
from_secret: CI_REG_USER
password:
from_secret: CI_REG_TOKEN

View file

@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution", "Solution", "{EB
Alveus.ruleset = Alveus.ruleset Alveus.ruleset = Alveus.ruleset
LICENSE = LICENSE LICENSE = LICENSE
README.md = README.md README.md = README.md
.woodpecker.yml = .woodpecker.yml
Dockerfile = Dockerfile
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Astral.Tests", "Astral.Tests\Astral.Tests.csproj", "{F0CBECAA-F279-4D94-9F83-E9EBC7A5C08C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Astral.Tests", "Astral.Tests\Astral.Tests.csproj", "{F0CBECAA-F279-4D94-9F83-E9EBC7A5C08C}"

33
Dockerfile Normal file
View file

@ -0,0 +1,33 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
USER $APP_UID
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG TARGETARCH
ARG BUILDPLATFORM
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["Astral.ApiServer/Astral.ApiServer.csproj", "Astral.ApiServer/"]
COPY ["Astral.Core/Astral.Core.csproj", "Astral.Core/"]
COPY ["Astral.Services/Astral.Services.csproj", "Astral.Services/"]
COPY ["Astral.DAL/Astral.DAL.csproj", "Astral.DAL/"]
RUN dotnet restore "Astral.ApiServer/Astral.ApiServer.csproj"
COPY . .
WORKDIR "/src/Astral.ApiServer"
RUN dotnet build "Astral.ApiServer.csproj" -c $BUILD_CONFIGURATION -a $TARGETARCH -o /app/build
FROM build AS publish
ARG TARGETARCH
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "Astral.ApiServer.csproj" --no-restore -c $BUILD_CONFIGURATION -a $TARGETARCH -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Astral.ApiServer.dll"]