@@ -8,34 +8,37 @@ declare -a DOCKER_PKGS_UBUNTU=("containerd.io_1.6.21-1_amd64.deb" "docker-ce-cli
8
8
declare -a DOCKER_PKGS_CENTOS=(" containerd.io-1.6.21-3.1.el8.x86_64.rpm" " docker-ce-20.10.24-3.el8.x86_64.rpm" " docker-ce-cli-20.10.24-3.el8.x86_64.rpm" " docker-ce-rootless-extras-20.10.24-3.el8.x86_64.rpm" " docker-compose-plugin-2.19.1-1.el8.x86_64.rpm" )
9
9
10
10
# Github assets
11
- KIND_ASSETS_URL=" https://github.com/kubernetes-sigs/kind/releases "
11
+ KIND_ASSETS_URL=" https://github.com/kubernetes-sigs/kind"
12
12
KIND_ASSETS_FILES=(kind-linux-amd64)
13
13
KIND_VERSION=" v0.20.0"
14
- CAPI_ASSETS_URL=" https://github.com/kubernetes-sigs/cluster-api/releases "
14
+ CAPI_ASSETS_URL=" https://github.com/kubernetes-sigs/cluster-api"
15
15
CAPI_ASSETS_FILES=(metadata.yaml bootstrap-components.yaml cluster-api-components.yaml clusterctl-linux-amd64 control-plane-components.yaml core-components.yaml)
16
- CAPA_ASSETS_URL=" https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases "
16
+ CAPA_ASSETS_URL=" https://github.com/kubernetes-sigs/cluster-api-provider-aws"
17
17
CAPA_ASSETS_FILES=(metadata.yaml clusterawsadm-linux-amd64 infrastructure-components.yaml)
18
- BYOH_ASSETS_URL=" https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/releases "
18
+ BYOH_ASSETS_URL=" https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost"
19
19
BYOH_ASSETS_FILES=(metadata.yaml infrastructure-components.yaml byoh-hostagent-linux-amd64)
20
- ARGOWF_ASSETS_URL=" https://github.com/argoproj/argo-workflows/releases "
20
+ ARGOWF_ASSETS_URL=" https://github.com/argoproj/argo-workflows"
21
21
ARGOWF_ASSETS_FILES=(argo-linux-amd64.gz)
22
- ARGOCD_ASSETS_URL=" https://github.com/argoproj/argo-cd/releases "
22
+ ARGOCD_ASSETS_URL=" https://github.com/argoproj/argo-cd"
23
23
ARGOCD_ASSETS_FILES=(argocd-linux-amd64)
24
- GUM_ASSETS_URL=" https://github.com/charmbracelet/gum/releases "
25
- GUM_ASSETS_FILES=(gum_0.10.0_linux_x86_64 .tar.gz)
26
- GUM_VERSION=" v0.10.0 "
27
- GITEA_ASSETS_URL=" https://github.com/go-gitea/gitea/releases "
24
+ GUM_ASSETS_URL=" https://github.com/charmbracelet/gum"
25
+ GUM_ASSETS_FILES=(gum_0.14.1_linux_x86_64 .tar.gz)
26
+ GUM_VERSION=" v0.14.1 "
27
+ GITEA_ASSETS_URL=" https://github.com/go-gitea/gitea"
28
28
GITEA_ASSETS_FILES=(gitea-1.18.1-linux-amd64)
29
29
GITEA_VERSION=" v1.8.1"
30
- EKSCTL_ASSETS_URL=" https://github.com/eksctl-io/eksctl/releases "
30
+ EKSCTL_ASSETS_URL=" https://github.com/eksctl-io/eksctl"
31
31
EKSCTL_ASSETS_FILES=(eksctl_linux_amd64.tar.gz)
32
32
EKSCTL_VERSION=" latest"
33
- AWS_IAM_AUTHENTICATOR_ASSETS_URL=" https://github.com/kubernetes-sigs/aws-iam-authenticator/releases "
33
+ AWS_IAM_AUTHENTICATOR_ASSETS_URL=" https://github.com/kubernetes-sigs/aws-iam-authenticator"
34
34
AWS_IAM_AUTHENTICATOR_ASSETS_FILES=(aws-iam-authenticator_0.5.9_linux_amd64)
35
35
AWS_IAM_AUTHENTICATOR_VERSION=" v0.5.9"
36
- JQ_ASSETS_URL=" https://github.com/jqlang/jq/releases "
36
+ JQ_ASSETS_URL=" https://github.com/jqlang/jq"
37
37
JQ_ASSETS_FILES=(jq-linux64)
38
38
JQ_VERSION=" jq-1.6"
39
+ IMGPKG_ASSETS_URL=" https://github.com/carvel-dev/imgpkg"
40
+ IMGPKG_ASSETS_FILES=(imgpkg-linux-amd64)
41
+ IMGPKG_VERSION=" ${IMGPKG_VERSION} "
39
42
40
43
# Git repos
41
44
# "repo_url,tag/branch,dest_dir"
@@ -46,7 +49,7 @@ git_repos+=("https://github.com/openinfradev/decapod-flow,${TKS_RELEASE},decapod
46
49
git_repos+=(" https://github.com/openinfradev/tks-flow,${TKS_RELEASE} ,tks-flow" )
47
50
git_repos+=(" https://github.com/openinfradev/decapod-base-yaml,${TKS_RELEASE} ,decapod-base-yaml" )
48
51
git_repos+=(" https://github.com/openinfradev/decapod-site,${TKS_RELEASE} ,decapod-site" )
49
- git_repos+=(" https://github.com/rancher/local-path-provisioner.git,master ,local-path-provisioner" )
52
+ git_repos+=(" https://github.com/rancher/local-path-provisioner.git,v0.0.28 ,local-path-provisioner" )
50
53
51
54
# Helm chart
52
55
# "chart_name,repo_url,chart_version,dest_dir"
@@ -80,14 +83,16 @@ download_assets_from_github () {
80
83
eval files=' $' {$1 _ASSETS_FILES[@]}
81
84
eval version=' $' $1 _VERSION
82
85
83
- reponame=${url%/ releases* }
84
- reponame=${reponame##* .com/ }
86
+ owner=${url#* github.com/ }
87
+ owner=${owner%%/* }
88
+
89
+ reponame=${url##*/ }
85
90
86
91
log_info " Downloading assets from $reponame "
87
92
88
93
if [[ $version == " latest" ]]
89
94
then
90
- tag=$( github_get_latest_release $reponame )
95
+ tag=$( github_get_latest_release $owner / $ reponame)
91
96
else
92
97
tag=$version
93
98
fi
@@ -97,7 +102,7 @@ download_assets_from_github () {
97
102
98
103
for f in ${files[@]}
99
104
do
100
- curl -sSL " $url /download/$tag /$f " -o $dest_dir /$f
105
+ curl -sSL " $url /releases/ download/$tag /$f " -o $dest_dir /$f
101
106
done
102
107
}
103
108
@@ -186,16 +191,16 @@ if [ -d $ASSETS_DIR ]; then
186
191
gum confirm " Are you sure you want to clear the current directory and proceed?" || exit 1
187
192
fi
188
193
189
- rm -rf $ASSETS_DIR
194
+ sudo rm -rf $ASSETS_DIR
190
195
191
196
mkdir $ASSETS_DIR
192
197
mkdir -p output
193
198
194
199
download_assets_from_github GUM
195
200
GUM_ASSETS_DIR=" $ASSETS_DIR /gum/$( ls $ASSETS_DIR /gum | grep v) "
196
201
cd $GUM_ASSETS_DIR
197
- tar xfz $( ls )
198
- sudo cp gum /usr/local/bin
202
+ gum_bin_path= $( tar xvfz ${GUM_ASSETS_FILES[0]} | grep gum$ )
203
+ sudo cp $gum_bin_path /usr/local/bin
199
204
cd - > /dev/null
200
205
201
206
log_info " Downloading docker packages"
@@ -239,6 +244,11 @@ for provider in ${CAPI_INFRA_PROVIDERS[@]}; do
239
244
download_assets_from_github BYOH
240
245
cp $ASSETS_DIR /cluster-api-provider-bringyourownhost/$BYOH_VERSION /byoh-hostagent-linux-amd64 output/byoh-hostagent
241
246
chmod +x output/byoh-hostagent
247
+
248
+ download_assets_from_github IMGPKG
249
+ cp $ASSETS_DIR /imgpkg/$IMGPKG_VERSION /imgpkg-linux-amd64 output/imgpkg
250
+ chmod +x output/imgpkg
251
+
242
252
sed -i " s#projects.registry.vmware.com/cluster_api_provider_bringyourownhost/cluster-api-byoh-controller:$BYOH_VERSION #$TKS_BYOH_CONTOLLER_IMAGE :$BYOH_TKS_VERSION #g" $ASSETS_DIR /cluster-api-provider-bringyourownhost/$BYOH_VERSION /infrastructure-components.yaml
243
253
;;
244
254
esac
0 commit comments