Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release-dev #185

Merged
merged 26 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
49fc553
Merge pull request #164 from pagopa/release-uat
andrea-putzu Dec 15, 2023
662e470
[SELC-3492] Set resource request and limits - PROD (#168)
Krusty93 Jan 3, 2024
83924e9
[EC-135] Add Terraform configuration to manage repository settings (#…
Krusty93 Feb 9, 2024
fe7d532
[EC-156] Add pnpg release workflow (#173)
Krusty93 Feb 12, 2024
83612c6
[EC-156] Fix typo in workflow file name (#174)
Krusty93 Feb 12, 2024
6ba82b5
[SELC-4256] feat: modify nationalRegistriesConnector response managem…
giulia-tremolada Feb 28, 2024
69e8564
ops: disable log health check (#177)
manuraf Feb 28, 2024
9fdaf89
ops: disable log health check
manuraf Feb 28, 2024
2d786cc
Merge branch 'release-uat' into release-dev
manuraf Feb 28, 2024
ee14b36
fix: Update pipeline
andrea-putzu Feb 29, 2024
2012f43
Merge pull request #179 from pagopa/release-uat
andrea-putzu Mar 1, 2024
5176153
[SELC-3954] ops: using a common GitHub Action Swagger update (#180)
manuraf Mar 4, 2024
b867c63
fix: Update pipeline
andrea-putzu Mar 6, 2024
fcf7cf9
fix: Update pipeline
andrea-putzu Mar 6, 2024
2465078
Merge pull request #181 from pagopa/update-log-ftp
andrea-putzu Mar 6, 2024
a3c0af2
fix: Update pipeline
andrea-putzu Mar 6, 2024
110ebcc
fix: Update pipeline
andrea-putzu Mar 6, 2024
68b2328
[EC-125] Add Container App infrastructure (#175)
Krusty93 Mar 12, 2024
6993663
[EC-125] fix: added JWT_TOKEN_PUBLIC_KEY as secret (#182)
manuraf Mar 13, 2024
43ded57
[SELC-4512] Added apim group BFF proxy for ca (#183)
manuraf Mar 15, 2024
27ed982
chore: deployment k8s replica 0 dev (#184)
manuraf Mar 18, 2024
65ee5b1
Merge branch 'main' into release-dev
manuraf Mar 18, 2024
7d1164d
chore: fix private_dns_name pnpg
manuraf Mar 18, 2024
22ec3f9
chore: added geotaxonomy-api-key secret
manuraf Mar 18, 2024
09c98e5
chore: create release pipeline
manuraf Mar 19, 2024
170404f
Merge branch 'release-uat' into release-dev
manuraf Mar 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devops/code-review-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ steps:
displayName: 'download settings.xml for Maven'
name: settingsxml
inputs:
secureFile: '$(SETTINGS_XML_RW_SECURE_FILE_NAME)'
secureFile: '$(SETTINGS_XML_RO_SECURE_FILE_NAME)'
retryCount: '2'
- task: Maven@4
inputs:
Expand Down
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**/.dockerignore
**/.git
**/bin
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
43 changes: 43 additions & 0 deletions .github/workflows/create_release_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Create Release branch

on:
workflow_dispatch:
inputs:
version-bump:
required: false
type: choice
options:
- major
- minor
- patch
default: patch
description: 'Major, Minor, or Patch version bump'

jobs:
create_branch:
name: 'Create Release Branch'
runs-on: ubuntu-20.04
permissions:
contents: write
actions: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:

- name: Create Release Branch
uses: pagopa/selfcare-commons/github-actions-template/create-release@main
with:
version_bump: ${{ inputs.version-bump }}
github_path_token: ${{ secrets.GH_PAT_VARIABLES }}

- name: Trigger release ms UAT Release
run: |
gh workflow run release_ms.yml \
--ref $NEW_BRANCH_NAME

- name: Trigger PNPG release ms UAT Release
run: |
gh workflow run release_ms_pnpg.yml \
--ref $NEW_BRANCH_NAME

37 changes: 37 additions & 0 deletions .github/workflows/pr_ms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Code Review ms-party-registry-proxy
on:
workflow_dispatch:

pull_request:
types:
- synchronize
- reopened
- ready_for_review
paths:
- '.github/workflows/pr_ms.yml'
- '.github/workflows/release_ms.yml'
- '.github/workflows/release_ms_pnpg.yml'
- '!.devops/**'
- '!helm/**'
- '!**.md'
- '!**ignore'
- '!infra/**'
- '!.terraform-version'
- '!CODEOWNERS'

jobs:

code_review:
uses: pagopa/selfcare-commons/.github/workflows/call_code_review_spring.yml@main
name: 'Code Review'
secrets: inherit
if: github.base_ref == 'main' && github.event_name == 'pull_request'
with:
pr_number: ${{ github.event.pull_request.number }}
source_branch: ${{ github.head_ref }}
target_branch: ${{ github.base_ref }}
sonar_key: 'pagopa_selfcare-ms-party-registry-proxy'

docker_build:
uses: pagopa/selfcare-commons/.github/workflows/call_code_review_docker.yml@main
name: 'Docker'
57 changes: 57 additions & 0 deletions .github/workflows/release_ms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release - ms-party-registry-proxy

on:
workflow_dispatch:
inputs:
env:
type: choice
description: Environment
options:
- dev
- uat
- prod

push:
branches:
- main
- releases/*
paths:
- '!.devops/**'
- '!helm/**'
- '!**.md'
- '!**ignore'
- '!infra/**'
- '!.terraform-version'
- '!CODEOWNERS'

jobs:

release_dev:
uses: pagopa/selfcare-commons/.github/workflows/call_release_docker.yml@main
name: '[Dev] PartyRegistryProxy ms Release'
if: ${{ (startsWith(github.ref_name, 'releases/') != true && inputs.env == null) || inputs.env == 'dev' }}
secrets: inherit
with:
environment: dev
tf_environment: dev
dir: 'infra/container_apps'

release_uat:
uses: pagopa/selfcare-commons/.github/workflows/call_release_docker.yml@main
name: '[UAT] PartyRegistryProxy ms Release'
if: ${{ (startsWith(github.ref_name, 'releases/') == true && inputs.env == null) || inputs.env == 'uat' }}
secrets: inherit
with:
environment: uat
tf_environment: uat
dir: 'infra/container_apps'

release_prod:
uses: pagopa/selfcare-commons/.github/workflows/call_release_docker.yml@main
name: '[Prod] PartyRegistryProxy ms Release'
if: ${{ inputs.env == 'prod' }}
secrets: inherit
with:
environment: prod
tf_environment: prod
dir: 'infra/container_apps'
57 changes: 57 additions & 0 deletions .github/workflows/release_ms_pnpg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release - PNPG ms-party-registry-proxy

on:
workflow_dispatch:
inputs:
env:
type: choice
description: Environment
options:
- dev
- uat
- prod

push:
branches:
- main
- releases/*
paths:
- '!.devops/**'
- '!helm/**'
- '!**.md'
- '!**ignore'
- '!infra/**'
- '!.terraform-version'
- '!CODEOWNERS'

jobs:

release_dev:
uses: pagopa/selfcare-commons/.github/workflows/call_release_docker.yml@main
name: '[Dev] PartyRegistryProxy ms Release'
if: ${{ (startsWith(github.ref_name, 'releases/') != true && inputs.env == null) || inputs.env == 'dev' }}
secrets: inherit
with:
environment: dev
tf_environment: dev-pnpg
dir: 'infra/container_apps'

release_uat:
uses: pagopa/selfcare-commons/.github/workflows/call_release_docker.yml@main
name: '[UAT] PartyRegistryProxy ms Release'
if: ${{ (startsWith(github.ref_name, 'releases/') == true && inputs.env == null) || inputs.env == 'uat' }}
secrets: inherit
with:
environment: uat
tf_environment: uat-pnpg
dir: 'infra/container_apps'

release_prod:
uses: pagopa/selfcare-commons/.github/workflows/call_release_docker.yml@main
name: '[Prod] PartyRegistryProxy ms Release'
if: ${{ inputs.env == 'prod' }}
secrets: inherit
with:
environment: prod
tf_environment: prod-pnpg
dir: 'infra/container_apps'
47 changes: 11 additions & 36 deletions .github/workflows/release_open_api.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,21 @@
name: Swagger Update
name: Swagger Detect Conflict and Update
on:
pull_request:
branches:
- release-dev
types: [ opened, synchronize, reopened ]
workflow_dispatch: #allow to run github action manually
permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
swagger_conflict_update:
runs-on: ubuntu-20.04
permissions: write-all
#if: github.event.pull_request.merged == true
name: Swagger Detect Conflict and Update
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Check out HEAD revision
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ github.head_ref }}
path: head
- name: Check out BASE revision
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: release-dev
path: base
- name: Build with Maven
run: mvn test -Dtest=SwaggerConfigTest#swaggerSpringPlugin -DfailIfNoTests=false
- name: Run OpenAPI Diff (from HEAD revision)
uses: mvegter/openapi-diff-action@72cde50f8d3a75f770f08e23b815d5ebe69ff757
with:
head-spec: head/app/src/main/resources/swagger/api-docs.json
base-spec: base/app/src/main/resources/swagger/api-docs.json
- name: Commit api-docs
run: |
git ls-files ./app** | grep 'api-docs*' | xargs git add
git config --global user.email "[email protected]"
git config --global user.name "selfcare-github-bot"
git commit -m "Update Swagger documentation" || exit 0
git push origin ${{ github.ref_name}}
- id: swagger-conflict-update
uses: pagopa/selfcare-commons/github-actions-template/swagger-detect-conflict-spring@main
with:
path_openapi_docs: app/src/main/resources/swagger/api-docs.json
branch_ref: release-dev
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,12 @@ build/
### VS Code ###
.vscode/
.DS_Store

**/.terraform/*
*.tfstate
*.tfstate.*
**/.tfsec/*
override.tf
override.tf.json
*_override.tf
*_override.tf.json
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.86.0
hooks:
- id: terraform_fmt
- id: terraform_docs
- id: terraform_validate
args:
- --args=-json
- --args=-no-color
1 change: 1 addition & 0 deletions .terraform-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.6.6
24 changes: 24 additions & 0 deletions Dockerfile.new
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM maven:3-eclipse-temurin-17 AS builder

COPY . .

RUN mvn clean package -DskipTests=true

FROM openjdk:17-jdk AS runtime

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'

WORKDIR /app

COPY --from=builder ./target/*.jar ./app.jar

ADD https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.2.11/applicationinsights-agent-3.2.11.jar ./applicationinsights-agent.jar
RUN chmod 755 ./applicationinsights-agent.jar

RUN chown -R 1001:1001 /app
RUN chmod 755 /app
USER 1001

EXPOSE 8080

ENTRYPOINT ["java", "-jar", "app.jar"]
Loading
Loading