Skip to content

Commit d62cb76

Browse files
committed
fix for absent baseline target
1 parent 9f401c8 commit d62cb76

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/slo.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,23 @@ jobs:
187187
rm -rf "$GITHUB_WORKSPACE/baseline/tests/slo/internal"
188188
cp -r "$GITHUB_WORKSPACE/current/tests/slo/internal" "$GITHUB_WORKSPACE/baseline/tests/slo/internal"
189189
190+
set +e
190191
docker build -t ydb-app-baseline \
191192
--build-arg SRC_PATH=${{ matrix.sdk.label }} \
192193
--build-arg JOB_NAME=${{ matrix.sdk.name }} \
193194
--build-arg REF="${{ steps.baseline.outputs.ref }}" \
194195
-f tests/slo/Dockerfile .
196+
EXIT_CODE=$?
197+
echo "BUILD_EXIT_CODE=$EXIT_CODE" >> $GITHUB_ENV
198+
echo "Docker build exit code: $EXIT_CODE"
199+
if [ $EXIT_CODE -ne 0 ]; then
200+
echo "Baseline build failed, using current image as baseline"
201+
docker tag ydb-app-current ydb-app-baseline
202+
fi
203+
set -e
195204
else
196-
echo "No baseline app Dockerfile found"
197-
exit 1
205+
echo "No baseline app Dockerfile found, using current image as baseline"
206+
docker tag ydb-app-current ydb-app-baseline
198207
fi
199208
200209
- name: Initialize YDB SLO

0 commit comments

Comments
 (0)