Skip to content

Commit

Permalink
build: Retry downloading Kustomize (#3792)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Sep 14, 2020
1 parent ed79a54 commit a93021a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ jobs:
run: |
echo "::add-path::/home/runner/go/bin"
echo "::add-path::/usr/local/bin"
- name: Install Kustomize
if: ${{ matrix.test != 'test' }}
run: |
cd /usr/local/bin && curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
kustomize version
- name: Install and start K3S v1.0.1
if: ${{ matrix.test != 'test' }}
run: curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.0.1 INSTALL_K3S_EXEC=--docker K3S_KUBECONFIG_MODE=644 sh - &
Expand Down
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,18 @@ proto: $(GOPATH)/bin/go-to-protobuf $(GOPATH)/bin/protoc-gen-gogo $(GOPATH)/bin/
./hack/generate-proto.sh
./hack/update-codegen.sh

dist/install_kustomize.sh:
mkdir -p dist
./hack/recurl.sh dist/install_kustomize.sh https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh

/usr/local/bin/kustomize: dist/install_kustomize.sh
chmod +x ./dist/install_kustomize.sh
./dist/install_kustomize.sh
sudo mv kustomize /usr/local/bin/
kustomize version

.PHONY: manifests
manifests: crds
manifests: crds /usr/local/bin/kustomize
./hack/update-image-tags.sh manifests/base $(VERSION)
kustomize build --load_restrictor=none manifests/cluster-install | ./hack/auto-gen-msg.sh > manifests/install.yaml
kustomize build --load_restrictor=none manifests/namespace-install | ./hack/auto-gen-msg.sh > manifests/namespace-install.yaml
Expand Down Expand Up @@ -318,7 +328,11 @@ $(GOPATH)/bin/go-junit-report:
test-results/junit.xml: $(GOPATH)/bin/go-junit-report test-results/test.out
cat test-results/test.out | go-junit-report > test-results/junit.xml

dist/$(PROFILE).yaml: $(MANIFESTS) $(E2E_MANIFESTS)
.PHONY: test-report
test-report: test-results/junit.xml
go run ./hack test-report

dist/$(PROFILE).yaml: $(MANIFESTS) $(E2E_MANIFESTS) /usr/local/bin/kustomize
mkdir -p dist
kustomize build --load_restrictor=none test/e2e/manifests/$(PROFILE) | sed 's/:latest/:$(VERSION)/' | sed 's/pns/$(E2E_EXECUTOR)/' > dist/$(PROFILE).yaml

Expand Down

0 comments on commit a93021a

Please sign in to comment.