Skip to content

Commit

Permalink
update build process
Browse files Browse the repository at this point in the history
  • Loading branch information
stamepicmorg committed Sep 5, 2024
1 parent d7b5ff8 commit ce30acb
Show file tree
Hide file tree
Showing 2,347 changed files with 372 additions and 18 deletions.
77 changes: 61 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,67 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS base
WORKDIR /app

##################################################################
##################################################################
##################################################################
# Temp Build Layer
##################################################################
##################################################################
##################################################################
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
WORKDIR /src-temp
COPY ["./src/epicmorg.jira.issue.web.reporter", "jwr/"]
RUN dotnet restore "jwr/epicmorg.jira.issue.web.reporter.csproj"

COPY . .
WORKDIR "/src-temp/jwr"
RUN cat ./epicmorg.jira.issue.web.reporter.csproj && \
dotnet build "./epicmorg.jira.issue.web.reporter.csproj" -c Release -o /app/build
ENV DOTNET_CLI_TELEMETRY_OPTOUT=true
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
ARG DOTNET_VER=net8.0

COPY ["./src", "/tmp/src"]

WORKDIR /tmp/src

RUN cd /tmp/src && \
mkdir -p /app/publish && \
dotnet publish -p:PublishProfile=linux-x64 --force && \
rm -rfv /tmp/src/bin/Release/${DOTNET_VER}/linux-x64/publish/epicmorg.jira.issue.web.reporter.pdb && \
rm -rfv /tmp/src/bin/Release/${DOTNET_VER}/linux-x64/publish/appsettings.Development.json && \
cp -rfv /tmp/src/bin/Release/${DOTNET_VER}/linux-x64/publish/* /app/publish

##################################################################
##################################################################
##################################################################
# Main Final Layer
##################################################################
##################################################################
##################################################################
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim

FROM build AS publish
RUN dotnet publish "./epicmorg.jira.issue.web.reporter.csproj" -c Release -o /app/publish
LABEL maintainer="EpicMorg DevTeam, [email protected]"
LABEL org.opencontainers.image.vendor="EpicMorg DevTeam, [email protected]"
LABEL org.opencontainers.image.authors="STAM, kasthack, Aleks-Z"
LABEL org.opencontainers.image.source="https://github.com/EpicMorg/docker"
LABEL org.opencontainers.image.url="https://github.com/EpicMorg/docker"
LABEL donate.crypto.TON="EQDvHXRK-K1ZieJhgTD9JZQk7xCnWzRbctYnUkWq1lZq1bUg"
LABEL donate.crypto.ETH="0x26a8443a694f08cdfec966aa6fd72c45068753ec"
LABEL donate.crypto.BTC="bc1querz8ug9asjmsuy6yn4a94a2athgprnu7e5zq2"
LABEL donate.crypto.LTC="ltc1qtwwacq8f0n76fer2y83wxu540hddnmf8cdrlvg"
LABEL donate.crypto.NVC="4SbMynYETyhmKdggu8f38ULU6yQKiJPuo6"
LABEL donate.crypto.DOGE="DHyfE1CZzWtyaQiaMmv6g4KvXVQRUgrYE6"
LABEL donate.crypto.PPC="pQWArPzYoLppNe7ew3QPfto1k1eq66BYUB"
LABEL donate.crypto.RVN="R9t2LKeLhDSZBKNgUzSDZAossA3UqNvbV3"
LABEL donate.crypto.ZEC="t1KRMMmwMSZth8vJcd2ZHtPEFKTQ74yVixE"
LABEL donate.crypto.XMR="884PqZ1gDjWW7fKxtbaeRoBeSh9EGZbkqUyLriWmuKbwLZrAJdYUs4wQxoVfEJoW7LBhdQMP9cFhZQpJr6xvg7esHLdCbb1"
ARG DEBIAN_FRONTEND=noninteractive

##################################################################
# Copy compilled app from dev stage and prepare
##################################################################
ENV DOTNET_CLI_TELEMETRY_OPTOUT=true
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "epicmorg.jira.issue.web.reporter.dll"]
COPY --from=build /app/publish .

EXPOSE 5000
EXPOSE 80
EXPOSE 443
EXPOSE 80

##################################################################
# Run app in foreground
##################################################################
ENTRYPOINT ["dotnet", "epicmorg.jira.issue.web.reporter.dll"]
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#version: '3'
services:
app:
image: "jira-issue-web-reporter-docker"
image: "epicmorg/jira-issue-web-reporter-docker:develop"
build:
context: .
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions src/Properties/PublishProfiles/linux-arm.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>

<!--target runtime-->
<PublishDir>bin\Release\net8.0\linux-arm\publish\</PublishDir>
<RuntimeIdentifier>linux-arm</RuntimeIdentifier>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions src/Properties/PublishProfiles/linux-arm.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>
11 changes: 11 additions & 0 deletions src/Properties/PublishProfiles/linux-arm64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>

<!--target runtime-->
<PublishDir>bin\Release\net8.0\linux-arm64\publish\</PublishDir>
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions src/Properties/PublishProfiles/linux-arm64.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>
11 changes: 11 additions & 0 deletions src/Properties/PublishProfiles/linux-bionic-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>

<!--target runtime-->
<PublishDir>bin\Release\net8.0\linux-bionic-x64\publish\</PublishDir>
<RuntimeIdentifier>linux-bionic-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions src/Properties/PublishProfiles/linux-bionic-x64.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>
11 changes: 11 additions & 0 deletions src/Properties/PublishProfiles/linux-musl-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>

<!--target runtime-->
<PublishDir>bin\Release\net8.0\linux-musl-x64\publish\</PublishDir>
<RuntimeIdentifier>linux-musl-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions src/Properties/PublishProfiles/linux-musl-x64.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>
11 changes: 11 additions & 0 deletions src/Properties/PublishProfiles/linux-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>

<!--target runtime-->
<PublishDir>bin\Release\net8.0\linux-x64\publish\</PublishDir>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions src/Properties/PublishProfiles/linux-x64.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>
11 changes: 11 additions & 0 deletions src/Properties/PublishProfiles/osx-arm64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>

<!--target runtime-->
<PublishDir>bin\Release\net8.0\osx-arm64\publish\</PublishDir>
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions src/Properties/PublishProfiles/osx-arm64.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>
11 changes: 11 additions & 0 deletions src/Properties/PublishProfiles/osx-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>

<!--target runtime-->
<PublishDir>bin\Release\net8.0\osx-x64\publish\</PublishDir>
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions src/Properties/PublishProfiles/osx-x64.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>
11 changes: 11 additions & 0 deletions src/Properties/PublishProfiles/win-arm64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>

<!--target runtime-->
<PublishDir>bin\Release\net8.0\win-arm64\publish\</PublishDir>
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions src/Properties/PublishProfiles/win-arm64.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>
11 changes: 11 additions & 0 deletions src/Properties/PublishProfiles/win-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>

<!--target runtime-->
<PublishDir>bin\Release\net8.0\win-x64\publish\</PublishDir>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>
10 changes: 10 additions & 0 deletions src/Properties/PublishProfiles/win-x64.pubxml.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>False|2024-09-05T13:09:39.8829432Z||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
11 changes: 11 additions & 0 deletions src/Properties/PublishProfiles/win-x86.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>

<!--target runtime-->
<PublishDir>bin\Release\net8.0\win-x86\publish\</PublishDir>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions src/Properties/PublishProfiles/win-x86.pubxml.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
58 changes: 58 additions & 0 deletions src/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
SET DOTNET_CLI_TELEMETRY_OPTOUT=true
SET DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true

dotnet.exe publish -p:PublishProfile=win-x64 --force
dotnet.exe publish -p:PublishProfile=win-x86 --force
dotnet.exe publish -p:PublishProfile=win-arm64 --force
dotnet.exe publish -p:PublishProfile=osx-x64 --force
dotnet.exe publish -p:PublishProfile=osx-arm64 --force
dotnet.exe publish -p:PublishProfile=linux-x64 --force
dotnet.exe publish -p:PublishProfile=linux-musl-x64 --force
dotnet.exe publish -p:PublishProfile=linux-arm --force
dotnet.exe publish -p:PublishProfile=linux-arm64 --force
dotnet.exe publish -p:PublishProfile=linux-bionic-x64 --force

del /F bin\\Release\\net8.0\\win-x64\\publish\\epicmorg.jira.issue.web.reporter.pdb
del /F bin\\Release\\net8.0\\win-x86\\publish\\epicmorg.jira.issue.web.reporter.pdb
del /F bin\\Release\\net8.0\\win-arm64\\publish\\epicmorg.jira.issue.web.reporter.pdb
del /F bin\\Release\\net8.0\\osx-x64\\publish\\epicmorg.jira.issue.web.reporter.pdb
del /F bin\\Release\\net8.0\\osx-arm64\\publish\\epicmorg.jira.issue.web.reporter.pdb
del /F bin\\Release\\net8.0\\linux-x64\\publish\\epicmorg.jira.issue.web.reporter.pdb
del /F bin\\Release\\net8.0\\linux-musl-x64\\publish\\epicmorg.jira.issue.web.reporter.pdb
del /F bin\\Release\\net8.0\\linux-arm\\publish\\epicmorg.jira.issue.web.reporter.pdb
del /F bin\\Release\\net8.0\\linux-arm64\\publish\\epicmorg.jira.issue.web.reporter.pdb
del /F bin\\Release\\net8.0\\linux-bionic-x64\\publish\\epicmorg.jira.issue.web.reporter.pdb

del /F bin\\Release\\net8.0\\win-x64\\publish\\appsettings.Development.json
del /F bin\\Release\\net8.0\\win-x86\\publish\\appsettings.Development.json
del /F bin\\Release\\net8.0\\win-arm64\\publish\\appsettings.Development.json
del /F bin\\Release\\net8.0\\osx-x64\\publish\\appsettings.Development.json
del /F bin\\Release\\net8.0\\osx-arm64\\publish\\appsettings.Development.json
del /F bin\\Release\\net8.0\\linux-x64\\publish\\appsettings.Development.json
del /F bin\\Release\\net8.0\\linux-musl-x64\\publish\\appsettings.Development.json
del /F bin\\Release\\net8.0\\linux-arm\\publish\\appsettings.Development.json
del /F bin\\Release\\net8.0\\linux-arm64\\publish\\appsettings.Development.json
del /F bin\\Release\\net8.0\\linux-bionic-x64\\publish\\appsettings.Development.json

type nul > bin/Release/net8.0/win-x64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/win-x86/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/win-arm64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/osx-x64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/osx-arm64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/linux-x64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/linux-musl-x64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/linux-arm/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/linux-arm64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/linux-bionic-x64/publish/createdump.exe.ignore

7z a -tzip -mx5 -r0 ./bin/epicmorg.jira.issue.web.reporter-net8.0-win-x64.zip ./bin/Release/net8.0/win-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/epicmorg.jira.issue.web.reporter-net8.0-win-x86.zip ./bin/Release/net8.0/win-x86/publish/*
7z a -tzip -mx5 -r0 ./bin/epicmorg.jira.issue.web.reporter-net8.0-win-arm64.zip ./bin/Release/net8.0/win-arm64/publish/*
7z a -tzip -mx5 -r0 ./bin/epicmorg.jira.issue.web.reporter-net8.0-osx-x64.zip ./bin/Release/net8.0/osx-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/epicmorg.jira.issue.web.reporter-net8.0-osx-arm64.zip ./bin/Release/net8.0/osx-arm64/publish/*
7z a -tzip -mx5 -r0 ./bin/epicmorg.jira.issue.web.reporter-net8.0-linux-x64.zip ./bin/Release/net8.0/linux-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/epicmorg.jira.issue.web.reporter-net8.0-linux-musl-x64.zip ./bin/Release/net8.0/linux-musl-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/epicmorg.jira.issue.web.reporter-net8.0-linux-arm.zip ./bin/Release/net8.0/linux-arm/publish/*
7z a -tzip -mx5 -r0 ./bin/epicmorg.jira.issue.web.reporter-net8.0-linux-arm64.zip ./bin/Release/net8.0/linux-arm64/publish/*
7z a -tzip -mx5 -r0 ./bin/epicmorg.jira.issue.web.reporter-net8.0-linux-bionic-x64.zip ./bin/Release/net8.0/linux-bionic-x64/publish/*

Loading

0 comments on commit ce30acb

Please sign in to comment.