forked from pagopa/pagopa-afm-calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from pagopa/PAGOPA-1857-infra-ri-creazione-ale…
…rt-opex-x-apim-v-2 Alert OPEX x apim V2
- Loading branch information
Showing
9 changed files
with
34 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,8 @@ jobs: | |
strategy: | ||
matrix: | ||
environment: [prod] | ||
product: [apim_v1, apim_v2] | ||
max-parallel: 1 | ||
environment: | ||
name: ${{ matrix.environment }} | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
|
@@ -41,44 +43,10 @@ jobs: | |
- uses: pagopa/[email protected] | ||
with: | ||
environment: ${{ matrix.environment }} | ||
api-name: | ||
config: .opex/env/${{ matrix.environment }}/config.yaml | ||
api-name: ${{ matrix.product }} | ||
config: .opex/${{ matrix.product }}/env/${{ matrix.environment }}/config.yaml | ||
client-id: ${{ secrets.CD_CLIENT_ID }} | ||
tenant-id: ${{ secrets.TENANT_ID }} | ||
subscription-id: ${{ secrets.SUBSCRIPTION_ID }} | ||
# from https://github.com/pagopa/opex-dashboard-azure-action/pkgs/container/opex-dashboard-azure-action | ||
docker-version: sha256:e4245954566cd3470e1b5527d33bb58ca132ce7493eac01be9e808fd25a11c8d | ||
|
||
delete_github_deployments: | ||
runs-on: ubuntu-latest | ||
needs: dashboard | ||
if: ${{ always() }} | ||
steps: | ||
- name: Delete Previous deployments | ||
uses: actions/github-script@v6 | ||
env: | ||
SHA_HEAD: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha}} | ||
with: | ||
script: | | ||
const { SHA_HEAD } = process.env | ||
const deployments = await github.rest.repos.listDeployments({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
sha: SHA_HEAD | ||
}); | ||
await Promise.all( | ||
deployments.data.map(async (deployment) => { | ||
await github.rest.repos.createDeploymentStatus({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
deployment_id: deployment.id, | ||
state: 'inactive' | ||
}); | ||
return github.rest.repos.deleteDeployment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
deployment_id: deployment.id | ||
}); | ||
}) | ||
); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
subscription=PROD-pagoPA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource_group_name = "io-infra-rg" | ||
storage_account_name = "pagopainfraterraformprod" | ||
container_name = "azurermstate" | ||
key = "opex.pagopa-afm-utils-apimv2.terraform.tfstate" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
oa3_spec: ./openapi/openapi.json # If start with http the file would be downloaded from the internet | ||
name: opex_pagopa-afm-utils-apimv2 | ||
location: West Europe | ||
timespan: 5m # Default, a number or a timespan https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/timespan | ||
# data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-vnet-rg/providers/Microsoft.Network/applicationGateways/pagopa-p-app-gw | ||
# data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-api-rg/providers/Microsoft.ApiManagement/service/pagopa-p-apim | ||
data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-api-rg/providers/Microsoft.ApiManagement/service/pagopa-p-weu-core-apim-v2 | ||
resource_type: api-management | ||
action_groups: | ||
- /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-monitor-rg/providers/microsoft.insights/actionGroups/PagoPA | ||
- /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-monitor-rg/providers/microsoft.insights/actionGroups/SlackPagoPA | ||
overrides: | ||
hosts: # Use these hosts instead of those inside the OpenApi spec | ||
- api.platform.pagopa.it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
prefix = "pagopa" | ||
env_short = "p" | ||
|
||
|
||
tags = { | ||
CreatedBy = "Terraform" | ||
Environment = "Prod" | ||
Owner = "pagoPA" | ||
Source = "https://github.com/pagopa/pagopa-afm-utils" | ||
CostCenter = "TS310 - PAGAMENTI & SERVIZI" | ||
} |