Skip to content

Commit c41b99a

Browse files
Upgrade CI (07 Aug 2024 16:34:29)
1 parent 6d247eb commit c41b99a

File tree

4 files changed

+48
-12
lines changed

4 files changed

+48
-12
lines changed

.github/workflows/debug.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
name: Debug
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
os:
7+
required: true
8+
type: choice
9+
options:
10+
- ubuntu-latest
11+
- ubuntu-22.04
12+
- ubuntu-20.04
13+
14+
jobs:
15+
debug:
16+
runs-on: "${{ github.event.inputs.os }}"
17+
#container: quay.io/operator_testing/operator-test-playbooks:latest
18+
steps:
19+
- name: Run debug tests
20+
run: |
21+
set -x
22+
id
23+
uname -a
24+
cat /etc/os-release
25+
cat /etc/subuid
26+
cat /etc/subgid
27+
docker version
28+
docker run -it --rm quay.io/quay/busybox date
29+
sleep 5
30+
echo done

.github/workflows/operator_convert.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
ANSIBLE_TAGS="operator_info"
7979
cd $PROJECT_DIR
8080
echo "Moving bundle for '$op' ..."
81-
[ -e $PROJECT_DIR/operators/$op/ci.yaml ] && mv $PROJECT_DIR/operators/$op/ci.yaml /tmp/operator-test/operators/$op/ || echo "ci.yaml file does not exist, skipping ..."
81+
mv $PROJECT_DIR/operators/$op/ci.yaml /tmp/operator-test/operators/$op/
8282
rm -rf $PROJECT_DIR/operators/$op
8383
mv /tmp/operator-test/operators/$op $PROJECT_DIR/operators/$op
8484
find $PROJECT_DIR/operators/$op -name 'bundle.Dockerfile' -delete

.github/workflows/operator_release.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,16 +222,22 @@ jobs:
222222
OPP_OP_INFO_PARALLEL: 1
223223
OPP_OP_INFO_PARALLEL_BATCH: 20
224224

225+
THIS_OPERATOR: ${{ needs.pr-check.outputs.opp_name }}
225226
OPP_AUTO_LABEL: 1
226227
ANSIBLE_FORCE_COLOR: 1
227228
ANSIBLE_DISPLAY_SKIPPED_HOSTS: 0
228229
ANSIBLE_STDOUT_CALLBACK: "yaml"
229-
TMPDIR: "/mnt/tmp"
230230
run: |
231-
sudo mkdir -p "${TMPDIR}"
232-
sudo chmod 1777 "${TMPDIR}"
233-
OPP_FORCE_OPERATORS=${OPP_FORCE_OPERATORS// /,}
234-
echo $OPP_FORCE_OPERATORS
231+
232+
echo "Operators out of sync: ${OPP_FORCE_OPERATORS}"
233+
OTHER_OPERATORS=$(echo ${OPP_FORCE_OPERATORS} | tr ' ' '\n' | grep -v "^${THIS_OPERATOR}$" | shuf | head -2 | xargs echo | tr ' ' ',')
234+
if [ -n "${OTHER_OPERATORS}" ] ; then
235+
OPP_FORCE_OPERATORS="${THIS_OPERATOR},${OTHER_OPERATORS}"
236+
else
237+
OPP_FORCE_OPERATORS="${THIS_OPERATOR}"
238+
fi
239+
240+
echo "Syncing: ${OPP_FORCE_OPERATORS}"
235241
[ "$OPP_AUTO_LABEL" = '1' ] && ANSIBLE_ARGS="-e automatic_cluster_version_label=true" || ANSIBLE_ARGS="-e automatic_cluster_version_label=false"
236242
[ "$OPP_OP_INFO_PARALLEL" = '1' ] && ANSIBLE_ARGS="$ANSIBLE_ARGS -e op_info_parallel=true -e op_info_parallel_batch=$OPP_OP_INFO_PARALLEL_BATCH" || ANSIBLE_ARGS="$ANSIBLE_ARGS -e op_info_parallel=false"
237243
echo $ANSIBLE_ARGS

.github/workflows/operator_release_manual.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ jobs:
210210
211211
for index in $(echo '${{ github.event.inputs.index }}' | jq -r .[]); do
212212
TARGET_INDEX_RAW=$(echo $index|cut -d '-' -f1)
213-
TARGET_INDEX_UNDERLINE=$(echo $TARGET_INDEX_RAW|tr '.' '_')
213+
TARGET_INDEX_UNDERLINE=$(echo $TARGET_INDEX_RAW|tr '.' '_')
214214
export OPP_FORCE_OPERATORS_$TARGET_INDEX_UNDERLINE="${{ github.event.inputs.list_of_operators }}"
215215
echo "opp_uncomplete_operators_$TARGET_INDEX_UNDERLINE=${{ github.event.inputs.list_of_operators }}" >> $GITHUB_OUTPUT
216216
done
@@ -229,16 +229,16 @@ jobs:
229229
OPP_OP_INFO_PARALLEL: 1
230230
OPP_OP_INFO_PARALLEL_BATCH: 20
231231

232+
THIS_OPERATOR: ${{ needs.pr-check.outputs.opp_name }}
232233
OPP_AUTO_LABEL: 1
233234
ANSIBLE_FORCE_COLOR: 1
234235
ANSIBLE_DISPLAY_SKIPPED_HOSTS: 0
235236
ANSIBLE_STDOUT_CALLBACK: "yaml"
236-
TMPDIR: "/mnt/tmp"
237237
run: |
238-
sudo mkdir -p "${TMPDIR}"
239-
sudo chmod 1777 "${TMPDIR}"
238+
240239
OPP_FORCE_OPERATORS=${OPP_FORCE_OPERATORS// /,}
241-
echo $OPP_FORCE_OPERATORS
240+
241+
echo "Syncing: ${OPP_FORCE_OPERATORS}"
242242
[ "$OPP_AUTO_LABEL" = '1' ] && ANSIBLE_ARGS="-e automatic_cluster_version_label=true" || ANSIBLE_ARGS="-e automatic_cluster_version_label=false"
243243
[ "$OPP_OP_INFO_PARALLEL" = '1' ] && ANSIBLE_ARGS="$ANSIBLE_ARGS -e op_info_parallel=true -e op_info_parallel_batch=$OPP_OP_INFO_PARALLEL_BATCH" || ANSIBLE_ARGS="$ANSIBLE_ARGS -e op_info_parallel=false"
244244
echo $ANSIBLE_ARGS
@@ -347,7 +347,7 @@ jobs:
347347
348348
for index in $(echo '${{ github.event.inputs.index }}' | jq -r .[]); do
349349
TARGET_INDEX_RAW=$(echo $index|cut -d '-' -f1)
350-
TARGET_INDEX_UNDERLINE=$(echo $TARGET_INDEX_RAW|tr '.' '_')
350+
TARGET_INDEX_UNDERLINE=$(echo $TARGET_INDEX_RAW|tr '.' '_')
351351
export OPP_FORCE_OPERATORS_$TARGET_INDEX_UNDERLINE="${{ github.event.inputs.list_of_operators }}"
352352
done
353353

0 commit comments

Comments
 (0)