From 00008fe5b9c8de82a1a422781532c3f3cd7a45ed Mon Sep 17 00:00:00 2001 From: PratikforCoding Date: Tue, 22 Nov 2022 14:48:10 +0530 Subject: [PATCH 1/3] Updated go version to 1.19 in make file of jx-admin Signed-off-by: PratikforCoding --- Makefile | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b45bcb3..d8e1a9e 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ ORG := jenkins-x-plugins ORG_REPO := $(ORG)/$(NAME) RELEASE_ORG_REPO := $(ORG_REPO) ROOT_PACKAGE := github.com/$(ORG_REPO) -GO_VERSION := 1.17.9 +GO_VERSION := 1.19.3 GO_DEPENDENCIES := $(call rwildcard,pkg/,*.go) $(call rwildcard,cmd/,*.go) BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2> /dev/null || echo 'unknown') diff --git a/go.mod b/go.mod index 4ace722..3a6af91 100644 --- a/go.mod +++ b/go.mod @@ -101,4 +101,4 @@ replace ( k8s.io/client-go => k8s.io/client-go v0.22.15 ) -go 1.18 +go 1.19 From 0180b2f71f27a4977714b1a7259559084c54813c Mon Sep 17 00:00:00 2001 From: Pratik Kotal Date: Tue, 22 Nov 2022 21:09:09 +0530 Subject: [PATCH 2/3] Update Makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d8e1a9e..7d6dc12 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ ORG := jenkins-x-plugins ORG_REPO := $(ORG)/$(NAME) RELEASE_ORG_REPO := $(ORG_REPO) ROOT_PACKAGE := github.com/$(ORG_REPO) -GO_VERSION := 1.19.3 +GO_VERSION := $(shell $(GO) version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') GO_DEPENDENCIES := $(call rwildcard,pkg/,*.go) $(call rwildcard,cmd/,*.go) BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2> /dev/null || echo 'unknown') @@ -174,4 +174,4 @@ docs: bin/docs ## update docs @echo "Generating docs" @./bin/docs --target=./docs/cmd @./bin/docs --target=./docs/man/man1 --kind=man - @rm -f ./bin/docs \ No newline at end of file + @rm -f ./bin/docs From beb324089857ee2439b342cfce09c246d14e44e6 Mon Sep 17 00:00:00 2001 From: PratikforCoding Date: Sun, 27 Nov 2022 16:15:56 +0530 Subject: [PATCH 3/3] updated jenkins-x-release.yaml and upload-binaries.sh Signed-off-by: PratikforCoding --- .github/workflows/jenkins-x-release.yaml | 9 +++++---- .github/workflows/jenkins-x/upload-binaries.sh | 15 +-------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/jenkins-x-release.yaml b/.github/workflows/jenkins-x-release.yaml index 74e494a..2d7bb74 100644 --- a/.github/workflows/jenkins-x-release.yaml +++ b/.github/workflows/jenkins-x-release.yaml @@ -37,12 +37,13 @@ jobs: entrypoint: /bin/ash - env: GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }} - REPO_NAME: ${{ github.event.repository.name }} + REPOSITORY: ${{ github.repository }} VERSION: ${{ steps.prep.outputs.version }} - name: changelog - uses: docker://ghcr.io/jenkins-x/jx-changelog:0.0.43 + COSIGN_EXPERIMENTAL: "true" + name: upload-binaries + uses: docker://ghcr.io/jenkins-x/jx-goreleaser-image:0.1.0@sha256:4ac5aeb4ce850761aeffc585446ea47bbcfa680d096fdd8c5d00c5a8c5adbcc0 with: - entrypoint: .github/workflows/jenkins-x/changelog.sh + entrypoint: .github/workflows/jenkins-x/upload-binaries.sh - env: GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }} REPOSITORY: ${{ github.repository }} diff --git a/.github/workflows/jenkins-x/upload-binaries.sh b/.github/workflows/jenkins-x/upload-binaries.sh index 938506c..ddc8bef 100755 --- a/.github/workflows/jenkins-x/upload-binaries.sh +++ b/.github/workflows/jenkins-x/upload-binaries.sh @@ -1,8 +1,5 @@ #!/bin/bash -echo "HOME is $HOME" -echo current git configuration - # See https://github.com/actions/checkout/issues/766 git config --global --add safe.directory "$GITHUB_WORKSPACE" git config --global --get user.name @@ -13,20 +10,10 @@ echo "setting git user" git config --global user.name jenkins-x-bot-test git config --global user.email "jenkins-x@googlegroups.com" -git add * || true -git commit -a -m "chore: release $VERSION" --allow-empty -git tag -fa v$VERSION -m "Release version $VERSION" -git push origin v$VERSION - export BRANCH=$(git rev-parse --abbrev-ref HEAD) export BUILDDATE=$(date) export REV=$(git rev-parse HEAD) -export GOVERSION="1.17.9" +export GOVERSION="$(go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/')" export ROOTPACKAGE="github.com/$REPOSITORY" -# Install syft in this script -curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | \ -sh -s -- -b /usr/local/bin v0.54.0 -chmod +x /usr/local/bin/syft - goreleaser release