Skip to content

Commit d0911ec

Browse files
committed
Fixing build to be up to date with latest angular standard.
1 parent 2bf626f commit d0911ec

File tree

3 files changed

+34
-49
lines changed

3 files changed

+34
-49
lines changed

.github/workflows/dotnet-core-docker.yml

Lines changed: 26 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
run: docker network create --driver bridge --attachable data
6262
- name: Start MariaDB
6363
run: |
64-
docker pull mariadb:latest
64+
docker pull mariadb:10.8
6565
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:latest
6666
- name: Start rabbitmq
6767
run: |
@@ -70,7 +70,7 @@ jobs:
7070
- name: Use Node.js
7171
uses: actions/setup-node@v3
7272
with:
73-
node-version: '18.12.1'
73+
node-version: 20
7474
- name: yarn install
7575
run: cd eform-angular-frontend/eform-client && yarn install
7676
if: steps.cache.outputs.cache-hit != 'true'
@@ -99,6 +99,7 @@ jobs:
9999
spec: cypress/e2e/db/*
100100
config-file: cypress.config.ts
101101
working-directory: eform-angular-frontend/eform-client
102+
command-prefix: "--"
102103
- name: testheadless2${{matrix.test}}
103104
run: cd eform-angular-frontend/eform-client && npm run testheadless2${{matrix.test}}
104105
- name: Stop the newly build Docker container
@@ -112,15 +113,6 @@ jobs:
112113
if: ${{ failure() }}
113114
run: |
114115
cat docker_run_log
115-
- name: Notify slack fail
116-
if: ${{ failure() }}
117-
env:
118-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
119-
uses: voxmedia/github-action-slack-notify-build@v1
120-
with:
121-
channel_id: CC04FGH5K
122-
status: ${{matrix.test}} FAILED
123-
color: danger
124116
- name: Archive screenshot artifacts
125117
if: ${{ failure() }}
126118
uses: actions/upload-artifact@v3
@@ -146,7 +138,7 @@ jobs:
146138
run: docker network create --driver bridge --attachable data
147139
- name: Start MariaDB
148140
run: |
149-
docker pull mariadb:latest
141+
docker pull mariadb:10.8
150142
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:latest
151143
- name: Start rabbitmq
152144
run: |
@@ -155,7 +147,7 @@ jobs:
155147
- name: Setup .NET Core
156148
uses: actions/setup-dotnet@v3
157149
with:
158-
dotnet-version: 7.0.x
150+
dotnet-version: 8.0.x
159151
- name: Install dependencies
160152
run: dotnet restore eform-angular-frontend/eFormAPI/eFormAPI.sln
161153
- name: Build
@@ -218,7 +210,7 @@ jobs:
218210
run: docker network create --driver bridge --attachable data
219211
- name: Start MariaDB
220212
run: |
221-
docker pull mariadb:latest
213+
docker pull mariadb:10.8
222214
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:latest
223215
- name: Start rabbitmq
224216
run: |
@@ -232,7 +224,7 @@ jobs:
232224
- name: Use Node.js
233225
uses: actions/setup-node@v3
234226
with:
235-
node-version: '18.12.1'
227+
node-version: 20
236228
- name: 'Preparing Frontend checkout'
237229
uses: actions/checkout@v2
238230
with:
@@ -291,24 +283,15 @@ jobs:
291283
spec: cypress/e2e/db/*
292284
config-file: cypress.config.ts
293285
working-directory: eform-angular-frontend/eform-client
286+
command-prefix: "--"
294287
- name: Change rabbitmq hostname
295-
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
288+
run: docker exec -i mariadbtest mariadb -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
296289
- name: Plugin testing
297290
run: cd eform-angular-frontend/eform-client && npm run testheadlessplugin
298291
- name: The job has failed
299292
if: ${{ failure() }}
300293
run: |
301294
cat docker_run_log
302-
- name: Notify slack fail
303-
if: ${{ failure() }}
304-
env:
305-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
306-
uses: voxmedia/github-action-slack-notify-build@v1
307-
with:
308-
message_id: ${{ steps.slack.outputs.message_id }}
309-
channel_id: C017TF6Q46T
310-
status: FAILED
311-
color: danger
312295
- name: Archive screenshot artifacts
313296
if: ${{ failure() }}
314297
uses: actions/upload-artifact@v3
@@ -334,14 +317,14 @@ jobs:
334317
run: docker network create --driver bridge --attachable data
335318
- name: Start MariaDB
336319
run: |
337-
docker pull mariadb:latest
320+
docker pull mariadb:10.8
338321
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:latest
339322
- name: Sleep 15
340323
run: sleep 15
341324
- name: Setup .NET Core
342325
uses: actions/setup-dotnet@v3
343326
with:
344-
dotnet-version: 7.0.x
327+
dotnet-version: 8.0.x
345328
- name: Build
346329
run: dotnet build eform-angular-outer-inner-resource-plugin/eFormAPI/Plugins/OuterInnerResource.Pn/OuterInnerResource.Pn.sln
347330
- name: Unit Tests
@@ -359,7 +342,7 @@ jobs:
359342
- name: Setup .NET Core
360343
uses: actions/setup-dotnet@v3
361344
with:
362-
dotnet-version: 7.0.x
345+
dotnet-version: 8.0.x
363346
- name: Install dependencies
364347
run: dotnet restore eform-debian-service
365348
- name: Build
@@ -423,20 +406,20 @@ jobs:
423406
run: docker network create --driver bridge data
424407
- name: Start MariaDB
425408
run: |
426-
docker pull mariadb:latest
427-
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306 -d mariadb:latest
409+
docker pull mariadb:10.8
410+
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:latest
428411
- name: Start rabbitmq
429412
run: |
430413
docker pull rabbitmq:latest
431414
docker run -d --hostname my-rabbit --name some-rabbit --network data -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=password rabbitmq:latest
432415
- name: Load DB dump
433416
run: |
434-
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_SDK`'
435-
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_SDK < main/420_SDK.sql
436-
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-outer-inner-resource-plugin`'
437-
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-outer-inner-resource-plugin < main/420_eform-angular-outer-inner-resource-plugin.sql
417+
docker exec -i mariadbtest mariadb -u root --password=secretpassword -e 'create database `420_SDK`'
418+
docker exec -i mariadbtest mariadb -u root --password=secretpassword 420_SDK < main/420_SDK.sql
419+
docker exec -i mariadbtest mariadb -u root --password=secretpassword -e 'create database `420_eform-angular-outer-inner-resource-plugin`'
420+
docker exec -i mariadbtest mariadb -u root --password=secretpassword 420_eform-angular-outer-inner-resource-plugin < main/420_eform-angular-outer-inner-resource-plugin.sql
438421
- name: Change rabbitmq hostname
439-
run: docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
422+
run: docker exec -i mariadbtest mariadb -u root --password=secretpassword -e 'update 420_SDK.Settings set Value = "my-rabbit" where Name = "rabbitMqHost"'
440423
- name: Start the newly build Docker container
441424
id: docker-run
442425
run: docker run --name my-container --network data microtingas/outer-inner-resource-service-container:latest "/ConnectionString=host=mariadbtest;Database=420_SDK;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &
@@ -467,8 +450,8 @@ jobs:
467450
run: docker network create --driver bridge data
468451
- name: Start MariaDB
469452
run: |
470-
docker pull mariadb:latest
471-
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306 -d mariadb:latest
453+
docker pull mariadb:10.8
454+
docker run --name mariadbtest --network data -e MYSQL_ROOT_PASSWORD=secretpassword -p 3306:3306 -d mariadb:latest
472455
- name: Start rabbitmq
473456
run: |
474457
docker pull rabbitmq:latest
@@ -483,13 +466,13 @@ jobs:
483466
- name: Setup .NET Core
484467
uses: actions/setup-dotnet@v3
485468
with:
486-
dotnet-version: 7.0.x
469+
dotnet-version: 8.0.x
487470
- name: Load DB dump
488471
run: |
489-
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_SDK`'
490-
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_SDK < main/420_SDK.sql
491-
docker exec -i mariadbtest mysql -u root --password=secretpassword -e 'create database `420_eform-angular-outer-inner-resource-plugin`'
492-
docker exec -i mariadbtest mysql -u root --password=secretpassword 420_eform-angular-outer-inner-resource-plugin < main/420_eform-angular-outer-inner-resource-plugin.sql
472+
docker exec -i mariadbtest mariadb -u root --password=secretpassword -e 'create database `420_SDK`'
473+
docker exec -i mariadbtest mariadb -u root --password=secretpassword 420_SDK < main/420_SDK.sql
474+
docker exec -i mariadbtest mariadb -u root --password=secretpassword -e 'create database `420_eform-angular-outer-inner-resource-plugin`'
475+
docker exec -i mariadbtest mariadb -u root --password=secretpassword 420_eform-angular-outer-inner-resource-plugin < main/420_eform-angular-outer-inner-resource-plugin.sql
493476
- name: Install dependencies
494477
run: dotnet restore eform-service-outer-inner-resource-plugin
495478
- name: Build

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
FROM node:18.12.1 as node-env
1+
FROM node:20-bookworm-slim as node-env
22
WORKDIR /app
33
ENV PATH /app/node_modules/.bin:$PATH
44
COPY eform-angular-frontend/eform-client ./
5+
RUN apt-get update
6+
RUN apt-get -y -q install ca-certificates
57
RUN yarn install
6-
RUN npm run build
8+
RUN yarn build
79

8-
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
10+
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build-env
911
WORKDIR /app
1012
ARG GITVERSION
1113
ARG PLUGINVERSION
@@ -17,7 +19,7 @@ RUN dotnet publish eFormAPI.Web -o eFormAPI.Web/out /p:Version=$GITVERSION --run
1719
RUN dotnet publish OuterInnerResource.Pn -o OuterInnerResource.Pn/out /p:Version=$PLUGINVERSION --runtime linux-x64 --configuration Release
1820

1921
# Build runtime image
20-
FROM mcr.microsoft.com/dotnet/aspnet:7.0
22+
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy
2123
WORKDIR /app
2224
COPY --from=build-env /app/eFormAPI.Web/out .
2325
RUN mkdir -p ./Plugins/OuterInnerResource.Pn

Dockerfile-service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build-env
22
ARG GITVERSION
33
WORKDIR /app
44
ARG GITVERSION
@@ -14,7 +14,7 @@ RUN ls -lah out
1414
RUN ls -lah out/Plugins
1515

1616
# Build runtime image
17-
FROM mcr.microsoft.com/dotnet/aspnet:7.0
17+
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy
1818
WORKDIR /app
1919
COPY --from=build-env /app/out .
2020

0 commit comments

Comments
 (0)