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 14612d0
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 -b main operator # Pass any branch name, this is just to avoid a warning from Git
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 14612d0

Please sign in to comment.