Skip to content

Deploy Project manually into dev cluster #56

Deploy Project manually into dev cluster

Deploy Project manually into dev cluster #56

---
name: Deploy Project manually into dev cluster
on:
workflow_dispatch:
inputs:
namespace:
type: string
description: Kubernetes namespace of the deployment, has to start with ticketnr, e.g. spsh-1234
required: true
dbildungs_iam_server_branch:
required: true
description: "dbildungs_iam_server Branch. Has to be main or in format <project>-<ticketnumber>, e.g. spsh-130"
default: main
type: string
dbildungs_iam_client_branch:
required: true
description: "dbildungs_iam_client Branch. Has to be main or in format <project>-<ticketnumber>, e.g. spsh-130"
default: main
type: string
dbildungs_iam_keycloak_branch:
required: true
description: "dbildungs_iam_keycloak Branch. Has to be main or in format <project>-<ticketnumber>, e.g. spsh-130"
default: main
type: string
jobs:
create_branch_identifier:
uses: dBildungsplattform/spsh-app-deploy/.github/workflows/branch-to-namespace.yml@2
with:
branch: ${{ github.event.inputs.namespace }}
check_namespace_input:
needs:
- create_branch_identifier
runs-on: ubuntu-latest
steps:
- name: Check if namespace is allowed, fails if it not starts with ticketnr, e.g. spsh-1234 or is exactly 'main'
run: |
if ${{ github.event.inputs.namespace != 'main' }}; then
regex='^([[:alpha:]]+?-[[:digit:]]+)'
[[ ${{ github.event.inputs.namespace }} =~ $regex ]]
echo "${BASH_REMATCH[1]}"
fi
deploy:
needs:
- check_namespace_input
- create_branch_identifier
uses: dBildungsplattform/spsh-app-deploy/.github/workflows/deploy.yml@2

Check failure on line 50 in .github/workflows/deploy-to-dev-manual.yml

View workflow run for this annotation

GitHub Actions / Deploy Project manually into dev cluster

Invalid workflow file

The workflow is not valid. .github/workflows/deploy-to-dev-manual.yml (Line: 50, Col: 11): Input schulportal_client_branch is required, but not provided while calling. .github/workflows/deploy-to-dev-manual.yml (Line: 53, Col: 36): Invalid input, dbildungs_iam_client_branch is not defined in the referenced workflow.
with:
dbildungs_iam_server_branch: ${{ github.event.inputs.dbildungs_iam_server_branch }}
dbildungs_iam_client_branch: ${{ github.event.inputs.dbildungs_iam_client_branch }}
dbildungs_iam_keycloak_branch: ${{ github.event.inputs.dbildungs_iam_keycloak_branch }}
namespace: ${{ needs.create_branch_identifier.outputs.namespace_from_branch }}
user_name: spsh-bot
secrets:
SPSH_DEV_KUBECONFIG: ${{ secrets.SPSH_DEV_KUBECONFIG }}
deploy-successful:
needs:
- deploy
runs-on: ubuntu-latest
steps:
- run: echo "Deployment workflow was successful"