-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (70 loc) · 2.57 KB
/
deploy-to-dev-manual.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
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
schulportal_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
dbseeding:
required: true
description: "DB-Seeding (Default: chart_value)"
default: "chart_value"
type: choice
options:
- "chart_value"
- "true"
- "false"
jobs:
create_branch_identifier:
uses: dBildungsplattform/spsh-app-deploy/.github/workflows/deploy-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@5
with:
dbildungs_iam_server_branch: ${{ github.event.inputs.dbildungs_iam_server_branch }}
schulportal_client_branch: ${{ github.event.inputs.dbildungs_iam_client_branch }}
dbildungs_iam_keycloak_branch: ${{ github.event.inputs.dbildungs_iam_keycloak_branch }}
dbseeding: ${{ github.event.inputs.dbseeding }}
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"