Skip to content

Commit

Permalink
chore: Fix slack notify (#53)
Browse files Browse the repository at this point in the history
* fix slack notify

* fix slack notify
  • Loading branch information
pasqualespica authored Apr 3, 2024
1 parent 242be51 commit 6d5acc3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ jobs:
needs: [ create_runner, integration_test ]
runs-on: [ self-hosted, "${{ needs.create_runner.outputs.runner_name }}" ]
name: Notify
if: ${{ always() && (inputs == null || inputs.notify == 'true') }}
# if: ${{ always() && (inputs == null || inputs.notify == 'true') }}
if: always()
steps:
- name: Report Status
if: ${{ inputs.notify }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*.zip
*.tar.gz
*.rar
*.hide

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
Expand Down
6 changes: 6 additions & 0 deletions .identity/00_data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,9 @@ data "azurerm_cosmosdb_account" "bizevents_cosmos" {
name = "pagopa-${var.env_short}-${local.location_short}-bizevents-ds-cosmos-account"
resource_group_name = "pagopa-${var.env_short}-${local.location_short}-bizevents-rg"
}

data "azurerm_key_vault_secret" "key_vault_integration_test_webhook_slack" {
count = var.env_short != "p" ? 1 : 0
name = "webhook-slack"
key_vault_id = data.azurerm_key_vault.domain_key_vault.id
}
8 changes: 8 additions & 0 deletions .identity/03_github_environment.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,11 @@ resource "github_actions_environment_secret" "secret_integration_test_cosmos_key
secret_name = "COSMOS_DB_PRIMARY_KEY"
plaintext_value = data.azurerm_key_vault_secret.key_vault_integration_cosmos_negative_biz_key[0].value
}

#tfsec:ignore:github-actions-no-plain-text-action-secrets # not real secret
resource "github_actions_secret" "secret_slack_webhook" {
count = var.env_short != "p" ? 1 : 0
repository = local.github.repository
secret_name = "SLACK_WEBHOOK_URL"
plaintext_value = data.azurerm_key_vault_secret.key_vault_integration_test_webhook_slack[0].value
}

0 comments on commit 6d5acc3

Please sign in to comment.