From 7283139e066bb89d4ae789c380a5e1846a95c774 Mon Sep 17 00:00:00 2001 From: May <110405507+mushroomempires@users.noreply.github.com> Date: Mon, 27 May 2024 16:14:26 +0200 Subject: [PATCH] [release-24.04] fix(ci): fix promote action on debian (#1366) * switch around source and destination in nagios plugins symlink (#1297) * fix promote action on debian (#1363) --------- Co-authored-by: May <110405507+paul-oureib@users.noreply.github.com> --- .github/actions/promote-to-stable/action.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/actions/promote-to-stable/action.yml b/.github/actions/promote-to-stable/action.yml index 0b7ce45c45b..45cb675a025 100644 --- a/.github/actions/promote-to-stable/action.yml +++ b/.github/actions/promote-to-stable/action.yml @@ -122,7 +122,13 @@ runs: ROOT_REPO_PATH="apt-standard-${{ inputs.major_version }}" echo "[DEBUG] - Get path of testing DEB packages to promote to stable." - SRC_PATHS=$(jf rt search --include-dirs "$ROOT_REPO_PATH-testing/pool/${{ inputs.module_name }}/*${{ inputs.distrib }}*.deb | jq -r '.[].path') + + case "${{ inputs.major_version }}" in + "22.10"|"23.04"|"23.10") + SRC_PATHS=$(jf rt search --include-dirs $ROOT_REPO_PATH-testing/pool/${{ inputs.module_name }}/*.deb | jq -r '.[].path') + *) + SRC_PATHS=$(jf rt search --include-dirs $ROOT_REPO_PATH-testing/pool/${{ inputs.module_name }}/*${{ inputs.distrib }}*.deb | jq -r '.[].path') + esac if [[ ${SRC_PATHS[@]} ]]; then for SRC_PATH in ${SRC_PATHS[@]}; do @@ -143,7 +149,14 @@ runs: jf rt download $ARTIFACT --flat done - for ARTIFACT_DL in $(dir -1|grep -E ".+${{ inputs.distrib }}.+\.deb"); do + case "${{ inputs.major_version }}" in + "22.10"|"23.04"|"23.10") + ARTIFACT_SEARCH_PATTERN=".+\.deb" + *) + ARTIFACT_SEARCH_PATTERN=".+${{ inputs.distrib }}.+\.deb" + esac + + for ARTIFACT_DL in $(dir -1|grep -E $ARTIFACT_SEARCH_PATTERN); do ARCH=$(echo $ARTIFACT_DL | cut -d '_' -f3 | cut -d '.' -f1) echo "[DEBUG] - Promoting (upload) $ARTIFACT_DL to stable $TARGET_PATH." jf rt upload "$ARTIFACT_DL" "$TARGET_PATH" --deb "${{ inputs.distrib }}/main/$ARCH" --flat