Skip to content

Commit 244d999

Browse files
fix(ci): make jfrog cache-hit branch explicit in app detection
Agent-Logs-Url: https://github.com/IONOS-Productivity/nc-server/sessions/25427ab9-aedf-4687-ab49-8e77056e504f Co-authored-by: printminion-co <145785698+printminion-co@users.noreply.github.com> Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
1 parent d00e9c1 commit 244d999

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/scripts/detect-app-cache.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ while IFS= read -r app_json; do
210210
# Check JFrog first before GitHub cache (available for all branches)
211211
if [ "$JFROG_AVAILABLE" == "true" ]; then
212212
JFROG_PATH="${ARTIFACTORY_REPOSITORY_SNAPSHOT}/apps/${CACHE_VERSION}/${APP_NAME}/${APP_NAME}-${ARCHIVE_SUFFIX}.tar.gz"
213+
FOUND_IN_JFROG="false"
213214

214215
echo ""
215216
echo " 🔍 Checking JFrog for $APP_NAME..."
@@ -231,7 +232,7 @@ while IFS= read -r app_json; do
231232
APPS_TO_RESTORE_COUNT=$((APPS_TO_RESTORE_COUNT + 1))
232233
# Add to restore list with JFrog source
233234
APPS_TO_RESTORE=$(echo "$APPS_TO_RESTORE" | jq -c --argjson app "$app_json" --arg sha "$CURRENT_SHA" --arg jfrog_path "$JFROG_PATH" --arg source "jfrog" '. + [($app + {sha: $sha, jfrog_path: $jfrog_path, source: $source})]')
234-
continue
235+
FOUND_IN_JFROG="true"
235236
else
236237
echo " ✗ Artifact not found in search results"
237238
fi
@@ -240,6 +241,11 @@ while IFS= read -r app_json; do
240241
echo " ✗ Search failed with error:"
241242
echo "$SEARCH_OUTPUT" | sed 's/^/ /'
242243
fi
244+
245+
if [ "$FOUND_IN_JFROG" == "true" ]; then
246+
continue
247+
fi
248+
243249
echo "⚡ needs build (JFrog miss)"
244250
echo "| $APP_NAME | \`$SHORT_SHA\` | \`$JFROG_PATH\` | 🔨 Needs build (not in JFrog) |" >> "$GITHUB_STEP_SUMMARY"
245251
APPS_TO_BUILD=$(echo "$APPS_TO_BUILD" | jq -c \

0 commit comments

Comments
 (0)