@@ -48,75 +48,75 @@ jobs:
48
48
region : norwayeast
49
49
version : ${{ needs.get-current-version.outputs.version }}
50
50
51
- # todo: enable when we have infrastructure set up for yt01
52
- # deploy- apps- yt01:
53
- # name: Deploy apps to yt01
54
- # needs:
55
- # [get-current-version, check-for-changes, deploy-infra, publish]
56
- # # we want deployment of apps to be dependent on deployment of infrastructure, but if infrastructure is skipped, we still want to deploy the apps
57
- # if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true') }}
58
- # uses: ./.github/workflows/workflow-deploy-apps.yml
59
- # secrets:
60
- # AZURE_CLIENT_ID : ${{ secrets.AZURE_CLIENT_ID }}
61
- # AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
62
- # AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
63
- # # todo: consider resolving these in another way since they are created in the infra-step
64
- # AZURE_RESOURCE_GROUP_NAME : ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
65
- # AZURE_ENVIRONMENT_KEY_VAULT_NAME : ${{ secrets.AZURE_ENVIRONMENT_KEY_VAULT_NAME }}
66
- # AZURE_CONTAINER_APP_ENVIRONMENT_NAME : ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT_NAME }}
67
- # AZURE_APP_INSIGHTS_CONNECTION_STRING : ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }}
68
- # AZURE_APP_CONFIGURATION_NAME : ${{ secrets.AZURE_APP_CONFIGURATION_NAME }}
69
- # with:
70
- # environment: yt01
71
- # region: norwayeast
72
- # version: ${{ needs.get-current-version.outputs.version }}
73
- # runMigration: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasMigrationChanges == 'true' }}
51
+ deploy-apps :
52
+ name : Deploy apps to yt01
53
+ needs :
54
+ [get-current-version, check-for-changes, deploy-infra, publish]
55
+ # we want deployment of apps to be dependent on deployment of infrastructure, but if infrastructure is skipped, we still want to deploy the apps
56
+ if : ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true') }}
57
+ uses : ./.github/workflows/workflow-deploy-apps.yml
58
+ secrets :
59
+ AZURE_CLIENT_ID : ${{ secrets.AZURE_CLIENT_ID }}
60
+ AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
61
+ AZURE_SUBSCRIPTION_ID : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
62
+ # todo: consider resolving these in another way since they are created in the infra-step
63
+ AZURE_RESOURCE_GROUP_NAME : ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
64
+ AZURE_ENVIRONMENT_KEY_VAULT_NAME : ${{ secrets.AZURE_ENVIRONMENT_KEY_VAULT_NAME }}
65
+ AZURE_CONTAINER_APP_ENVIRONMENT_NAME : ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT_NAME }}
66
+ AZURE_APP_INSIGHTS_CONNECTION_STRING : ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }}
67
+ AZURE_APP_CONFIGURATION_NAME : ${{ secrets.AZURE_APP_CONFIGURATION_NAME }}
68
+ AZURE_SERVICE_BUS_NAMESPACE_NAME : ${{ secrets.AZURE_SERVICE_BUS_NAMESPACE_NAME }}
69
+ with :
70
+ environment : yt01
71
+ region : norwayeast
72
+ version : ${{ needs.get-current-version.outputs.version }}
73
+ runMigration : ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasMigrationChanges == 'true' }}
74
74
75
- # deploy-slack-notifier-yt01 :
76
- # name: Deploy slack notifier (yt01)
77
- # needs: [check-for-changes]
78
- # if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSlackNotifierChanges == 'true' }}
79
- # uses: ./.github/workflows/workflow-deploy-function.yml
80
- # secrets:
81
- # AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
82
- # AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
83
- # AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
84
- # # todo: resolve this automatically, or use tags
85
- # AZURE_FUNCTION_APP_NAME: ${{ secrets.AZURE_SLACK_NOTIFIER_FUNCTION_APP_NAME }}
86
- # with:
87
- # function-app-name: "slack-notifier"
88
- # function-project-path: "./src/Digdir.Tool.Dialogporten.SlackNotifier"
89
- # environment: yt01
75
+ deploy-slack-notifier :
76
+ name : Deploy slack notifier (yt01)
77
+ needs : [check-for-changes]
78
+ if : ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSlackNotifierChanges == 'true' }}
79
+ uses : ./.github/workflows/workflow-deploy-function.yml
80
+ secrets :
81
+ AZURE_CLIENT_ID : ${{ secrets.AZURE_CLIENT_ID }}
82
+ AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
83
+ AZURE_SUBSCRIPTION_ID : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
84
+ # todo: resolve this automatically, or use tags
85
+ AZURE_FUNCTION_APP_NAME : ${{ secrets.AZURE_SLACK_NOTIFIER_FUNCTION_APP_NAME }}
86
+ with :
87
+ function-app-name : " slack-notifier"
88
+ function-project-path : " ./src/Digdir.Tool.Dialogporten.SlackNotifier"
89
+ environment : yt01
90
90
91
- # run-e2e-tests:
92
- # name: "Run K6 functional end-to-end tests"
93
- # # 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
94
- # if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true') }}
95
- # needs: [deploy-apps-yt01 , check-for-changes]
96
- # uses: ./.github/workflows/workflow-run-k6-tests.yml
97
- # secrets:
98
- # TOKEN_GENERATOR_USERNAME: ${{ secrets.TOKEN_GENERATOR_USERNAME }}
99
- # TOKEN_GENERATOR_PASSWORD: ${{ secrets.TOKEN_GENERATOR_PASSWORD }}
100
- # with:
101
- # environment: yt01
102
- # apiVersion: v1
103
- # testSuitePath: tests/k6/suites/all-single-pass.js
104
- # permissions:
105
- # checks: write
106
- # pull-requests: write
91
+ run-e2e-tests :
92
+ name : " Run K6 functional end-to-end tests"
93
+ # 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
94
+ if : ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasBackendChanges == 'true') }}
95
+ needs : [deploy-apps, check-for-changes]
96
+ uses : ./.github/workflows/workflow-run-k6-tests.yml
97
+ secrets :
98
+ TOKEN_GENERATOR_USERNAME : ${{ secrets.TOKEN_GENERATOR_USERNAME }}
99
+ TOKEN_GENERATOR_PASSWORD : ${{ secrets.TOKEN_GENERATOR_PASSWORD }}
100
+ with :
101
+ environment : yt01
102
+ apiVersion : v1
103
+ testSuitePath : tests/k6/suites/all-single-pass.js
104
+ permissions :
105
+ checks : write
106
+ pull-requests : write
107
107
108
- # send-slack-message-on-failure:
109
- # name: Send Slack message on failure
110
- # needs: [deploy-infra, deploy-apps-yt01 , deploy-slack-notifier-yt01 , run-e2e-tests, publish]
111
- # if: ${{ always() && failure() && !cancelled() }}
112
- # uses: ./.github/workflows/workflow-send-ci-cd-status-slack-message.yml
113
- # with:
114
- # environment: yt01
115
- # infra_status: ${{ needs.deploy-infra.result }}
116
- # apps_status: ${{ needs.deploy-apps-yt01 .result }}
117
- # slack_notifier_status: ${{ needs.deploy-slack-notifier-yt01 .result }}
118
- # e2e_tests_status: ${{ needs.run-e2e-tests.result }}
119
- # publish_status: ${{ needs.publish.result }}
120
- # secrets:
121
- # SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
122
- # SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID_FOR_CI_CD_STATUS }}
108
+ send-slack-message-on-failure :
109
+ name : Send Slack message on failure
110
+ needs : [deploy-infra, deploy-apps, deploy-slack-notifier, run-e2e-tests, publish]
111
+ if : ${{ always() && failure() && !cancelled() }}
112
+ uses : ./.github/workflows/workflow-send-ci-cd-status-slack-message.yml
113
+ with :
114
+ environment : yt01
115
+ infra_status : ${{ needs.deploy-infra.result }}
116
+ apps_status : ${{ needs.deploy-apps.result }}
117
+ slack_notifier_status : ${{ needs.deploy-slack-notifier.result }}
118
+ e2e_tests_status : ${{ needs.run-e2e-tests.result }}
119
+ publish_status : ${{ needs.publish.result }}
120
+ secrets :
121
+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
122
+ SLACK_CHANNEL_ID : ${{ secrets.SLACK_CHANNEL_ID_FOR_CI_CD_STATUS }}
0 commit comments