Skip to content

Commit

Permalink
fix(slackNotifier): Add missing deployment of Slack notifier function…
Browse files Browse the repository at this point in the history
… in staging environment (#861)
  • Loading branch information
oskogstad authored Jun 19, 2024
1 parent a03501a commit 59091f7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci-cd-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ jobs:
version: ${{ needs.get-current-version.outputs.version }}
runMigration: ${{ needs.check-for-changes.outputs.hasMigrationChanges == 'true' }}

deploy-slack-notifier-staging:
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/action-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 }}
with:
function-app-name: "dp-be-staging-slacknotifier-fa"
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]
Expand All @@ -79,7 +93,7 @@ jobs:
version: ${{ needs.get-current-version.outputs.version }}
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

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 @@ -96,4 +110,3 @@ jobs:
permissions:
checks: write
pull-requests: write

2 changes: 1 addition & 1 deletion src/Digdir.Tool.Dialogporten.SlackNotifier/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

var builder = await new HostBuilder()
await new HostBuilder()
.ConfigureFunctionsWorkerDefaults()
.ConfigureAppConfiguration(x => x.AddUserSecrets<Program>(optional: true, reloadOnChange: false))
.ConfigureServices((hostContext, services) =>
Expand Down

0 comments on commit 59091f7

Please sign in to comment.