Skip to content

Commit

Permalink
[#IOPID-2557] Import Lollipop OPEX dashboard (#149)
Browse files Browse the repository at this point in the history
Co-authored-by: Salvatore Laiso <[email protected]>
  • Loading branch information
salvatorelaiso and Salvatore Laiso authored Dec 19, 2024
1 parent 783f3a1 commit 8b67ad1
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/opex_filters.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
plan-action:
- ".github/workflows/pr_opex_api_session_manager.yaml"
- ".github/workflows/pr_opex_api_lollipop.yaml"
- ".github/workflows/call_pr_opex_api.yml"
apply-action:
- ".github/workflows/opex_api_session_manager.yaml"
- ".github/workflows/opex_api_lollipop.yaml"
- ".github/workflows/call_opex_api.yml"
bpd:
- "apps/io-session-manager/api/bpd.yaml"
Expand All @@ -25,3 +27,6 @@ public:
zendesk:
- "apps/io-session-manager/api/zendesk.yaml"
- "apps/io-session-manager/.opex/zendesk/**"
lollipop-external:
- "apps/io-lollipop/api/external.yaml"
- "apps/io-lollipop/.opex/external/**"
47 changes: 47 additions & 0 deletions .github/workflows/opex_api_lollipop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Opex Dashboard Lollipop

on:
push:
branches:
- main
paths:
- ".github/workflows/opex_api_lollipop.yaml"
- ".github/workflows/call_opex_api.yml"
- "apps/io-lollipop/api/*.yaml"
- "apps/io-lollipop/.opex/**"

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}

jobs:
filter:
runs-on: ubuntu-22.04
permissions:
pull-requests: read
outputs:
apply-action: ${{ steps.filter.outputs.apply-action }}
lollipop-external: ${{ steps.filter.outputs.lollipop-external }}
# Checks to see if openapi specs in the PR match one of the ones listed.
# We can use the result to decide which job to run
# With this type of filter we can avoid creating a lot of workflow files
steps:
# path-filters action requires checkout with push event
- uses: actions/checkout@v4
with:
fetch-depth: 20
- uses: dorny/[email protected]
id: filter
with:
filters: ./.github/opex_filters.yaml

apply-lollipop-external:
needs: filter
if: ${{ needs.filter.outputs.lollipop-external == 'true' || needs.filter.outputs.apply-action == 'true' }}
uses: ./.github/workflows/call_opex_api.yml
name: (Lollipop - External) Apply changes to Production
secrets: inherit
with:
api_name: external
app_name: io-lollipop
49 changes: 49 additions & 0 deletions .github/workflows/pr_opex_api_lollipop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: PR - Opex Dashboard Lollipop

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
branches:
- main
paths:
- ".github/workflows/pr_opex_api_lollipop.yaml"
- ".github/workflows/call_pr_opex_api.yml"
- "apps/io-lollipop/api/*.yaml"
- "apps/io-lollipop/.opex/**"

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false

jobs:
filter:
runs-on: ubuntu-22.04
permissions:
pull-requests: read
outputs:
plan-action: ${{ steps.filter.outputs.plan-action }}
lollipop-external: ${{ steps.filter.outputs.lollipop-external }}
# Checks to see if openapi specs in the PR match one of the ones listed.
# We can use the result to decide which job to run
# With this type of filter we can avoid creating a lot of workflow files
steps:
- uses: actions/checkout@v4
- uses: dorny/[email protected]
id: filter
with:
filters: ./.github/opex_filters.yaml
plan-lollipop-external:
needs: filter
if: ${{ needs.filter.outputs.lollipop-external == 'true' || needs.filter.outputs.plan-action == 'true' }}
uses: ./.github/workflows/call_pr_opex_api.yml
name: (Lollipop - External) Plan changes against Production
secrets: inherit
with:
api_name: external
app_name: io-lollipop
1 change: 1 addition & 0 deletions apps/io-lollipop/.opex/external/env/prod/backend.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subscription=PROD-IO
4 changes: 4 additions & 0 deletions apps/io-lollipop/.opex/external/env/prod/backend.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource_group_name = "terraform-state-rg"
storage_account_name = "tfappprodio"
container_name = "terraform-state"
key = "opex.io-lollipop.api_external.tfstate"
13 changes: 13 additions & 0 deletions apps/io-lollipop/.opex/external/env/prod/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
oa3_spec: apps/io-lollipop/api/external.yaml
name: opex_io_lollipop_api_external
location: Italy North
timespan: 10m
resource_type: api-management
data_source: /subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-external/providers/Microsoft.Network/applicationGateways/io-p-appgateway
action_groups:
- /subscriptions/EC285037-C673-4F58-B594-D7C480DA4E8B/resourceGroups/io-p-rg-common/providers/microsoft.insights/actionGroups/iopquarantineerror
overrides:
hosts:
- api.io.pagopa.it
- api.io.italia.it
- api-app.internal.io.pagopa.it
10 changes: 10 additions & 0 deletions apps/io-lollipop/.opex/external/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix = "io"
env_short = "p"

tags = {
CreatedBy = "Terraform"
Environment = "Prod"
Owner = "io"
Source = "https://github.com/pagopa/io-auth-n-identity-domain"
CostCenter = "TS310 - PAGAMENTI & SERVIZI"
}

0 comments on commit 8b67ad1

Please sign in to comment.