Pedrollo plugins
This commit is contained in:
@@ -13,6 +13,13 @@ concurrency:
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
customer:
|
||||
- name: Morska
|
||||
plugin_project: DiunaBI.Plugins.Morska
|
||||
- name: PedrolloPL
|
||||
plugin_project: DiunaBI.Plugins.PedrolloPL
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
@@ -27,7 +34,7 @@ jobs:
|
||||
run: |
|
||||
dotnet restore DiunaBI.API/DiunaBI.API.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
|
||||
|
||||
- name: Build solution and prepare plugins
|
||||
@@ -37,10 +44,10 @@ jobs:
|
||||
# Build only required projects — skip DiunaBI.UI.Mobile
|
||||
dotnet build DiunaBI.API/DiunaBI.API.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
|
||||
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
|
||||
|
||||
- name: Run Tests
|
||||
@@ -49,7 +56,7 @@ jobs:
|
||||
dotnet test DiunaBI.Tests/DiunaBI.Tests.csproj \
|
||||
--configuration Release \
|
||||
--no-restore \
|
||||
--logger "trx;LogFileName=test-results.trx" \
|
||||
--logger "trx;LogFileName=test-results-${{ matrix.customer.name }}.trx" \
|
||||
--collect:"XPlat Code Coverage" \
|
||||
--filter "Category!=LocalOnly" || true
|
||||
|
||||
@@ -57,7 +64,7 @@ jobs:
|
||||
uses: https://github.com/actions/upload-artifact@v3
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: test-results
|
||||
name: test-results-${{ matrix.customer.name }}
|
||||
path: |
|
||||
DiunaBI.Tests/TestResults/*.trx
|
||||
DiunaBI.Tests/TestResults/**/coverage.cobertura.xml
|
||||
@@ -67,7 +74,16 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
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:
|
||||
- name: Debug secrets
|
||||
run: |
|
||||
@@ -76,7 +92,7 @@ jobs:
|
||||
env:
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
|
||||
- name: Checkout code
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
@@ -93,9 +109,10 @@ jobs:
|
||||
docker buildx build \
|
||||
--platform linux/amd64 \
|
||||
--label "org.opencontainers.image.source=https://code.bim-it.pl/mz/DiunaBI" \
|
||||
--build-arg PLUGIN_PROJECT=${{ matrix.customer.plugin_project }} \
|
||||
-f DiunaBI.API/Dockerfile \
|
||||
-t code.bim-it.pl/mz/diunabi-api: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 }}:latest \
|
||||
-t code.bim-it.pl/mz/diunabi-api-${{ matrix.customer.image_suffix }}:build-${{ github.run_id }} \
|
||||
--push \
|
||||
.
|
||||
|
||||
@@ -106,25 +123,26 @@ jobs:
|
||||
--platform linux/amd64 \
|
||||
--label "org.opencontainers.image.source=https://code.bim-it.pl/mz/DiunaBI" \
|
||||
-f DiunaBI.UI.Web/Dockerfile \
|
||||
-t code.bim-it.pl/mz/diunabi-ui: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 }}:latest \
|
||||
-t code.bim-it.pl/mz/diunabi-ui-${{ matrix.customer.image_suffix }}:build-${{ github.run_id }} \
|
||||
--push \
|
||||
.
|
||||
|
||||
- name: Output build info
|
||||
run: |
|
||||
echo "## 🐳 Docker Images Built" >> $GITHUB_STEP_SUMMARY
|
||||
echo "## 🐳 Docker Images Built - ${{ matrix.customer.name }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Build ID:** ${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Commit:** ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Customer:** ${{ matrix.customer.name }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "### Images pushed:" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```bash' >> $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-ui: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-${{ matrix.customer.image_suffix }}:latest" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $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-ui: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-${{ matrix.customer.image_suffix }}:build-${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
Reference in New Issue
Block a user