Skip to content

Commit 6e255b0

Browse files
committed
CI: Support check mode for package and container promotion
1 parent f3fb8d8 commit 6e255b0

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.github/workflows/container-promote.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ on:
1717
required: false
1818
description: Branch of StackHPC Kayobe configuration to use
1919
default: stackhpc/yoga
20+
check-mode:
21+
description: Check mode
22+
type: boolean
23+
required: false
24+
default: false
2025

2126
env:
2227
ANSIBLE_FORCE_COLOR: True
@@ -53,13 +58,19 @@ jobs:
5358

5459
- name: Promote images from stackhpc-dev to stackhpc namespace in Ark
5560
run: |
61+
args=""
62+
if [[ $CHECK_MODE = true ]]; then
63+
args="$args --check --diff"
64+
fi
5665
source venv/bin/activate &&
5766
ansible-playbook -i ansible/inventory \
5867
ansible/dev-pulp-container-tag-query-kayobe.yml \
5968
ansible/dev-pulp-container-promote.yml \
6069
-e kolla_container_image_filter="'$FILTER'" \
6170
-e kolla_base_distros_override="'$DISTROS'" \
62-
-e kayobe_config_repo_path=./stackhpc-kayobe-config/
71+
-e kayobe_config_repo_path=./stackhpc-kayobe-config/ \
72+
$args
6373
env:
6474
FILTER: ${{ github.event.inputs.filter }}
6575
DISTROS: ${{ github.event.inputs.distros }}
76+
CHECK_MODE: ${{ inputs.check-mode }}

.github/workflows/package-promote.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212
required: false
1313
description: Branch of StackHPC Kayobe configuration to use
1414
default: stackhpc/wallaby
15+
check-mode:
16+
description: Check mode
17+
type: boolean
18+
required: false
19+
default: false
1520

1621
env:
1722
ANSIBLE_FORCE_COLOR: True
@@ -48,12 +53,18 @@ jobs:
4853
4954
- name: Promote package repositories in Ark to release
5055
run: |
56+
args=""
57+
if [[ $CHECK_MODE = true ]]; then
58+
args="$args --check --diff"
59+
fi
5160
source venv/bin/activate &&
5261
ansible-playbook -i ansible/inventory \
5362
ansible/dev-pulp-repo-version-query-kayobe.yml \
5463
ansible/dev-pulp-repo-promote.yml \
5564
-e deb_package_repo_filter="'$FILTER'" \
5665
-e rpm_package_repo_filter="'$FILTER'" \
57-
-e kayobe_config_repo_path=./stackhpc-kayobe-config/
66+
-e kayobe_config_repo_path=./stackhpc-kayobe-config/ \
67+
$args
5868
env:
5969
FILTER: ${{ github.event.inputs.filter }}
70+
CHECK_MODE: ${{ inputs.check-mode }}

0 commit comments

Comments
 (0)