Skip to content

Commit

Permalink
ci: or-2583 add seperated lambda deploy to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
emalfroy committed Jan 27, 2025
1 parent 36538d9 commit 24a1d17
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/manual-lambda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Manual Deploy To Staging (IK4)

on:
workflow_dispatch:
environment:
description: 'Select the environment to deploy to'
required: true
type: choice
options:
- test_ik4
- staging_ik4
- production_ik4

jobs:
deployment:
name: Deploy lambdas
environment: ${{ inputs.environment }}
runs-on: ubuntu-latest
strategy:
matrix:
services:
[
'kbosync',
]
steps:
- name: Set env
id: set_env
run: |
if [[ "${{ inputs.environment }}" == "test_ik4" ]]; then
echo "ENV=test" >> $GITHUB_ENV
elif [[ "${{ inputs.environment }}" == "staging_ik4" ]]; then
echo "ENV=stg" >> $GITHUB_ENV
elif [[ "${{ inputs.environment }}" == "production_ik4" ]]; then
echo "ENV=prd" >> $GITHUB_ENV
fi
- name: CD
id: awscurl-polling-action
env:
BUILD_URL: ${{ secrets.VBR_AWS_BUILD_API }}/kbosync/${{ env.ENV }}/deploy/v4
STATUS_URL: ${{ secrets.VBR_AWS_BUILD_STATUS_API }}/kbosync/${{ env.ENV }}/deploy/v4/status
uses: informatievlaanderen/awscurl-polling-action/polling-action@deploy-v4
with:
environment: stg
version: ${{ github.event.inputs.version }}
status-url: $STATUS_URL
deploy-url: $BUILD_URL
access-key: ${{ secrets.VBR_AWS_BUILD_USER_ACCESS_KEY_ID_IK4 }}
secret-key: ${{ secrets.VBR_AWS_BUILD_USER_SECRET_ACCESS_KEY_IK4 }}
deploy-target: 'lambda'
domain: 'verenigingsregister'
project: 'verenigingsregister'
application: 'lambda'
interval: 2
- name: output
shell: bash
if: always()
run: |
echo build-uuid: ${{ steps.awscurl-polling-action.outputs.build-uuid }}
echo Status: ${{ steps.awscurl-polling-action.outputs.status }}
echo ${{ steps.awscurl-polling-action.outputs.final-message }}

0 comments on commit 24a1d17

Please sign in to comment.