Skip to content

Commit

Permalink
Merge release-uat (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuraf authored Mar 25, 2024
2 parents bb8391b + 5554f1b commit c231631
Show file tree
Hide file tree
Showing 13 changed files with 105 additions and 48 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/create_release_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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
id: create_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 ${{ steps.create_branch.outputs.new_branch_name }}
- name: Trigger PNPG release ms UAT Release
run: |
gh workflow run release_ms_pnpg.yml \
--ref ${{ steps.create_branch.outputs.new_branch_name }}
12 changes: 11 additions & 1 deletion .github/workflows/release_ms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,14 @@ jobs:
with:
environment: prod
tf_environment: prod
dir: 'infra/container_apps'
dir: 'infra/container_apps'

promote_release:
name: 'Promote prerelase release'
runs-on: ubuntu-20.04
needs: [release_prod]
steps:
- uses: pagopa/selfcare-commons/github-actions-template/promote-release@main
with:
github_path_token: ${{ secrets.GH_PAT_VARIABLES }}
release_version: ${{ vars.CURRENT_UAT_VERSION }}
49 changes: 12 additions & 37 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
types: [ opened, synchronize, reopened ]
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@f69f00b5e5324696b07f6b1c92f0470a6df00780
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
6 changes: 4 additions & 2 deletions helm/pnpg/values-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
replicaCount: 0

image:
repository: selcdcommonacr.azurecr.io/selfcareexternalapibackend

Expand All @@ -16,8 +18,8 @@ ingress:

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
minReplicas: 0
maxReplicas: 0
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

Expand Down
6 changes: 4 additions & 2 deletions helm/pnpg/values-uat.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
replicaCount: 0

image:
repository: selcucommonacr.azurecr.io/selfcareexternalapibackend
tag: 0.0.1-SNAPSHOT
Expand All @@ -17,8 +19,8 @@ ingress:

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
minReplicas: 0
maxReplicas: 0
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

Expand Down
6 changes: 3 additions & 3 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
replicaCount: 2
replicaCount: 0

image:
repository: selcdacr.azurecr.io/selfcareexternalapibackend
Expand Down Expand Up @@ -26,8 +26,8 @@ resources:

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
minReplicas: 0
maxReplicas: 0
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

Expand Down
6 changes: 3 additions & 3 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
replicaCount: 2
replicaCount: 0

image:
repository: selcuacr.azurecr.io/selfcareexternalapibackend
Expand Down Expand Up @@ -27,8 +27,8 @@ resources:

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
minReplicas: 0
maxReplicas: 0
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

Expand Down
4 changes: 4 additions & 0 deletions infra/container_apps/env/dev-pnpg/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ app_settings = [
{
name = "USERVICE_USER_REGISTRY_URL"
value = "https://api.uat.pdv.pagopa.it/user-registry/v1"
},
{
name = "USERVICE_PARTY_MANAGEMENT_URL"
value = "https://selc-d-pnpg-ms-core-ca.whiteglacier-211c4885.westeurope.azurecontainerapps.io"
}
]

Expand Down
4 changes: 4 additions & 0 deletions infra/container_apps/env/dev/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ app_settings = [
{
name = "USERVICE_USER_REGISTRY_URL"
value = "https://api.uat.pdv.pagopa.it/user-registry/v1"
},
{
name = "USERVICE_PARTY_MANAGEMENT_URL"
value = "https://selc-d-ms-core-ca.gentleflower-c63e62fe.westeurope.azurecontainerapps.io"
}
]

Expand Down
4 changes: 4 additions & 0 deletions infra/container_apps/env/prod-pnpg/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ app_settings = [
{
name = "USERVICE_USER_REGISTRY_URL"
value = "https://api.pdv.pagopa.it/user-registry/v1"
},
{
name = "USERVICE_PARTY_MANAGEMENT_URL"
value = "https://selc-p-pnpg-ms-core-ca.salmonpond-60269923.westeurope.azurecontainerapps.io"
}
]

Expand Down
4 changes: 4 additions & 0 deletions infra/container_apps/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ app_settings = [
{
name = "USERVICE_USER_REGISTRY_URL"
value = "https://api.pdv.pagopa.it/user-registry/v1"
},
{
name = "USERVICE_PARTY_MANAGEMENT_URL"
value = "https://selc-p-ms-core-ca.bluedune-cc0f8752.westeurope.azurecontainerapps.io"
}
]

Expand Down
4 changes: 4 additions & 0 deletions infra/container_apps/env/uat-pnpg/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ app_settings = [
{
name = "USERVICE_USER_REGISTRY_URL"
value = "https://api.uat.pdv.pagopa.it/user-registry/v1"
},
{
name = "USERVICE_PARTY_MANAGEMENT_URL"
value = "https://selc-u-pnpg-ms-core-ca.redground-be752d1f.westeurope.azurecontainerapps.io"
}
]

Expand Down
4 changes: 4 additions & 0 deletions infra/container_apps/env/uat/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ app_settings = [
{
name = "USERVICE_USER_REGISTRY_URL"
value = "https://api.uat.pdv.pagopa.it/user-registry/v1"
},
{
name = "USERVICE_PARTY_MANAGEMENT_URL"
value = "https://selc-u-ms-core-ca.calmsky-143987c1.westeurope.azurecontainerapps.io"
}
]

Expand Down

0 comments on commit c231631

Please sign in to comment.