Skip to content

Commit 90f2197

Browse files
committed
rollback support
Signed-off-by: Justin Kolberg <[email protected]>
1 parent c2d1621 commit 90f2197

File tree

7 files changed

+502
-0
lines changed

7 files changed

+502
-0
lines changed

.github/workflows/promote-test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish test
2+
3+
run-name: >
4+
${{ format('Publish Test for Workflow: {0}', inputs.workflow-id) }}
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
workflow-id:
10+
description: |
11+
Workflow Run ID from this repository to fetch artifacts from for this
12+
promotion.
13+
required: true
14+
type: string
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
20+
jobs:
21+
determine-run-info:
22+
name: Run Info
23+
uses: ./.github/workflows/workflow-determine-run-info.yml
24+
with:
25+
workflow-id: ${{ inputs.workflow-id }}
26+
27+
promote-container-images:
28+
name: Container images
29+
uses: ./.github/workflows/workflow-promote.yml
30+
needs:
31+
- determine-run-info
32+
with:
33+
build-number: ${{ needs.determine-run-info.outputs.build-number }}
34+
destination-channel: test
35+
git-sha: ${{ needs.determine-run-info.outputs.git-sha }}
36+
otc-core-version: ${{ needs.determine-run-info.outputs.otc-core-version }}
37+
otc-git-ref: ${{ needs.determine-run-info.outputs.otc-git-ref }}
38+
otc-sumo-version: ${{ needs.determine-run-info.outputs.otc-sumo-version }}
39+
otc-version: ${{ needs.determine-run-info.outputs.otc-version }}
40+
source-channel: ci
41+
workflow-id: ${{ inputs.workflow-id }}
42+
secrets: inherit
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Rollback release candidate
2+
3+
permissions:
4+
contents: read
5+
6+
run-name: >
7+
${{ format('Rollback Release Candidate: Workflow {0}', inputs.workflow-id) }}
8+
9+
on:
10+
workflow_dispatch:
11+
inputs:
12+
workflow-id:
13+
description: |
14+
Workflow Run ID from this repository that was promoted to release
15+
candidates and needs to be rolled back.
16+
required: true
17+
type: string
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
jobs:
24+
rollback:
25+
name: Container images
26+
uses: ./.github/workflows/workflow-rollback.yml
27+
with:
28+
channel: rc
29+
workflow-id: ${{ inputs.workflow-id }}
30+
secrets: inherit
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Rollback stable
2+
3+
permissions:
4+
contents: read
5+
6+
run-name: >
7+
${{ format('Rollback Stable: Workflow {0}', inputs.workflow-id) }}
8+
9+
on:
10+
workflow_dispatch:
11+
inputs:
12+
workflow-id:
13+
description: |
14+
Workflow Run ID from this repository that was promoted to stable and
15+
needs to be rolled back.
16+
required: true
17+
type: string
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
jobs:
24+
rollback:
25+
name: Container images
26+
uses: ./.github/workflows/workflow-rollback.yml
27+
with:
28+
channel: stable
29+
workflow-id: ${{ inputs.workflow-id }}
30+
secrets: inherit
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Rollback test
2+
3+
permissions:
4+
contents: read
5+
6+
run-name: >
7+
${{ format('Rollback Test: Workflow {0}', inputs.workflow-id) }}
8+
9+
on:
10+
workflow_dispatch:
11+
inputs:
12+
workflow-id:
13+
description: |
14+
Workflow Run ID from this repository that was promoted to testing-a
15+
and needs to be rolled back.
16+
required: true
17+
type: string
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
jobs:
24+
rollback:
25+
name: Container images
26+
uses: ./.github/workflows/workflow-rollback.yml
27+
with:
28+
channel: test
29+
workflow-id: ${{ inputs.workflow-id }}
30+
secrets: inherit

.github/workflows/workflow-promote.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
The destination channel to promote images to. Valid values are:
1919
- rc
2020
- stable
21+
- test
2122
type: string
2223
git-sha:
2324
description: The Git SHA used to build the container images.
@@ -44,6 +45,7 @@ on:
4445
The source channel to promote images from. Valid values are:
4546
- ci
4647
- rc
48+
- test
4749
type: string
4850
workflow-id:
4951
description: |

0 commit comments

Comments
 (0)