Skip to content

Commit

Permalink
[EC-97] Adapt function deployment pipeline to GitHub flow (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krusty93 authored Jan 23, 2024
1 parent dc87cc9 commit 93e0499
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 9 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/call_release_function.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ on:
environment:
type: string
required: true
branch:
short_env:
type: string
required: false
default: main
required: true

jobs:
release:
name: 'Build & Release'
runs-on: ubuntu-20.04
environment: ${{ inputs.environment }}-cd
environment:
name: ${{ inputs.environment }}-cd
url: ${{ format('https://selc-{0}-onboarding-fn.azurewebsites.net', inputs.short_env) }}
permissions:
id-token: write
packages: read
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr_functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
- ready_for_review
paths:
- 'apps/onboarding-functions/**'
- 'apps/onboarding-ms/pom.xml'
- '.github/workflows/pr_functions.yml'
- '.github/workflows/call_code_review.yml'

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr_ms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
- ready_for_review
paths:
- 'apps/onboarding-ms/**'
- 'apps/onboarding-ms/pom.xml'
- '.github/workflows/pr_ms.yml'
- '.github/workflows/call_code_review.yml'

Expand Down
31 changes: 28 additions & 3 deletions .github/workflows/release_functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,39 @@ on:
push:
branches:
- main
- releases/**
- releases/*
paths:
- 'apps/onboarding-functions/**'
- "apps/pom.xml"
- "pom.xml"

workflow_dispatch:

jobs:
release:

release_dev:
uses: ./.github/workflows/call_release_function.yml
name: OnBoarding function Release
name: '[Dev] OnBoarding function Release'
if: github.ref_name == 'main'
secrets: inherit
with:
environment: dev
short_env: d

release_uat:
uses: ./.github/workflows/call_release_function.yml
name: '[UAT] OnBoarding function Release'
if: startsWith(github.ref_name, 'releases/')
secrets: inherit
with:
environment: uat
short_env: u

release_prod:
uses: ./.github/workflows/call_release_function.yml
name: '[Prod] OnBoarding function Release'
if: startsWith(github.ref_name, 'releases/')
secrets: inherit
with:
environment: prod
short_env: p

0 comments on commit 93e0499

Please sign in to comment.