Skip to content

Commit 89d9c94

Browse files
committed
Pipeline fix
1 parent f0d24fb commit 89d9c94

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

.harness/orgs/PROD/projects/Harness_Split/pipelines/androidclientdiffuse.yaml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,23 @@ pipeline:
139139
# Fetch all branches from remote so diffuse.sh can access them
140140
echo "Fetching branches from remote..."
141141
git fetch origin --prune > /dev/null 2>&1
142-
git fetch origin "$SOURCE_BRANCH:$SOURCE_BRANCH" > /dev/null 2>&1 || true
143-
git fetch origin "$TARGET_BRANCH:$TARGET_BRANCH" > /dev/null 2>&1 || true
142+
git fetch origin "$SOURCE_BRANCH" > /dev/null 2>&1 || true
143+
git fetch origin "$TARGET_BRANCH" > /dev/null 2>&1 || true
144+
145+
# Debug: Show what branches/refs exist
146+
echo "=== Available branches and refs ==="
147+
git branch -r | grep -E "(${SOURCE_BRANCH}|${TARGET_BRANCH})" || true
148+
echo "Current HEAD: $(git rev-parse HEAD)"
149+
echo "origin/${SOURCE_BRANCH}: $(git rev-parse origin/${SOURCE_BRANCH} 2>/dev/null || echo 'NOT FOUND')"
150+
echo "origin/${TARGET_BRANCH}: $(git rev-parse origin/${TARGET_BRANCH} 2>/dev/null || echo 'NOT FOUND')"
151+
152+
# Use remote branch references (origin/branch-name) for the diffuse script
153+
# This ensures we compare the actual remote branches, not local refs
154+
SOURCE_REF="origin/${SOURCE_BRANCH}"
155+
TARGET_REF="origin/${TARGET_BRANCH}"
156+
144157
echo "✓ Branches fetched"
158+
echo "Will compare: $SOURCE_REF (source) vs $TARGET_REF (target)"
145159
146160
# Verify the script exists
147161
if [ ! -f "scripts/diffuse.sh" ]; then
@@ -154,17 +168,22 @@ pipeline:
154168
# Make the script executable
155169
chmod +x scripts/diffuse.sh
156170
157-
# Run the diffuse script with branch parameters
158-
echo "Executing: ./scripts/diffuse.sh --source '$SOURCE_BRANCH' --target '$TARGET_BRANCH'"
171+
# Run the diffuse script with remote branch references in verbose mode for debugging
172+
echo "Executing: ./scripts/diffuse.sh --source '$SOURCE_REF' --target '$TARGET_REF' --verbose"
159173
160174
# Run and capture output
161175
set +e # Don't exit on error
162-
./scripts/diffuse.sh --source "$SOURCE_BRANCH" --target "$TARGET_BRANCH" > diffuse_output_full.txt 2>&1
176+
./scripts/diffuse.sh --source "$SOURCE_REF" --target "$TARGET_REF" --verbose > diffuse_output_full.txt 2>&1
163177
DIFFUSE_EXIT_CODE=$?
164178
set -e
165179
166180
echo ""
167181
echo "=== Diffuse Script Exit Code: $DIFFUSE_EXIT_CODE ==="
182+
183+
# Show the full verbose output for debugging
184+
echo "=== Full Diffuse Output (for debugging) ==="
185+
cat diffuse_output_full.txt
186+
echo "=== End Full Output ==="
168187
169188
# Extract only the comparison tables from the output
170189
sed 's/\x1b\[[0-9;]*m//g' diffuse_output_full.txt | \

0 commit comments

Comments
 (0)