From 7f541c8f5684c527f214be09a707407e77ab8d46 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Wed, 23 Oct 2024 11:46:48 +0200 Subject: [PATCH] Fix zkop install to support sha1 When an SHA1 is used which is not the tip of the branch, it is not available after a `git clone` (which fetches only commits reachable from current branches). This causes issues if a build is started while the component branch with the commit has been rewritten (rebase...) To overcome this, the safe way is to explicitely fetch the commit: which works for any commit (branch, tag, sha1). Issue: ZENKO-4876 --- .github/actions/deploy/action.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/deploy/action.yaml b/.github/actions/deploy/action.yaml index 1fc7708f0c..5c4a76cfce 100644 --- a/.github/actions/deploy/action.yaml +++ b/.github/actions/deploy/action.yaml @@ -64,9 +64,10 @@ runs: docker pull ${OPERATOR_IMAGE_NAME}:${OPERATOR_IMAGE_TAG} kind load docker-image ${OPERATOR_IMAGE_NAME}:${OPERATOR_IMAGE_TAG} cd ./.github/scripts/end2end - git clone https://${GIT_ACCESS_TOKEN}@github.com/scality/zenko-operator.git operator + git init operator cd operator - git checkout ${OPERATOR_IMAGE_TAG} + git fetch --depth 1 --no-tags https://${GIT_ACCESS_TOKEN}@github.com/scality/zenko-operator.git ${OPERATOR_IMAGE_TAG} + git checkout FETCH_HEAD tilt ci env: OPERATOR_IMAGE_TAG: ${{ inputs.zkop_tag }}