Skip to content

Commit f84164d

Browse files
authored
fix: promote to main
fix: promote to main
2 parents 446cc83 + c20cc32 commit f84164d

File tree

9 files changed

+126
-32
lines changed

9 files changed

+126
-32
lines changed

.devops/code-review-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ steps:
4545
- task: Maven@3
4646
inputs:
4747
mavenPomFile: 'pom.xml'
48-
goals: 'clean org.jacoco:jacoco-maven-plugin:0.8.8:prepare-agent verify org.jacoco:jacoco-maven-plugin:0.8.8:report org.jacoco:jacoco-maven-plugin:0.8.8:report-aggregate '
48+
goals: 'clean org.jacoco:jacoco-maven-plugin:0.8.12:prepare-agent verify org.jacoco:jacoco-maven-plugin:0.8.12:report org.jacoco:jacoco-maven-plugin:0.8.12:report-aggregate '
4949
options: '-B'
5050
publishJUnitResults: true
5151
testResultsFiles: '**/surefire-reports/TEST-*.xml'
5252
javaHomeOption: 'JDKVersion'
53-
jdkVersionOption: '1.17'
53+
jdkVersionOption: '1.21'
5454
mavenVersionOption: 'Default'
5555
mavenAuthenticateFeed: false
5656
effectivePomSkip: false
@@ -67,7 +67,7 @@ steps:
6767
options: '-B -Dsonar.coverage.jacoco.xmlReportPaths=$(xmlReportPaths)'
6868
publishJUnitResults: false
6969
javaHomeOption: 'JDKVersion'
70-
jdkVersionOption: '1.17'
70+
jdkVersionOption: '1.21'
7171
mavenVersionOption: 'Default'
7272
mavenAuthenticateFeed: false
7373
effectivePomSkip: false

.github/workflows/anchore.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
environment: dev
3838
steps:
3939
- name: Checkout the code
40-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3.6.0
40+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #4.2.2
4141
- name: Build the Docker image
4242
run: docker build . --file ${{ env.DOCKERFILE }} --tag localbuild/testimage:latest
4343
- name: Run the Anchore Grype scan action
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: 📦 Flow Snapshot Docker
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- 'main'
7+
paths-ignore:
8+
- 'CODEOWNERS'
9+
- '**.md'
10+
- '.**'
11+
workflow_dispatch:
12+
inputs:
13+
docker_build_enabled:
14+
description: 'Enable Docker build'
15+
required: false
16+
default: 'true'
17+
azdo_trigger_enabled:
18+
description: 'Enable Azure DevOps trigger'
19+
required: false
20+
default: 'true'
21+
argocd_target_branch:
22+
description: 'argocd target branch name'
23+
required: false
24+
default: 'main'
25+
postman_branch:
26+
description: postman branch name'
27+
required: false
28+
default: 'release-dev'
29+
30+
env:
31+
# branch choosed by workflow_dispatch or by push event
32+
CURRENT_BRANCH: ${{ github.event.inputs.branch || github.ref_name }}
33+
34+
jobs:
35+
checkout:
36+
name: 🔖 Checkout Repository
37+
runs-on: ubuntu-22.04
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #4.2.2
41+
with:
42+
ref: ${{ env.CURRENT_BRANCH }}
43+
44+
docker-build:
45+
name: 📦 Docker Build and Push
46+
needs: checkout
47+
runs-on: ubuntu-22.04
48+
if: ${{ github.event_name == 'push' || github.event.inputs.docker_build_enabled == 'true' }}
49+
steps:
50+
- name: Checkout code
51+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #4.2.2
52+
with:
53+
ref: ${{ env.CURRENT_BRANCH }}
54+
55+
- name: Run Snapshot Docker Build/Push
56+
# https://github.com/pagopa/github-actions-template/releases/tag/v2.0.0
57+
uses: pagopa/github-actions-template/payments-flow-docker-snapshot@b825ee193430395706a4a7e580b8435bdded0227
58+
with:
59+
current_branch: ${{ github.ref_name }}
60+
61+
azure-devops-trigger:
62+
name: 🅰️ Azure DevOps Pipeline Trigger
63+
needs: docker-build
64+
runs-on: ubuntu-22.04
65+
if: |
66+
always() &&
67+
needs.docker-build.result != 'failure' &&
68+
github.event.inputs.azdo_trigger_enabled == 'true'
69+
steps:
70+
- name: Trigger Azure DevOps Pipeline
71+
# https://github.com/pagopa/github-actions-template/releases/tag/v2.1.0
72+
uses: pagopa/github-actions-template/azure-devops-trigger-pipeline@cad30356d9046af6e7b0cee43db4cf919cc408f9
73+
with:
74+
enable_azure_devops_step: 'true'
75+
azure_devops_project_url: 'https://dev.azure.com/pagopaspa/idpay-itn-projects'
76+
azure_devops_pipeline_name: 'idpay-deploy-aks.deploy'
77+
azure_devops_pat: ${{ secrets.AZURE_DEVOPS_TOKEN }}
78+
azure_template_parameters: |
79+
{
80+
"APPS_TOP": "[idpay-transactions]",
81+
"APPS_MID": "[]",
82+
"APPS_EXT": "[]",
83+
"ARGOCD_TARGET_BRANCH": "${{ github.event.inputs.argocd_target_branch }}",
84+
"POSTMAN_BRANCH": "${{ github.event.inputs.postman_branch }}",
85+
"TRIGGER_MESSAGE": "idpay-transactions"
86+
}
87+
88+

.github/workflows/release.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
11
name: Release
22

33
on:
4-
# Trigger the workflow on push or pull request,
5-
# but only for the main branch
4+
# Trigger the workflow on push on the main branch
65
push:
76
branches:
87
- main
98
paths-ignore:
10-
- "CODEOWNERS"
11-
- "**.md"
12-
- ".**"
9+
- 'CODEOWNERS'
10+
- '**.md'
11+
- '.**'
12+
13+
permissions:
14+
packages: write
15+
contents: write
16+
1317

1418
jobs:
15-
release:
16-
name: Release
17-
runs-on: ubuntu-latest
19+
checkout:
20+
name: 🔖 Checkout Repository
21+
runs-on: ubuntu-22.04
1822
steps:
19-
- name: Checkout
20-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3.6.0
21-
with:
22-
persist-credentials: false
23-
fetch-depth: 0
24-
- name: Setup Node 20.x
25-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d #v3.8.1
23+
- name: Checkout code
24+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
2625
with:
27-
node-version: 20
28-
- name: Release
29-
uses: cycjimmy/semantic-release-action@61680d0e9b02ff86f5648ade99e01be17f0260a4 #v4.0.0
26+
ref: ${{ github.ref_name }}
27+
28+
flow-release:
29+
name: 🚀 Release
30+
runs-on: ubuntu-22.04
31+
needs: checkout
32+
steps:
33+
- name: 🚀 release + docker
34+
# https://github.com/pagopa/github-actions-template/releases/tag/v2.1.1
35+
uses: pagopa/github-actions-template/payments-flow-release@e67e0ec4bb01d6cb5065e311ba0e1c92c49966a7
3036
with:
31-
extra_plugins: |
32-
semantic-release/release-notes-generator#c466b7165be2a0e5988676174e4bc244c991d669 #v11.0.7
33-
semantic-release/git#3e934d45f97fd07a63617c0fc098c9ed3e67d97a #v10.0.1
34-
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
current_branch: ${{ github.ref_name }}

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Build
33
#
4-
FROM maven:3.9.6-amazoncorretto-17-al2023@sha256:459be099faa25a32c06cd45ed1ef2bc9dbbf8a5414da4e72349459a1bb4d6166 AS buildtime
4+
FROM maven:3.9.9-amazoncorretto-21-al2023@sha256:281aeb7254dde09226bde36c2ce236ead71c6451298986a79fa542bc26444225 AS buildtime
55

66
WORKDIR /build
77
COPY . .
@@ -11,7 +11,7 @@ RUN mvn clean package -DskipTests
1111
#
1212
# Docker RUNTIME
1313
#
14-
FROM amazoncorretto:17-alpine3.20@sha256:38b44a49bfd11b925015b281d3d35c845daaeca5f0e3827f8e1df9bedf7b256a AS runtime
14+
FROM amazoncorretto:21-alpine3.20@sha256:ca05e809506b30f75a5b90f766b177e3ae996ac606b63499b4bd75b1b7890451 AS runtime
1515

1616
RUN apk --no-cache add shadow
1717
RUN useradd --uid 10000 runner
@@ -21,7 +21,7 @@ WORKDIR /app
2121

2222
COPY --from=buildtime /build/target/*.jar /app/app.jar
2323
# The agent is enabled at runtime via JAVA_TOOL_OPTIONS.
24-
ADD https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.7.0/applicationinsights-agent-3.7.0.jar /app/applicationinsights-agent.jar
24+
ADD https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.7.1/applicationinsights-agent-3.7.1.jar /app/applicationinsights-agent.jar
2525

2626
RUN chown -R runner:runner /app
2727

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<version>1.2.3</version>
1616

1717
<properties>
18-
<java.version>17</java.version>
18+
<java.version>21</java.version>
1919
</properties>
2020

2121
<dependencies>

src/main/java/it/gov/pagopa/idpay/transactions/controller/TransactionsControllerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ public Flux<RewardTransaction> findAll(String idTrxIssuer, String userId, LocalD
3131
throw new ClientExceptionWithBody(HttpStatus.BAD_REQUEST, ExceptionConstants.ExceptionCode.TRANSACTIONS_MISSING_MANDATORY_FILTERS,ExceptionConstants.ExceptionMessage.TRANSACTIONS_MISSING_MANDATORY_FILTERS);
3232
}
3333
}
34-
}
34+
35+
}

src/main/java/it/gov/pagopa/idpay/transactions/event/RewardTransactionConsumer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public class RewardTransactionConsumer {
1515

1616
@Bean
1717
public Consumer<Flux<Message<String>>> rewardTrxConsumer(PersistenceTransactionMediator persistenceTransactionMediator) {
18+
1819
return persistenceTransactionMediator::execute;
20+
1921
}
2022
}

src/main/java/it/gov/pagopa/idpay/transactions/service/MerchantTransactionServiceImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ private Mono<MerchantTransactionDTO> createMerchantTransactionDTO(String initiat
6969
.status(transaction.getStatus())
7070
.channel(transaction.getChannel())
7171
.build();
72+
7273
if (StringUtils.isNotBlank(fiscalCode)){
7374
out.setFiscalCode(fiscalCode);
7475
return Mono.just(out);

0 commit comments

Comments
 (0)