Skip to content

Commit 65ebd8f

Browse files
authored
Merge pull request #8025 from ecamp/rewrite-deploy-ecamp3
Rewrite deploy ecamp3
2 parents bc86ab8 + 33fd44c commit 65ebd8f

21 files changed

+717
-737
lines changed

.github/workflows/deployment-devel.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ on:
55
branches:
66
- devel
77
workflow_dispatch:
8+
inputs:
9+
action:
10+
description: "Choose action"
11+
type: choice
12+
required: true
13+
default: diff
14+
options:
15+
- diff
16+
- deploy
817

918
jobs:
1019
continuous-integration:
@@ -25,8 +34,9 @@ jobs:
2534
upgrade-or-install-deployment:
2635
name: Upgrade or install deployment
2736
needs: build-and-push
28-
uses: ./.github/workflows/reusable-dev-deployment.yml
37+
uses: ./.github/workflows/reusable-ecamp3-deployment.yml
2938
with:
3039
name: dev
3140
env: dev
32-
secrets: inherit
41+
action: ${{ github.event.inputs.action || 'deploy' }}
42+
secrets: inherit

.github/workflows/deployment-pr.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ name: CD for feature branches
33
on:
44
pull_request_target:
55
types: [opened, reopened, labeled, synchronize]
6+
workflow_dispatch:
7+
inputs:
8+
action:
9+
description: "Choose action"
10+
type: choice
11+
required: true
12+
default: diff
13+
options:
14+
- diff
15+
- deploy
616

717
concurrency:
818
group: ${{ github.workflow}}-${{ github.event.pull_request.number }}
@@ -23,11 +33,12 @@ jobs:
2333
upgrade-or-install-deployment:
2434
name: Upgrade or install deployment
2535
needs: build-and-push
26-
uses: ./.github/workflows/reusable-dev-deployment.yml
36+
uses: ./.github/workflows/reusable-ecamp3-deployment.yml
2737
with:
2838
name: pr${{ github.event.pull_request.number }}
2939
sha: ${{ github.event.pull_request.head.sha }}
3040
env: feature-branch
3141
pr-number: ${{ github.event.pull_request.number }}
3242
dropDBOnUninstall: true
43+
action: ${{ github.event.inputs.action || 'deploy' }}
3344
secrets: inherit

.github/workflows/deployment-stage-prod.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ on:
99
- staging
1010
- prod
1111
workflow_dispatch:
12+
inputs:
13+
action:
14+
description: "Choose action"
15+
type: choice
16+
required: true
17+
default: diff
18+
options:
19+
- diff
20+
- deploy
1221

1322
jobs:
1423
build-and-push:
@@ -24,5 +33,9 @@ jobs:
2433
upgrade-or-install-deployment:
2534
name: Upgrade or install deployment
2635
needs: build-and-push
27-
uses: ./.github/workflows/reusable-stage-prod-deployment.yml
36+
uses: ./.github/workflows/reusable-ecamp3-deployment.yml
37+
with:
38+
name: ${{ github.ref_name }}
39+
env: ${{ github.ref_name }}
40+
action: ${{ github.event.inputs.action || 'deploy' }}
2841
secrets: inherit

.github/workflows/restore-backup-dev-pr.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ on:
2121
description: The environment, if name is dev then dev, else feature-branch
2222
required: true
2323
default: dev
24+
action:
25+
description: "Choose action"
26+
type: choice
27+
required: true
28+
default: diff
29+
options:
30+
- diff
31+
- deploy
2432

2533

2634
jobs:
@@ -36,12 +44,13 @@ jobs:
3644
upgrade-or-install-deployment:
3745
name: Upgrade or install deployment
3846
needs: build-and-push
39-
uses: ./.github/workflows/reusable-dev-deployment.yml
47+
uses: ./.github/workflows/reusable-ecamp3-deployment.yml
4048
with:
4149
name: ${{ inputs.pr-number == null && 'dev' || format('pr{0}', inputs.pr-number) }}
4250
sha: ${{ github.sha }}
4351
env: ${{ inputs.env }}
4452
pr-number: ${{ inputs.pr-number }}
4553
dropDBOnUninstall: ${{ inputs.pr-number != null }}
4654
restoreSourceFile: ${{ inputs.restoreSourceFile }}
55+
action: ${{ github.event.inputs.action }}
4756
secrets: inherit

.github/workflows/restore-backup-stage-prod.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ on:
1818
and restore the database with the given backup file?
1919
Repeat the branch name to confirm. (e.g. staging or prod)
2020
required: true
21+
action:
22+
description: "Choose action"
23+
type: choice
24+
required: true
25+
default: diff
26+
options:
27+
- diff
28+
- deploy
2129

2230
jobs:
2331
check-parameters:
@@ -46,7 +54,9 @@ jobs:
4654
upgrade-or-install-deployment:
4755
name: Upgrade or install deployment
4856
needs: build-and-push
49-
uses: ./.github/workflows/reusable-stage-prod-deployment.yml
57+
uses: ./.github/workflows/reusable-ecamp3-deployment.yml
5058
with:
5159
restoreSourceFile: ${{ inputs.restoreSourceFile }}
60+
env: ${{ github.ref_name }}
61+
action: ${{ github.event.inputs.action }}
5262
secrets: inherit

.github/workflows/reusable-dev-deployment.yml

Lines changed: 0 additions & 190 deletions
This file was deleted.

0 commit comments

Comments
 (0)