Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: remove deployment of slack notifier #1657

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/slack-templates/pipeline-failed.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Job Status:*\n• Infrastructure: ${{ env.INFRA_STATUS }}\n• Apps: ${{ env.APPS_STATUS }}\n• Slack Notifier: ${{ env.SLACK_NOTIFIER_STATUS }}\n• E2E Tests: ${{ env.E2E_TESTS_STATUS }}\n• Performance Tests: ${{ env.PERFORMANCE_TESTS_STATUS }}\n• Schema NPM: ${{ env.SCHEMA_NPM_STATUS }}\n• Publish: ${{ env.PUBLISH_STATUS }}"
"text": "*Job Status:*\n• Infrastructure: ${{ env.INFRA_STATUS }}\n• Apps: ${{ env.APPS_STATUS }}\n• E2E Tests: ${{ env.E2E_TESTS_STATUS }}\n• Performance Tests: ${{ env.PERFORMANCE_TESTS_STATUS }}\n• Schema NPM: ${{ env.SCHEMA_NPM_STATUS }}\n• Publish: ${{ env.PUBLISH_STATUS }}"
}
},
{
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/ci-cd-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,6 @@ jobs:
version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }}
runMigration: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasMigrationChanges == 'true' }}

deploy-slack-notifier:
name: Deploy slack notifier (test)
needs: [check-for-changes]
if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSlackNotifierChanges == 'true' }}
uses: ./.github/workflows/workflow-deploy-function.yml
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
# todo: resolve this automatically, or use tags
AZURE_FUNCTION_APP_NAME: ${{ secrets.AZURE_SLACK_NOTIFIER_FUNCTION_APP_NAME }}
with:
function-app-name: "slack-notifier"
function-project-path: "./src/Digdir.Tool.Dialogporten.SlackNotifier"
environment: test

publish-schema-npm:
name: Deploy schema npm package
needs: [check-for-changes, get-current-version, generate-git-short-sha, deploy-apps]
Expand Down Expand Up @@ -156,7 +140,6 @@ jobs:
needs: [
deploy-infra,
deploy-apps,
deploy-slack-notifier,
run-e2e-tests,
publish-schema-npm,
publish,
Expand All @@ -168,7 +151,6 @@ jobs:
environment: test
infra_status: ${{ needs.deploy-infra.result }}
apps_status: ${{ needs.deploy-apps.result }}
slack_notifier_status: ${{ needs.deploy-slack-notifier.result }}
e2e_tests_status: ${{ needs.run-e2e-tests.result }}
schema_npm_status: ${{ needs.publish-schema-npm.result }}
publish_status: ${{ needs.publish.result }}
Expand Down
19 changes: 1 addition & 18 deletions .github/workflows/ci-cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,6 @@ jobs:
secrets:
GH_TOKEN: ${{ secrets.RELEASE_VERSION_STORAGE_PAT }}

deploy-slack-notifier:
name: Deploy slack notifier (prod)
needs: [check-for-changes]
if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSlackNotifierChanges == 'true' }}
uses: ./.github/workflows/workflow-deploy-function.yml
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
# todo: resolve this automatically, or use tags
AZURE_FUNCTION_APP_NAME: ${{ secrets.AZURE_SLACK_NOTIFIER_FUNCTION_APP_NAME }}
with:
function-app-name: "slack-notifier"
function-project-path: "./src/Digdir.Tool.Dialogporten.SlackNotifier"
environment: prod

# run-e2e-tests:
# name: "Run K6 functional end-to-end tests"
# # we want the end-to-end tests to be dependent on deployment of infrastructure and apps, but if infrastructure is skipped, we still want to run the tests
Expand All @@ -174,14 +158,13 @@ jobs:

send-slack-message-on-failure:
name: Send Slack message on failure
needs: [deploy-infra, deploy-apps, deploy-slack-notifier]
needs: [deploy-infra, deploy-apps]
if: ${{ always() && failure() && !cancelled() }}
uses: ./.github/workflows/workflow-send-ci-cd-status-slack-message.yml
with:
environment: prod
infra_status: ${{ needs.deploy-infra.result }}
apps_status: ${{ needs.deploy-apps.result }}
slack_notifier_status: ${{ needs.deploy-slack-notifier.result }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID_FOR_CI_CD_STATUS }}
19 changes: 1 addition & 18 deletions .github/workflows/ci-cd-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,6 @@ jobs:
secrets:
GH_TOKEN: ${{ secrets.RELEASE_VERSION_STORAGE_PAT }}

deploy-slack-notifier:
name: Deploy slack notifier (staging)
needs: [check-for-changes]
if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSlackNotifierChanges == 'true' }}
uses: ./.github/workflows/workflow-deploy-function.yml
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
# todo: resolve this automatically, or use tags
AZURE_FUNCTION_APP_NAME: ${{ secrets.AZURE_SLACK_NOTIFIER_FUNCTION_APP_NAME }}
with:
function-app-name: "slack-notifier"
function-project-path: "./src/Digdir.Tool.Dialogporten.SlackNotifier"
environment: staging

publish-schema-npm:
name: Publish schema npm package
needs: [check-for-changes, get-current-version, deploy-apps]
Expand Down Expand Up @@ -150,14 +134,13 @@ jobs:

send-slack-message-on-failure:
name: Send Slack message on failure
needs: [deploy-infra, deploy-apps, deploy-slack-notifier, run-e2e-tests, publish-schema-npm, publish]
needs: [deploy-infra, deploy-apps, run-e2e-tests, publish-schema-npm, publish]
if: ${{ always() && failure() && !cancelled() }}
uses: ./.github/workflows/workflow-send-ci-cd-status-slack-message.yml
with:
environment: staging
infra_status: ${{ needs.deploy-infra.result }}
apps_status: ${{ needs.deploy-apps.result }}
slack_notifier_status: ${{ needs.deploy-slack-notifier.result }}
e2e_tests_status: ${{ needs.run-e2e-tests.result }}
schema_npm_status: ${{ needs.publish-schema-npm.result }}
publish_status: ${{ needs.publish.result }}
Expand Down
19 changes: 1 addition & 18 deletions .github/workflows/ci-cd-yt01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,6 @@ jobs:
secrets:
GH_TOKEN: ${{ secrets.RELEASE_VERSION_STORAGE_PAT }}

deploy-slack-notifier:
name: Deploy slack notifier (yt01)
needs: [check-for-changes]
if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSlackNotifierChanges == 'true' }}
uses: ./.github/workflows/workflow-deploy-function.yml
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
# todo: resolve this automatically, or use tags
AZURE_FUNCTION_APP_NAME: ${{ secrets.AZURE_SLACK_NOTIFIER_FUNCTION_APP_NAME }}
with:
function-app-name: "slack-notifier"
function-project-path: "./src/Digdir.Tool.Dialogporten.SlackNotifier"
environment: yt01

run-e2e-tests:
name: "Run K6 functional end-to-end tests"
# we want the end-to-end tests to be dependent on deployment of infrastructure and apps, but if infrastructure is skipped, we still want to run the tests
Expand Down Expand Up @@ -175,14 +159,13 @@ jobs:

send-slack-message-on-failure:
name: Send Slack message on failure
needs: [deploy-infra, deploy-apps, deploy-slack-notifier, run-e2e-tests, publish, run-performance-tests]
needs: [deploy-infra, deploy-apps, run-e2e-tests, publish, run-performance-tests]
if: ${{ always() && failure() && !cancelled() }}
uses: ./.github/workflows/workflow-send-ci-cd-status-slack-message.yml
with:
environment: yt01
infra_status: ${{ needs.deploy-infra.result }}
apps_status: ${{ needs.deploy-apps.result }}
slack_notifier_status: ${{ needs.deploy-slack-notifier.result }}
e2e_tests_status: ${{ needs.run-e2e-tests.result }}
performance_tests_status: ${{ needs.run-performance-tests.result }}
publish_status: ${{ needs.publish.result }}
Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/workflow-deploy-function.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ on:
type: string
description: "Status of the apps deployment job"
default: "skipped"
slack_notifier_status:
type: string
description: "Status of the Slack notifier deployment job"
default: "skipped"
e2e_tests_status:
type: string
description: "Status of the end-to-end tests job"
Expand Down Expand Up @@ -68,7 +64,6 @@ jobs:
{
echo "INFRA_EMOJI=$(determine_emoji "${{ inputs.infra_status }}")"
echo "APPS_EMOJI=$(determine_emoji "${{ inputs.apps_status }}")"
echo "SLACK_NOTIFIER_EMOJI=$(determine_emoji "${{ inputs.slack_notifier_status }}")"
echo "E2E_TESTS_EMOJI=$(determine_emoji "${{ inputs.e2e_tests_status }}")"
echo "SCHEMA_NPM_EMOJI=$(determine_emoji "${{ inputs.schema_npm_status }}")"
echo "PUBLISH_EMOJI=$(determine_emoji "${{ inputs.publish_status }}")"
Expand All @@ -85,7 +80,6 @@ jobs:
# statuses
INFRA_STATUS: "${{ steps.status-emojis.outputs.INFRA_EMOJI }}"
APPS_STATUS: "${{ steps.status-emojis.outputs.APPS_EMOJI }}"
SLACK_NOTIFIER_STATUS: "${{ steps.status-emojis.outputs.SLACK_NOTIFIER_EMOJI }}"
E2E_TESTS_STATUS: "${{ steps.status-emojis.outputs.E2E_TESTS_EMOJI }}"
SCHEMA_NPM_STATUS: "${{ steps.status-emojis.outputs.SCHEMA_NPM_EMOJI }}"
PUBLISH_STATUS: "${{ steps.status-emojis.outputs.PUBLISH_EMOJI }}"
Expand Down
Loading