Skip to content

Commit

Permalink
chore: Alert opex x apim v 2 (#69)
Browse files Browse the repository at this point in the history
* alert OPEX x apim V2

* fix
  • Loading branch information
pasqualespica authored Jun 17, 2024
1 parent b79b747 commit b192c27
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 40 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/08_create_dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,37 +75,3 @@ jobs:
subscription-id: ${{ secrets.PSP_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
});
})
);
5 changes: 3 additions & 2 deletions .opex/env/prod/internal/config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
oa3_spec: ./openapi/openapi_internal.json # If start with http the file would be downloaded from the internet
name: opex_pagopa-fdr-internal
name: opex_pagopa-fdr-internal-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-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-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
Expand Down
5 changes: 3 additions & 2 deletions .opex/env/prod/organization/config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
oa3_spec: ./openapi/openapi_organization.json # If start with http the file would be downloaded from the internet
name: opex_pagopa-fdr-organization
name: opex_pagopa-fdr-organization-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-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-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
Expand Down
5 changes: 3 additions & 2 deletions .opex/env/prod/psp/config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
oa3_spec: ./openapi/openapi_psp.json # If start with http the file would be downloaded from the internet
name: opex_pagopa-fdr-psp
name: opex_pagopa-fdr-psp-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-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-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
Expand Down

0 comments on commit b192c27

Please sign in to comment.