Skip to content

Commit

Permalink
Refactor install tools for ci/release jobs (#440)
Browse files Browse the repository at this point in the history
* updates for helm, kubectl, goreleaser, syft, cosign and kind

Signed-off-by: cpanato <ctadeu@gmail.com>

* refactor ci/release install tools

Signed-off-by: cpanato <ctadeu@gmail.com>
  • Loading branch information
cpanato committed May 27, 2022
1 parent ab83f06 commit 49167c4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yaml
Expand Up @@ -27,15 +27,26 @@ jobs:

- uses: azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab # v1.1
with:
version: v3.8.2
version: v3.9.0

- name: Install GoReleaser
uses: goreleaser/goreleaser-action@68acf3b1adf004ac9c2f0a4259e85c5f66e99bef # v3.0.0
with:
install-only: true

- name: Install cosign
uses: sigstore/cosign-installer@536b37ec5d5b543420bdfd9b744c5965bd4d8730 # v2.3.0

- name: Install syft
uses: anchore/sbom-action/download-syft@bb716408e75840bbb01e839347cd213767269d4a # v0.11.0

- name: Install tools
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
curl -fsSLo kind "https://github.com/kubernetes-sigs/kind/releases/download/v0.12.0/kind-linux-amd64"
curl -fsSLo kind "https://github.com/kubernetes-sigs/kind/releases/download/v0.14.0/kind-linux-amd64"
chmod +x kind
sudo mv kind /usr/local/bin/kind
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/release.yaml
Expand Up @@ -30,6 +30,17 @@ jobs:
go-version: '1.18'
check-latest: true

- name: Install GoReleaser
uses: goreleaser/goreleaser-action@68acf3b1adf004ac9c2f0a4259e85c5f66e99bef # v3.0.0
with:
install-only: true

- name: Install cosign
uses: sigstore/cosign-installer@536b37ec5d5b543420bdfd9b744c5965bd4d8730 # v2.3.0

- name: Install syft
uses: anchore/sbom-action/download-syft@bb716408e75840bbb01e839347cd213767269d4a # v0.11.0

- name: Install tools
run: |
./setup.sh
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -23,14 +23,14 @@ RUN pip install "yamale==$yamale_version"

ARG TARGETPLATFORM
# Install kubectl
ARG kubectl_version=v1.22.5
ARG kubectl_version=v1.23.6
LABEL kubectl_version=$kubectl_version
RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$kubectl_version/bin/$TARGETPLATFORM/kubectl" && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/

# Install Helm
ARG helm_version=v3.8.1
ARG helm_version=v3.9.0
LABEL helm_version=$helm_version
RUN targetArch=$(echo $TARGETPLATFORM | cut -f2 -d '/') \
&& if [ ${targetArch} = "amd64" ]; then \
Expand Down
3 changes: 0 additions & 3 deletions setup.sh
Expand Up @@ -16,7 +16,4 @@

set -o errexit

go install github.com/goreleaser/goreleaser@v1.8.2
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/sigstore/cosign/cmd/cosign@v1.7.2
go install github.com/anchore/syft@v0.44.1

0 comments on commit 49167c4

Please sign in to comment.