Skip to content

Commit

Permalink
Fix zkop install to support sha1
Browse files Browse the repository at this point in the history
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
  • Loading branch information
francoisferrand committed Oct 23, 2024
1 parent f892f50 commit 7f541c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/actions/deploy/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 7f541c8

Please sign in to comment.