Pedrollo plugins
This commit is contained in:
@@ -13,6 +13,13 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
customer:
|
||||||
|
- name: Morska
|
||||||
|
plugin_project: DiunaBI.Plugins.Morska
|
||||||
|
- name: PedrolloPL
|
||||||
|
plugin_project: DiunaBI.Plugins.PedrolloPL
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
@@ -27,7 +34,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
dotnet restore DiunaBI.API/DiunaBI.API.csproj
|
dotnet restore DiunaBI.API/DiunaBI.API.csproj
|
||||||
dotnet restore DiunaBI.UI.Web/DiunaBI.UI.Web.csproj
|
dotnet restore DiunaBI.UI.Web/DiunaBI.UI.Web.csproj
|
||||||
dotnet restore DiunaBI.Plugins.Morska/DiunaBI.Plugins.Morska.csproj
|
dotnet restore ${{ matrix.customer.plugin_project }}/${{ matrix.customer.plugin_project }}.csproj
|
||||||
dotnet restore DiunaBI.Tests/DiunaBI.Tests.csproj
|
dotnet restore DiunaBI.Tests/DiunaBI.Tests.csproj
|
||||||
|
|
||||||
- name: Build solution and prepare plugins
|
- name: Build solution and prepare plugins
|
||||||
@@ -37,10 +44,10 @@ jobs:
|
|||||||
# Build only required projects — skip DiunaBI.UI.Mobile
|
# Build only required projects — skip DiunaBI.UI.Mobile
|
||||||
dotnet build DiunaBI.API/DiunaBI.API.csproj --configuration Release
|
dotnet build DiunaBI.API/DiunaBI.API.csproj --configuration Release
|
||||||
dotnet build DiunaBI.UI.Web/DiunaBI.UI.Web.csproj --configuration Release
|
dotnet build DiunaBI.UI.Web/DiunaBI.UI.Web.csproj --configuration Release
|
||||||
dotnet build DiunaBI.Plugins.Morska/DiunaBI.Plugins.Morska.csproj --configuration Release
|
dotnet build ${{ matrix.customer.plugin_project }}/${{ matrix.customer.plugin_project }}.csproj --configuration Release
|
||||||
|
|
||||||
mkdir -p DiunaBI.Tests/bin/Release/net10.0/Plugins
|
mkdir -p DiunaBI.Tests/bin/Release/net10.0/Plugins
|
||||||
cp DiunaBI.Plugins.Morska/bin/Release/net10.0/DiunaBI.Plugins.Morska.dll DiunaBI.Tests/bin/Release/net10.0/Plugins/ || true
|
cp ${{ matrix.customer.plugin_project }}/bin/Release/net10.0/${{ matrix.customer.plugin_project }}.dll DiunaBI.Tests/bin/Release/net10.0/Plugins/ || true
|
||||||
ls -la DiunaBI.Tests/bin/Release/net10.0/Plugins/ || true
|
ls -la DiunaBI.Tests/bin/Release/net10.0/Plugins/ || true
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
@@ -49,7 +56,7 @@ jobs:
|
|||||||
dotnet test DiunaBI.Tests/DiunaBI.Tests.csproj \
|
dotnet test DiunaBI.Tests/DiunaBI.Tests.csproj \
|
||||||
--configuration Release \
|
--configuration Release \
|
||||||
--no-restore \
|
--no-restore \
|
||||||
--logger "trx;LogFileName=test-results.trx" \
|
--logger "trx;LogFileName=test-results-${{ matrix.customer.name }}.trx" \
|
||||||
--collect:"XPlat Code Coverage" \
|
--collect:"XPlat Code Coverage" \
|
||||||
--filter "Category!=LocalOnly" || true
|
--filter "Category!=LocalOnly" || true
|
||||||
|
|
||||||
@@ -57,7 +64,7 @@ jobs:
|
|||||||
uses: https://github.com/actions/upload-artifact@v3
|
uses: https://github.com/actions/upload-artifact@v3
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
with:
|
with:
|
||||||
name: test-results
|
name: test-results-${{ matrix.customer.name }}
|
||||||
path: |
|
path: |
|
||||||
DiunaBI.Tests/TestResults/*.trx
|
DiunaBI.Tests/TestResults/*.trx
|
||||||
DiunaBI.Tests/TestResults/**/coverage.cobertura.xml
|
DiunaBI.Tests/TestResults/**/coverage.cobertura.xml
|
||||||
@@ -67,6 +74,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
needs: test
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
customer:
|
||||||
|
- name: Morska
|
||||||
|
plugin_project: DiunaBI.Plugins.Morska
|
||||||
|
image_suffix: morska
|
||||||
|
- name: PedrolloPL
|
||||||
|
plugin_project: DiunaBI.Plugins.PedrolloPL
|
||||||
|
image_suffix: pedrollopl
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Debug secrets
|
- name: Debug secrets
|
||||||
@@ -93,9 +109,10 @@ jobs:
|
|||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--label "org.opencontainers.image.source=https://code.bim-it.pl/mz/DiunaBI" \
|
--label "org.opencontainers.image.source=https://code.bim-it.pl/mz/DiunaBI" \
|
||||||
|
--build-arg PLUGIN_PROJECT=${{ matrix.customer.plugin_project }} \
|
||||||
-f DiunaBI.API/Dockerfile \
|
-f DiunaBI.API/Dockerfile \
|
||||||
-t code.bim-it.pl/mz/diunabi-api:latest \
|
-t code.bim-it.pl/mz/diunabi-api-${{ matrix.customer.image_suffix }}:latest \
|
||||||
-t code.bim-it.pl/mz/diunabi-api:build-${{ github.run_id }} \
|
-t code.bim-it.pl/mz/diunabi-api-${{ matrix.customer.image_suffix }}:build-${{ github.run_id }} \
|
||||||
--push \
|
--push \
|
||||||
.
|
.
|
||||||
|
|
||||||
@@ -106,25 +123,26 @@ jobs:
|
|||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--label "org.opencontainers.image.source=https://code.bim-it.pl/mz/DiunaBI" \
|
--label "org.opencontainers.image.source=https://code.bim-it.pl/mz/DiunaBI" \
|
||||||
-f DiunaBI.UI.Web/Dockerfile \
|
-f DiunaBI.UI.Web/Dockerfile \
|
||||||
-t code.bim-it.pl/mz/diunabi-ui:latest \
|
-t code.bim-it.pl/mz/diunabi-ui-${{ matrix.customer.image_suffix }}:latest \
|
||||||
-t code.bim-it.pl/mz/diunabi-ui:build-${{ github.run_id }} \
|
-t code.bim-it.pl/mz/diunabi-ui-${{ matrix.customer.image_suffix }}:build-${{ github.run_id }} \
|
||||||
--push \
|
--push \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Output build info
|
- name: Output build info
|
||||||
run: |
|
run: |
|
||||||
echo "## 🐳 Docker Images Built" >> $GITHUB_STEP_SUMMARY
|
echo "## 🐳 Docker Images Built - ${{ matrix.customer.name }}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**Build ID:** ${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
|
echo "**Build ID:** ${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**Commit:** ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
|
echo "**Commit:** ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "**Customer:** ${{ matrix.customer.name }}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "### Images pushed:" >> $GITHUB_STEP_SUMMARY
|
echo "### Images pushed:" >> $GITHUB_STEP_SUMMARY
|
||||||
echo '```bash' >> $GITHUB_STEP_SUMMARY
|
echo '```bash' >> $GITHUB_STEP_SUMMARY
|
||||||
echo "# Latest (for release)" >> $GITHUB_STEP_SUMMARY
|
echo "# Latest (for release)" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "docker pull code.bim-it.pl/mz/diunabi-api:latest" >> $GITHUB_STEP_SUMMARY
|
echo "docker pull code.bim-it.pl/mz/diunabi-api-${{ matrix.customer.image_suffix }}:latest" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "docker pull code.bim-it.pl/mz/diunabi-ui:latest" >> $GITHUB_STEP_SUMMARY
|
echo "docker pull code.bim-it.pl/mz/diunabi-ui-${{ matrix.customer.image_suffix }}:latest" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "# Specific build (for rollback)" >> $GITHUB_STEP_SUMMARY
|
echo "# Specific build (for rollback)" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "docker pull code.bim-it.pl/mz/diunabi-api:build-${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
|
echo "docker pull code.bim-it.pl/mz/diunabi-api-${{ matrix.customer.image_suffix }}:build-${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "docker pull code.bim-it.pl/mz/diunabi-ui:build-${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
|
echo "docker pull code.bim-it.pl/mz/diunabi-ui-${{ matrix.customer.image_suffix }}:build-${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
# Stage 1: Build
|
# Stage 1: Build
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||||
|
ARG PLUGIN_PROJECT=DiunaBI.Plugins.Morska
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
# Copy solution and all project files for restore
|
# Copy solution and all project files for restore
|
||||||
@@ -9,7 +10,7 @@ COPY DiunaBI.API/DiunaBI.API.csproj DiunaBI.API/
|
|||||||
COPY DiunaBI.Domain/DiunaBI.Domain.csproj DiunaBI.Domain/
|
COPY DiunaBI.Domain/DiunaBI.Domain.csproj DiunaBI.Domain/
|
||||||
COPY DiunaBI.Application/DiunaBI.Application.csproj DiunaBI.Application/
|
COPY DiunaBI.Application/DiunaBI.Application.csproj DiunaBI.Application/
|
||||||
COPY DiunaBI.Infrastructure/DiunaBI.Infrastructure.csproj DiunaBI.Infrastructure/
|
COPY DiunaBI.Infrastructure/DiunaBI.Infrastructure.csproj DiunaBI.Infrastructure/
|
||||||
COPY DiunaBI.Plugins.Morska/DiunaBI.Plugins.Morska.csproj DiunaBI.Plugins.Morska/
|
COPY ${PLUGIN_PROJECT}/${PLUGIN_PROJECT}.csproj ${PLUGIN_PROJECT}/
|
||||||
|
|
||||||
# Restore dependencies
|
# Restore dependencies
|
||||||
RUN dotnet restore DiunaBI.API/DiunaBI.API.csproj
|
RUN dotnet restore DiunaBI.API/DiunaBI.API.csproj
|
||||||
@@ -18,7 +19,7 @@ RUN dotnet restore DiunaBI.API/DiunaBI.API.csproj
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build plugin first
|
# Build plugin first
|
||||||
WORKDIR /DiunaBI.Plugins.Morska
|
WORKDIR /${PLUGIN_PROJECT}
|
||||||
RUN dotnet build -c Release
|
RUN dotnet build -c Release
|
||||||
|
|
||||||
# Build and publish API
|
# Build and publish API
|
||||||
@@ -27,7 +28,7 @@ RUN dotnet publish -c Release -o /app/publish --no-restore
|
|||||||
|
|
||||||
# Copy plugin DLL to publish output
|
# Copy plugin DLL to publish output
|
||||||
RUN mkdir -p /app/publish/Plugins && \
|
RUN mkdir -p /app/publish/Plugins && \
|
||||||
cp /DiunaBI.Plugins.Morska/bin/Release/net10.0/DiunaBI.Plugins.Morska.dll /app/publish/Plugins/
|
cp /${PLUGIN_PROJECT}/bin/Release/net10.0/${PLUGIN_PROJECT}.dll /app/publish/Plugins/
|
||||||
|
|
||||||
# Stage 2: Runtime
|
# Stage 2: Runtime
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
|
||||||
|
|||||||
17
DiunaBI.Plugins.PedrolloPL/DiunaBI.Plugins.PedrolloPL.csproj
Normal file
17
DiunaBI.Plugins.PedrolloPL/DiunaBI.Plugins.PedrolloPL.csproj
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.0" />
|
||||||
|
<PackageReference Include="Google.Apis.Sheets.v4" Version="1.68.0.3525" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\DiunaBI.Domain\DiunaBI.Domain.csproj" />
|
||||||
|
<ProjectReference Include="..\DiunaBI.Infrastructure\DiunaBI.Infrastructure.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user