From f192daf4be83f88477988063c0ef43e0df1c1aa2 Mon Sep 17 00:00:00 2001 From: framework-automation <41898282+framework-automation[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:25:39 +0000 Subject: [PATCH] Upgrade CI (07 Aug 2024 15:25:39) --- .github/workflows/dco_test.yaml | 2 +- .github/workflows/debug.yaml | 30 +++++++++++++++++++ .github/workflows/operator_ci_approved.yaml | 2 +- .github/workflows/operator_convert.yaml | 2 +- .github/workflows/operator_release.yaml | 16 ++++++---- .../workflows/operator_release_manual.yaml | 12 ++++---- .github/workflows/operator_test.yaml | 4 +-- 7 files changed, 52 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/debug.yaml diff --git a/.github/workflows/dco_test.yaml b/.github/workflows/dco_test.yaml index b0eb7d01d..90bdb1eb1 100644 --- a/.github/workflows/dco_test.yaml +++ b/.github/workflows/dco_test.yaml @@ -20,7 +20,7 @@ env: OPP_THIS_BRANCH: "main" OPP_PROD: 0 OPP_DRY_RUN: 0 - KIND_KUBE_VERSION: "v1.26.3" + KIND_KUBE_VERSION: "v1.30.0" OPP_PRODUCTION_TYPE: "k8s" OPP_REVIEWERS_ENABLED: 0 diff --git a/.github/workflows/debug.yaml b/.github/workflows/debug.yaml new file mode 100644 index 000000000..4d797370f --- /dev/null +++ b/.github/workflows/debug.yaml @@ -0,0 +1,30 @@ + +name: Debug +on: + workflow_dispatch: + inputs: + os: + required: true + type: choice + options: + - ubuntu-latest + - ubuntu-22.04 + - ubuntu-20.04 + +jobs: + debug: + runs-on: "${{ github.event.inputs.os }}" + #container: quay.io/operator_testing/operator-test-playbooks:latest + steps: + - name: Run debug tests + run: | + set -x + id + uname -a + cat /etc/os-release + cat /etc/subuid + cat /etc/subgid + docker version + docker run -it --rm quay.io/quay/busybox date + sleep 5 + echo done diff --git a/.github/workflows/operator_ci_approved.yaml b/.github/workflows/operator_ci_approved.yaml index ff3739bd6..f19996ba5 100644 --- a/.github/workflows/operator_ci_approved.yaml +++ b/.github/workflows/operator_ci_approved.yaml @@ -22,7 +22,7 @@ env: OPP_THIS_BRANCH: "main" OPP_PROD: 0 OPP_DRY_RUN: 0 - KIND_KUBE_VERSION: "v1.26.3" + KIND_KUBE_VERSION: "v1.30.0" OPP_PRODUCTION_TYPE: "k8s" OPP_REVIEWERS_ENABLED: 0 diff --git a/.github/workflows/operator_convert.yaml b/.github/workflows/operator_convert.yaml index e962d1d47..06ae6595c 100644 --- a/.github/workflows/operator_convert.yaml +++ b/.github/workflows/operator_convert.yaml @@ -78,7 +78,7 @@ jobs: ANSIBLE_TAGS="operator_info" cd $PROJECT_DIR echo "Moving bundle for '$op' ..." - [ -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 ..." + mv $PROJECT_DIR/operators/$op/ci.yaml /tmp/operator-test/operators/$op/ rm -rf $PROJECT_DIR/operators/$op mv /tmp/operator-test/operators/$op $PROJECT_DIR/operators/$op find $PROJECT_DIR/operators/$op -name 'bundle.Dockerfile' -delete diff --git a/.github/workflows/operator_release.yaml b/.github/workflows/operator_release.yaml index ac6d50a34..a70531949 100644 --- a/.github/workflows/operator_release.yaml +++ b/.github/workflows/operator_release.yaml @@ -222,16 +222,22 @@ jobs: OPP_OP_INFO_PARALLEL: 1 OPP_OP_INFO_PARALLEL_BATCH: 20 + THIS_OPERATOR: ${{ needs.pr-check.outputs.opp_name }} OPP_AUTO_LABEL: 1 ANSIBLE_FORCE_COLOR: 1 ANSIBLE_DISPLAY_SKIPPED_HOSTS: 0 ANSIBLE_STDOUT_CALLBACK: "yaml" - TMPDIR: "/mnt/tmp" run: | - sudo mkdir -p "${TMPDIR}" - sudo chmod 1777 "${TMPDIR}" - OPP_FORCE_OPERATORS=${OPP_FORCE_OPERATORS// /,} - echo $OPP_FORCE_OPERATORS + + echo "Operators out of sync: ${OPP_FORCE_OPERATORS}" + OTHER_OPERATORS=$(echo ${OPP_FORCE_OPERATORS} | tr ' ' '\n' | grep -v "^${THIS_OPERATOR}$" | shuf | head -2 | xargs echo | tr ' ' ',') + if [ -n "${OTHER_OPERATORS}" ] ; then + OPP_FORCE_OPERATORS="${THIS_OPERATOR},${OTHER_OPERATORS}" + else + OPP_FORCE_OPERATORS="${THIS_OPERATOR}" + fi + + echo "Syncing: ${OPP_FORCE_OPERATORS}" [ "$OPP_AUTO_LABEL" = '1' ] && ANSIBLE_ARGS="-e automatic_cluster_version_label=true" || ANSIBLE_ARGS="-e automatic_cluster_version_label=false" [ "$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" echo $ANSIBLE_ARGS diff --git a/.github/workflows/operator_release_manual.yaml b/.github/workflows/operator_release_manual.yaml index 0c34f544d..6a26bd0b5 100644 --- a/.github/workflows/operator_release_manual.yaml +++ b/.github/workflows/operator_release_manual.yaml @@ -210,7 +210,7 @@ jobs: for index in $(echo '${{ github.event.inputs.index }}' | jq -r .[]); do TARGET_INDEX_RAW=$(echo $index|cut -d '-' -f1) - TARGET_INDEX_UNDERLINE=$(echo $TARGET_INDEX_RAW|tr '.' '_') + TARGET_INDEX_UNDERLINE=$(echo $TARGET_INDEX_RAW|tr '.' '_') export OPP_FORCE_OPERATORS_$TARGET_INDEX_UNDERLINE="${{ github.event.inputs.list_of_operators }}" echo "opp_uncomplete_operators_$TARGET_INDEX_UNDERLINE=${{ github.event.inputs.list_of_operators }}" >> $GITHUB_OUTPUT done @@ -229,16 +229,16 @@ jobs: OPP_OP_INFO_PARALLEL: 1 OPP_OP_INFO_PARALLEL_BATCH: 20 + THIS_OPERATOR: ${{ needs.pr-check.outputs.opp_name }} OPP_AUTO_LABEL: 1 ANSIBLE_FORCE_COLOR: 1 ANSIBLE_DISPLAY_SKIPPED_HOSTS: 0 ANSIBLE_STDOUT_CALLBACK: "yaml" - TMPDIR: "/mnt/tmp" run: | - sudo mkdir -p "${TMPDIR}" - sudo chmod 1777 "${TMPDIR}" + OPP_FORCE_OPERATORS=${OPP_FORCE_OPERATORS// /,} - echo $OPP_FORCE_OPERATORS + + echo "Syncing: ${OPP_FORCE_OPERATORS}" [ "$OPP_AUTO_LABEL" = '1' ] && ANSIBLE_ARGS="-e automatic_cluster_version_label=true" || ANSIBLE_ARGS="-e automatic_cluster_version_label=false" [ "$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" echo $ANSIBLE_ARGS @@ -347,7 +347,7 @@ jobs: for index in $(echo '${{ github.event.inputs.index }}' | jq -r .[]); do TARGET_INDEX_RAW=$(echo $index|cut -d '-' -f1) - TARGET_INDEX_UNDERLINE=$(echo $TARGET_INDEX_RAW|tr '.' '_') + TARGET_INDEX_UNDERLINE=$(echo $TARGET_INDEX_RAW|tr '.' '_') export OPP_FORCE_OPERATORS_$TARGET_INDEX_UNDERLINE="${{ github.event.inputs.list_of_operators }}" done diff --git a/.github/workflows/operator_test.yaml b/.github/workflows/operator_test.yaml index 39f8d9981..5ac71eed3 100644 --- a/.github/workflows/operator_test.yaml +++ b/.github/workflows/operator_test.yaml @@ -36,8 +36,8 @@ env: OPP_DRY_RUN: 0 # TODO handle config OPP_PACKAGEMANIFEST_DISABLED: "0" - KIND_VERSION: "v0.18.0" - KIND_KUBE_VERSION_LATEST: "v1.26.3" + KIND_VERSION: "v0.23.0" + KIND_KUBE_VERSION_LATEST: "v1.30.0" OPP_PRODUCTION_TYPE: "k8s" OPP_REVIEWERS_ENABLED: 0 OPP_FORCE_DEPLOY_ON_K8S_OPENSHIFT_VERSION: 4.10