Skip to content

Commit

Permalink
ci: install different version of external-snapshotter based on longho…
Browse files Browse the repository at this point in the history
…rn-images.txt

Signed-off-by: Yang Chiu <[email protected]>
  • Loading branch information
yangchiu authored and c3y1huang committed Dec 21, 2023
1 parent f28b8d3 commit c24355e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test_framework/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ install_cluster_autoscaler(){

install_csi_snapshotter_crds(){
CSI_SNAPSHOTTER_REPO_URL="https://github.com/kubernetes-csi/external-snapshotter.git"
CSI_SNAPSHOTTER_REPO_BRANCH="v6.2.1"
CSI_SNAPSHOTTER_REPO_DIR="${TMPDIR}/k8s-csi-external-snapshotter"

[[ "${LONGHORN_REPO_URL}" =~ https://([^/]+)/([^/]+)/([^/.]+)(.git)? ]]
wget "https://raw.githubusercontent.com/${BASH_REMATCH[2]}/${BASH_REMATCH[3]}/${LONGHORN_REPO_BRANCH}/deploy/longhorn-images.txt" -O "/tmp/longhorn-images.txt"
IFS=: read -ra IMAGE_TAG_PAIR <<< $(grep csi-snapshotter /tmp/longhorn-images.txt)
CSI_SNAPSHOTTER_REPO_BRANCH="${IMAGE_TAG_PAIR[1]}"

git clone --single-branch \
--branch "${CSI_SNAPSHOTTER_REPO_BRANCH}" \
"${CSI_SNAPSHOTTER_REPO_URL}" \
Expand Down

0 comments on commit c24355e

Please sign in to comment.