From 74fc6011910b3f28aa40cf8d8b1cf731d1c0b16d Mon Sep 17 00:00:00 2001 From: Bastien Soria <40743976+BlasttS@users.noreply.github.com> Date: Mon, 1 Jun 2026 16:22:45 +0200 Subject: [PATCH 1/4] Bump version to 2.106.0 (#3526) --- build/npm/v2-jf/package-lock.json | 2 +- build/npm/v2-jf/package.json | 2 +- build/npm/v2/package-lock.json | 2 +- build/npm/v2/package.json | 2 +- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ utils/cliutils/cli_consts.go | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/build/npm/v2-jf/package-lock.json b/build/npm/v2-jf/package-lock.json index 18ca4b137..db5ed1e84 100644 --- a/build/npm/v2-jf/package-lock.json +++ b/build/npm/v2-jf/package-lock.json @@ -1,5 +1,5 @@ { "name": "jfrog-cli-v2-jf", - "version": "2.105.0", + "version": "2.106.0", "lockfileVersion": 1 } diff --git a/build/npm/v2-jf/package.json b/build/npm/v2-jf/package.json index a36e48263..010582472 100644 --- a/build/npm/v2-jf/package.json +++ b/build/npm/v2-jf/package.json @@ -1,6 +1,6 @@ { "name": "jfrog-cli-v2-jf", - "version": "2.105.0", + "version": "2.106.0", "description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸", "homepage": "https://github.com/jfrog/jfrog-cli", "preferGlobal": true, diff --git a/build/npm/v2/package-lock.json b/build/npm/v2/package-lock.json index 7b03f1436..53c53ce72 100644 --- a/build/npm/v2/package-lock.json +++ b/build/npm/v2/package-lock.json @@ -1,5 +1,5 @@ { "name": "jfrog-cli-v2", - "version": "2.105.0", + "version": "2.106.0", "lockfileVersion": 2 } diff --git a/build/npm/v2/package.json b/build/npm/v2/package.json index cb03ac978..60d8bd99d 100644 --- a/build/npm/v2/package.json +++ b/build/npm/v2/package.json @@ -1,6 +1,6 @@ { "name": "jfrog-cli-v2", - "version": "2.105.0", + "version": "2.106.0", "description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸", "homepage": "https://github.com/jfrog/jfrog-cli", "preferGlobal": true, diff --git a/go.mod b/go.mod index 3e30cf33a..c9bc574ba 100644 --- a/go.mod +++ b/go.mod @@ -15,15 +15,15 @@ require ( github.com/buger/jsonparser v1.2.0 github.com/gocarina/gocsv v0.0.0-20260523204920-c264028e67ea github.com/jfrog/archiver/v3 v3.6.3 - github.com/jfrog/build-info-go v1.13.1-0.20260526201157-3dd942bd9e1f + github.com/jfrog/build-info-go v1.13.1-0.20260528065004-80409c046540 github.com/jfrog/gofrog v1.7.6 github.com/jfrog/jfrog-cli-application v1.0.2-0.20260511133105-55a0ab56fd64 - github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260527043943-fdf755c4f4c2 - github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260528061115-b41c87af0194 - github.com/jfrog/jfrog-cli-evidence v0.9.4 + github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260601110159-16e27949b870 + github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260601130310-8d52a530da18 + github.com/jfrog/jfrog-cli-evidence v0.9.5-0.20260528121456-17c6218af996 github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20260430094150-ce7d9b371c6f - github.com/jfrog/jfrog-cli-security v1.29.2 - github.com/jfrog/jfrog-client-go v1.55.1-0.20260527095031-a0b759bcd723 + github.com/jfrog/jfrog-cli-security v1.29.3 + github.com/jfrog/jfrog-client-go v1.55.1-0.20260528115006-6ca9682a3255 github.com/jszwec/csvutil v1.10.0 github.com/moby/moby/api v1.54.2 github.com/spf13/viper v1.21.0 diff --git a/go.sum b/go.sum index 5f4f08d77..c74d1c1be 100644 --- a/go.sum +++ b/go.sum @@ -400,8 +400,8 @@ github.com/jellydator/ttlcache/v3 v3.4.0 h1:YS4P125qQS0tNhtL6aeYkheEaB/m8HCqdMMP github.com/jellydator/ttlcache/v3 v3.4.0/go.mod h1:Hw9EgjymziQD3yGsQdf1FqFdpp7YjFMd4Srg5EJlgD4= github.com/jfrog/archiver/v3 v3.6.3 h1:hkAmPjBw393tPmQ07JknLNWFNZjXdy2xFEnOW9wwOxI= github.com/jfrog/archiver/v3 v3.6.3/go.mod h1:5V9l+Fte30Y4qe9dUOAd3yNTf8lmtVNuhKNrvI8PMhg= -github.com/jfrog/build-info-go v1.13.1-0.20260526201157-3dd942bd9e1f h1:2f9rUp14HdL8SD84/3Vu1UOmn71OIX7MxmHLW4VCjwM= -github.com/jfrog/build-info-go v1.13.1-0.20260526201157-3dd942bd9e1f/go.mod h1:CYRUCvLKfyARjoJXLWAxce1qNUxTEtbRKAARkV42vpE= +github.com/jfrog/build-info-go v1.13.1-0.20260528065004-80409c046540 h1:yJjTgSfmsBx9Q6/iiJxXQ/m0KZfFjNx8nNzaRLCM7z4= +github.com/jfrog/build-info-go v1.13.1-0.20260528065004-80409c046540/go.mod h1:CYRUCvLKfyARjoJXLWAxce1qNUxTEtbRKAARkV42vpE= github.com/jfrog/froggit-go v1.22.0 h1:eeN5F8sOUo+h2cXkzArAu4nvSdjkDTAZtgqwrct70qg= github.com/jfrog/froggit-go v1.22.0/go.mod h1:wRDryqyp3oe+eHgME2mpnEQmO8XBECIPagFwj0nHmdI= github.com/jfrog/go-mockhttp v0.3.1 h1:/wac8v4GMZx62viZmv4wazB5GNKs+GxawuS1u3maJH8= @@ -412,18 +412,18 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= github.com/jfrog/jfrog-cli-application v1.0.2-0.20260511133105-55a0ab56fd64 h1:bxcy1v1LXQV4T0kVU1duWQr3h7vKfHyMD1B+IuFLWUw= github.com/jfrog/jfrog-cli-application v1.0.2-0.20260511133105-55a0ab56fd64/go.mod h1:cKqb/JgN+XuD4RhOxvSZnyGyXw3cJsTZfQT3rk9MCho= -github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260527043943-fdf755c4f4c2 h1:acwlLYjjglecqjXXgj2JoM1bUhH/dDMpLpJXrBfvyqU= -github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260527043943-fdf755c4f4c2/go.mod h1:T5HDtDxHlUZWF4LQnmF2kiyFyd8yLOf3K618BsG0CWk= -github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260528061115-b41c87af0194 h1:cwppCKLitT0XBqYGQimW00qyx1ej88sY+rIjXAWNvAU= -github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260528061115-b41c87af0194/go.mod h1:9R90mhbczGXwW5EGlDs7F08ejQU/xdoDhYHMvzBiqgE= -github.com/jfrog/jfrog-cli-evidence v0.9.4 h1:RAqZYaH2RrzmhW+bGA7dx/yTqa4X1fZ4/5V7VVMSJtc= -github.com/jfrog/jfrog-cli-evidence v0.9.4/go.mod h1:nLSLqLIhQz1Hi2n+KjHZTyK1mcmPLevv41LjItLswmE= +github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260601110159-16e27949b870 h1:oRICL3VxTToKN7DqufQyOkU2HXBoTQg3F405qfulFHs= +github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260601110159-16e27949b870/go.mod h1:GQEGVW3wT1XPykXNsEiPQrF8/+01JvDVcGGYb5vqJuE= +github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260601130310-8d52a530da18 h1:tPv7XscDFAZaijVwMQNb+HmuucUMYQdjuA5frdGzhF0= +github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260601130310-8d52a530da18/go.mod h1:9R90mhbczGXwW5EGlDs7F08ejQU/xdoDhYHMvzBiqgE= +github.com/jfrog/jfrog-cli-evidence v0.9.5-0.20260528121456-17c6218af996 h1:jFldEXM8i2G+iQDRMQZ1ZaEMF0H+D2mgG7gTVgQcbZg= +github.com/jfrog/jfrog-cli-evidence v0.9.5-0.20260528121456-17c6218af996/go.mod h1:GhNJQSN9Xv4f0BKxurColafSBmI6V6DVdhlqRmX2+yw= github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20260430094150-ce7d9b371c6f h1:M1cesbKYSznwPA76dNctjCELxGx34TSSjwoYnJm9/6Y= github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20260430094150-ce7d9b371c6f/go.mod h1:JUdq/dQoNscpta62FDCAcaSVbvcCOr5VkH8UeGTG1HQ= -github.com/jfrog/jfrog-cli-security v1.29.2 h1:amL7XBPL2weVMRkNUAgqOOrfb/+dIGo5EuFm7WJO4d4= -github.com/jfrog/jfrog-cli-security v1.29.2/go.mod h1:SiBy5+maHAqKzXzVNPgV+fZo6OgIcB6A3uTko2LYbiI= -github.com/jfrog/jfrog-client-go v1.55.1-0.20260527095031-a0b759bcd723 h1:iAm9OjrnK5hPps0ZkKg7Lxdq5Y4jp3BTOB86X5iyEHk= -github.com/jfrog/jfrog-client-go v1.55.1-0.20260527095031-a0b759bcd723/go.mod h1:FHpjN1nTDoj96xd6obe27EOgGErqzU0rQgC96L3Ch9E= +github.com/jfrog/jfrog-cli-security v1.29.3 h1:cIoDn5NkhmrVANUr22H2IVwYjqeFTA+e61lb4qE+8X8= +github.com/jfrog/jfrog-cli-security v1.29.3/go.mod h1:wTdl1sSLyq+TzOPnncxBBhqCKEqF2kp9l86k+Y5E3mM= +github.com/jfrog/jfrog-client-go v1.55.1-0.20260528115006-6ca9682a3255 h1:CIOMO1Hj5N6PaIu7sJZ9bPowcibkcaWDulM2R6LHO9o= +github.com/jfrog/jfrog-client-go v1.55.1-0.20260528115006-6ca9682a3255/go.mod h1:FHpjN1nTDoj96xd6obe27EOgGErqzU0rQgC96L3Ch9E= github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94= github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8= github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI= diff --git a/utils/cliutils/cli_consts.go b/utils/cliutils/cli_consts.go index dbe3debd7..88d54e2d2 100644 --- a/utils/cliutils/cli_consts.go +++ b/utils/cliutils/cli_consts.go @@ -4,7 +4,7 @@ import "time" const ( // General CLI constants - CliVersion = "2.105.0" + CliVersion = "2.106.0" ClientAgent = "jfrog-cli-go" // CLI base commands constants: From 21fa479a74e5e393fe1e7e3a905d02b57ff4c3cf Mon Sep 17 00:00:00 2001 From: Naveen Kumar Date: Tue, 2 Jun 2026 14:11:46 +0530 Subject: [PATCH 2/4] Rteco 1299 jfrog artifactory ecomatrix cli e2e (#3523) * RTECO-1299 - Added logs to kibana parameter --- .jfrog-pipelines/pipelines.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.jfrog-pipelines/pipelines.yml b/.jfrog-pipelines/pipelines.yml index 82afa6b51..ef074ea43 100644 --- a/.jfrog-pipelines/pipelines.yml +++ b/.jfrog-pipelines/pipelines.yml @@ -72,6 +72,14 @@ pipelines: default: "artifactory-dind-amd-scale-set" description: "GitHub Actions runs-on label for all test jobs (use your self-hosted label; github.com-style ubuntu-24.04 is often unavailable on GHE)" allowCustom: true + LOGS_TO_KIBANA: + default: "true" + description: "Forward Artifactory logs from the deployed ephemeral environment to Kibana (via Coralogix). Maps to the LOGS_TO_KIBANA parameter of the environment_setup_gen2 Jenkins job. Set 'false' to disable." + allowCustom: true + DEPLOYMENT_SIZING: + default: "large" + description: "Artifactory deployment sizing profile." + allowCustom: true steps: - name: setup_cli_test type: Bash @@ -140,6 +148,8 @@ pipelines: ACCOUNT_TYPE: "enterprise_plus" GROUP: "ARTIFACTORY" EXPIRY: 2d + LOGS_TO_KIBANA: "${LOGS_TO_KIBANA}" + DEPLOYMENT_SIZING: "${DEPLOYMENT_SIZING}" EXTRA_PARAMS: "conf_artifactory_unified_version=${RT_VERSION} master_key=${MASTER_KEY}" - name: setup_environment From 81782c3f3fb0336b2aa03f2380ef7914107fd8e9 Mon Sep 17 00:00:00 2001 From: Assaf Attias <49212512+attiasas@users.noreply.github.com> Date: Tue, 2 Jun 2026 14:57:16 +0300 Subject: [PATCH 3/4] Make sure to use cyclonedx-go 0.10.0 (#3525) --- go.mod | 3 +++ go.sum | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index c9bc574ba..d82b8131d 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,9 @@ module github.com/jfrog/jfrog-cli go 1.26.3 replace ( + // Should not be updated to 0.11.0+ due to default spec version change (1.6 -> 1.7, https://github.com/CycloneDX/cyclonedx-go/pull/257) + // Waiting for JPD to support the new spec version before allowing upgrade + github.com/CycloneDX/cyclonedx-go => github.com/CycloneDX/cyclonedx-go v0.10.0 // Should not be updated to 0.2.6 due to a bug (https://github.com/jfrog/jfrog-cli-core/pull/372) github.com/c-bata/go-prompt => github.com/c-bata/go-prompt v0.2.5 // Should not be updated to 0.2.0-beta.2 due to a bug (https://github.com/jfrog/jfrog-cli-core/pull/372) diff --git a/go.sum b/go.sum index c74d1c1be..65765bd56 100644 --- a/go.sum +++ b/go.sum @@ -38,8 +38,8 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQ github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/CycloneDX/cyclonedx-go v0.11.0 h1:GokP8FiRC+foiuwWhSSLpSD5H4hSWtGnR3wo7apkBFI= -github.com/CycloneDX/cyclonedx-go v0.11.0/go.mod h1:vUvbCXQsEm48OI6oOlanxstwNByXjCZ2wuleUlwGEO8= +github.com/CycloneDX/cyclonedx-go v0.10.0 h1:7xyklU7YD+CUyGzSFIARG18NYLsKVn4QFg04qSsu+7Y= +github.com/CycloneDX/cyclonedx-go v0.10.0/go.mod h1:vUvbCXQsEm48OI6oOlanxstwNByXjCZ2wuleUlwGEO8= github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE= github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= From b1b39cf25dec0017d538f40225b9b6f559e9cc05 Mon Sep 17 00:00:00 2001 From: Naveen Kumar Date: Tue, 2 Jun 2026 21:27:12 +0530 Subject: [PATCH 4/4] RTECO-1299 - Retry failed jfrog-cli-workflows runs via rerun-failed-jobs API --- .jfrog-pipelines/pipelines.yml | 92 +++++++++++++++++++++++++++++----- 1 file changed, 79 insertions(+), 13 deletions(-) diff --git a/.jfrog-pipelines/pipelines.yml b/.jfrog-pipelines/pipelines.yml index ef074ea43..aec1247fc 100644 --- a/.jfrog-pipelines/pipelines.yml +++ b/.jfrog-pipelines/pipelines.yml @@ -80,6 +80,14 @@ pipelines: default: "large" description: "Artifactory deployment sizing profile." allowCustom: true + MAX_RUN_RETRIES: + default: "2" + description: "Per-workflow run-level retry budget. When a dispatched workflow run finishes with a non-success conclusion, the pipeline calls GitHub's rerun-failed-jobs API up to this many times before declaring it failed. Set 0 to disable run-level retry." + allowCustom: true + MAX_WAIT_SECONDS: + default: "14400" + description: "Maximum total seconds to wait for all dispatched workflow runs (including reruns) to complete. Default 4h to accommodate up to MAX_RUN_RETRIES reruns of slow suites." + allowCustom: true steps: - name: setup_cli_test type: Bash @@ -308,6 +316,10 @@ pipelines: GH_JF_CLI_REPO="${JFROG_CLI_GITHUB_REPO:-jfrog/jfrog-cli}" GH_ACTIONS_RUNNER="${GHE_ACTIONS_RUNNER:-artifactory-dind-amd-scale-set}" + # Run-level retry knobs (see the readOnly env vars above). + MAX_RUN_RETRIES_RESOLVED="${MAX_RUN_RETRIES:-2}" + MAX_WAIT_RESOLVED="${MAX_WAIT_SECONDS:-14400}" + GITHUB_TOKEN_RESOLVED="${GITHUB_DISPATCH_TOKEN:-}" if [[ -z "${GITHUB_TOKEN_RESOLVED}" ]]; then GITHUB_TOKEN_RESOLVED="${int_jfrog_cli_gh_token:-}"; fi if [[ -z "${GITHUB_TOKEN_RESOLVED}" ]]; then GITHUB_TOKEN_RESOLVED="${int_jfrog_cli_gh_accessToken:-}"; fi @@ -327,6 +339,8 @@ pipelines: echo " jfrog_cli_repo : ${GH_JF_CLI_REPO}" echo " jfrog_cli_ref : ${CLI_REF}" echo " jfrog_url : ${JFROG_URL}" + echo " run-level retries per workflow : ${MAX_RUN_RETRIES_RESOLVED}" + echo " total wait budget (seconds) : ${MAX_WAIT_RESOLVED}" # ── Verify repo access ─────────────────────────────────────────── REPO_CODE=$(curl -sS -o /tmp/gh_repo.json -w "%{http_code}" \ @@ -490,14 +504,42 @@ pipelines: RUN_ENTRIES="${RUN_ENTRIES} ${GH_WF_FILE}:${RUN_ID}" done + # ── Initialise per-workflow retry budgets ──────────────────────── + # We can't use a bash associative array because the script may + # run under /bin/sh on some images. Use a single space-separated + # string of "name=count" entries and update it in-place. + RETRIES_LEFT="" + for ENTRY in ${RUN_ENTRIES}; do + GH_WF_FILE="${ENTRY%%:*}" + RETRIES_LEFT="${RETRIES_LEFT} ${GH_WF_FILE}=${MAX_RUN_RETRIES_RESOLVED}" + done + + get_retries_left() { + local name="$1" + echo "${RETRIES_LEFT}" \ + | tr ' ' '\n' \ + | awk -F= -v n="${name}" '$1 == n {print $2; exit}' + } + set_retries_left() { + local name="$1" + local count="$2" + local rebuilt="" + for kv in ${RETRIES_LEFT}; do + case "${kv}" in + "${name}="*) rebuilt="${rebuilt} ${name}=${count}" ;; + *) rebuilt="${rebuilt} ${kv}" ;; + esac + done + RETRIES_LEFT="${rebuilt}" + } + # ── Poll all runs until every one completes ────────────────────── echo "" - echo "Monitoring all workflow runs..." - MAX_WAIT=7200 + echo "Monitoring all workflow runs (retry budget: ${MAX_RUN_RETRIES_RESOLVED} per workflow, total wait ${MAX_WAIT_RESOLVED}s)..." ELAPSED=0 INTERVAL=60 - while [[ ${ELAPSED} -lt ${MAX_WAIT} ]]; do + while [[ ${ELAPSED} -lt ${MAX_WAIT_RESOLVED} ]]; do ALL_DONE=true ANY_FAILED=false FAILED_WORKFLOWS="" @@ -513,18 +555,42 @@ pipelines: "${GH_API_URL}/repos/${GH_WORKFLOWS_REPO}/actions/runs/${RUN_ID}") STATUS=$(echo "${RUN_JSON}" | jq -r '.status // empty') CONCLUSION=$(echo "${RUN_JSON}" | jq -r '.conclusion // empty') + RUN_ATTEMPT=$(echo "${RUN_JSON}" | jq -r '.run_attempt // 1') if [[ "${STATUS}" != "completed" ]]; then ALL_DONE=false - echo " [running] ${GH_WF_FILE} (${RUN_ID}): ${STATUS}" + echo " [running] ${GH_WF_FILE} (${RUN_ID}, attempt ${RUN_ATTEMPT}): ${STATUS}" LAST_SUMMARY="${LAST_SUMMARY}${GH_WF_FILE}:${STATUS};" elif [[ "${CONCLUSION}" != "success" ]]; then - ANY_FAILED=true - echo " [FAILED] ${GH_WF_FILE} (${RUN_ID}): ${CONCLUSION}" - FAILED_WORKFLOWS="${FAILED_WORKFLOWS} ${GH_WF_FILE}" - LAST_SUMMARY="${LAST_SUMMARY}${GH_WF_FILE}:${CONCLUSION};" + RL=$(get_retries_left "${GH_WF_FILE}") + RL="${RL:-0}" + if [[ "${RL}" -gt 0 ]]; then + NEW_RL=$((RL - 1)) + echo " [retry] ${GH_WF_FILE} (${RUN_ID}, attempt ${RUN_ATTEMPT}): ${CONCLUSION} -> calling rerun-failed-jobs (retries left after this: ${NEW_RL})" + RR_CODE=$(curl -sS -o /tmp/gh_rerun.json -w "%{http_code}" -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${GITHUB_TOKEN_RESOLVED}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "${GH_API_URL}/repos/${GH_WORKFLOWS_REPO}/actions/runs/${RUN_ID}/rerun-failed-jobs") + if [[ "${RR_CODE}" == "201" ]]; then + set_retries_left "${GH_WF_FILE}" "${NEW_RL}" + ALL_DONE=false + LAST_SUMMARY="${LAST_SUMMARY}${GH_WF_FILE}:retrying;" + else + echo " [retry] rerun-failed-jobs returned HTTP ${RR_CODE}; treating ${GH_WF_FILE} as failed" + cat /tmp/gh_rerun.json 2>/dev/null || true + ANY_FAILED=true + FAILED_WORKFLOWS="${FAILED_WORKFLOWS} ${GH_WF_FILE}" + LAST_SUMMARY="${LAST_SUMMARY}${GH_WF_FILE}:${CONCLUSION};" + fi + else + ANY_FAILED=true + echo " [FAILED] ${GH_WF_FILE} (${RUN_ID}, attempt ${RUN_ATTEMPT}): ${CONCLUSION} (no retries left)" + FAILED_WORKFLOWS="${FAILED_WORKFLOWS} ${GH_WF_FILE}" + LAST_SUMMARY="${LAST_SUMMARY}${GH_WF_FILE}:${CONCLUSION};" + fi else - echo " [ok] ${GH_WF_FILE} (${RUN_ID}): success" + echo " [ok] ${GH_WF_FILE} (${RUN_ID}, attempt ${RUN_ATTEMPT}): success" LAST_SUMMARY="${LAST_SUMMARY}${GH_WF_FILE}:success;" fi done @@ -532,18 +598,18 @@ pipelines: if [[ "${ALL_DONE}" == "true" ]]; then echo "" if [[ "${ANY_FAILED}" == "true" ]]; then - fail_jf_cli_tests "One or more workflow runs failed. ${LAST_SUMMARY}" + fail_jf_cli_tests "One or more workflow runs failed after exhausting retries. ${LAST_SUMMARY}" fi - echo "All workflow runs completed successfully." + echo "All workflow runs completed successfully. ${LAST_SUMMARY}" exit 0 fi - echo " --- sleeping ${INTERVAL}s (elapsed ${ELAPSED}s / ${MAX_WAIT}s) ---" + echo " --- sleeping ${INTERVAL}s (elapsed ${ELAPSED}s / ${MAX_WAIT_RESOLVED}s) ---" sleep "${INTERVAL}" ELAPSED=$((ELAPSED + INTERVAL)) done - fail_jf_cli_tests "Timed out after ${MAX_WAIT}s while waiting for workflow runs. ${LAST_SUMMARY}" + fail_jf_cli_tests "Timed out after ${MAX_WAIT_RESOLVED}s while waiting for workflow runs. ${LAST_SUMMARY}" onSuccess: - echo "JFrog CLI integration tests finished successfully."