From 1dde1d595640326c313627e8254313926706b188 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Tue, 24 May 2022 12:31:26 -0700 Subject: [PATCH] automate updating gopogh --- .github/workflows/functional_verified.yml | 2 +- .github/workflows/master.yml | 10 ++--- .github/workflows/pr.yml | 10 ++--- .github/workflows/update-golang-version.yml | 6 +-- .github/workflows/update-gopogh-version.yml | 44 +++++++++++++++++++ .github/workflows/update-k8s-versions.yml | 2 +- .github/workflows/update-kubadm-constants.yml | 3 +- hack/jenkins/common.ps1 | 2 +- hack/jenkins/common.sh | 2 +- .../golang_version/update_golang_version.go | 6 ++- 10 files changed, 65 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/update-gopogh-version.yml diff --git a/.github/workflows/functional_verified.yml b/.github/workflows/functional_verified.yml index c50d7c1b46..9e179dbdf3 100644 --- a/.github/workflows/functional_verified.yml +++ b/.github/workflows/functional_verified.yml @@ -94,7 +94,7 @@ jobs: - name: Install gopogh shell: bash run: | - curl -LO https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-linux-arm64 + curl -LO https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-linux-arm64 sudo install gopogh-linux-arm64 /usr/local/bin/gopogh - name: Docker Info diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 812eb26a4c..ccb592bae4 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -127,7 +127,7 @@ jobs: shell: bash run: | - curl -LO https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-linux-amd64 + curl -LO https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-linux-amd64 sudo install gopogh-linux-amd64 /usr/local/bin/gopogh - name: Download Binaries uses: actions/download-artifact@fdafc3f9f2e2a522dc1d230e6a03de57a1e71c95 @@ -227,7 +227,7 @@ jobs: shell: bash run: | - curl -LO https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-linux-amd64 + curl -LO https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-linux-amd64 sudo install gopogh-linux-amd64 /usr/local/bin/gopogh - name: Download Binaries uses: actions/download-artifact@fdafc3f9f2e2a522dc1d230e6a03de57a1e71c95 @@ -330,7 +330,7 @@ jobs: - name: Install gopogh shell: bash run: | - curl -LO https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-linux-amd64 + curl -LO https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-linux-amd64 sudo install gopogh-linux-amd64 /usr/local/bin/gopogh - name: Download Binaries uses: actions/download-artifact@fdafc3f9f2e2a522dc1d230e6a03de57a1e71c95 @@ -417,7 +417,7 @@ jobs: shell: bash run: | - curl -LO https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-darwin-amd64 + curl -LO https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-darwin-amd64 sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh - name: Install docker shell: bash @@ -527,7 +527,7 @@ jobs: shell: bash run: | - curl -LO https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-linux-amd64 + curl -LO https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-linux-amd64 sudo install gopogh-linux-amd64 /usr/local/bin/gopogh - name: Download Binaries uses: actions/download-artifact@fdafc3f9f2e2a522dc1d230e6a03de57a1e71c95 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 796a48f888..9c3a3610e9 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -124,7 +124,7 @@ jobs: - name: Install gopogh shell: bash run: | - curl -LO https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-linux-amd64 + curl -LO https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-linux-amd64 sudo install gopogh-linux-amd64 /usr/local/bin/gopogh - name: Download Binaries uses: actions/download-artifact@fdafc3f9f2e2a522dc1d230e6a03de57a1e71c95 @@ -225,7 +225,7 @@ jobs: shell: bash run: | - curl -LO https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-linux-amd64 + curl -LO https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-linux-amd64 sudo install gopogh-linux-amd64 /usr/local/bin/gopogh - name: Download Binaries uses: actions/download-artifact@fdafc3f9f2e2a522dc1d230e6a03de57a1e71c95 @@ -329,7 +329,7 @@ jobs: - name: Install gopogh shell: bash run: | - curl -LO https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-linux-amd64 + curl -LO https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-linux-amd64 sudo install gopogh-linux-amd64 /usr/local/bin/gopogh - name: Download Binaries uses: actions/download-artifact@fdafc3f9f2e2a522dc1d230e6a03de57a1e71c95 @@ -417,7 +417,7 @@ jobs: shell: bash run: | - curl -LO https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-darwin-amd64 + curl -LO https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-darwin-amd64 sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh - name: Install docker shell: bash @@ -528,7 +528,7 @@ jobs: shell: bash run: | - curl -LO https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-linux-amd64 + curl -LO https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-linux-amd64 sudo install gopogh-linux-amd64 /usr/local/bin/gopogh - name: Download Binaries uses: actions/download-artifact@fdafc3f9f2e2a522dc1d230e6a03de57a1e71c95 diff --git a/.github/workflows/update-golang-version.yml b/.github/workflows/update-golang-version.yml index 33223e0a41..aa97fee86b 100644 --- a/.github/workflows/update-golang-version.yml +++ b/.github/workflows/update-golang-version.yml @@ -41,8 +41,4 @@ jobs: body: | Kubernetes Project just updated the [golang version](https://github.com/kubernetes/kubernetes/blob/master/build/build-image/cross/VERSION), updating minikube golang to match Kubernetes. - This PR was auto-generated by `make update-golang-version` using [update-golang-versions.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows/update-golang-version.yml) CI Workflow. - - - - + This PR was auto-generated by `make update-golang-version` using [update-golang-version.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows/update-golang-version.yml) CI Workflow. diff --git a/.github/workflows/update-gopogh-version.yml b/.github/workflows/update-gopogh-version.yml new file mode 100644 index 0000000000..0631568152 --- /dev/null +++ b/.github/workflows/update-gopogh-version.yml @@ -0,0 +1,44 @@ +name: "update-gopogh-versions" +on: + workflow_dispatch: + schedule: + # every Monday at around 2 am pacific/9 am UTC + - cron: "0 9 * * 1" +env: + GOPROXY: https://proxy.golang.org + GO_VERSION: '1.18.2' +permissions: + contents: read + +jobs: + bump-gopogh-version: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 + - uses: actions/setup-go@fcdc43634adb5f7ae75a9d7a9b9361790f7293e2 + with: + go-version: ${{env.GO_VERSION}} + stable: true + - name: Bump gopogh Versions + id: bumpGopogh + run: | + make update-gopogh-version + echo "::set-output name=changes::$(git status --porcelain)" + - name: Create PR + if: ${{ steps.bumpGopogh.outputs.changes != '' }} + uses: peter-evans/create-pull-request@f094b77505fb89581e68a1163fbd2fffece39da1 + with: + token: ${{ secrets.MINIKUBE_BOT_PAT }} + commit-message: bump gopogh versions + committer: minikube-bot + author: minikube-bot + branch: auto_bump_gopogh_version + push-to-fork: minikube-bot/minikube + base: master + delete-branch: true + title: 'bump gopogh version' + labels: ok-to-test + body: | + Gopogh Project released a [new version](https://github.com/medyagh/gopogh/releases), + + This PR was auto-generated by `make update-gopogh-version` using [update-gopogh-version.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows/update-gopogh-version.yml) CI Workflow. diff --git a/.github/workflows/update-k8s-versions.yml b/.github/workflows/update-k8s-versions.yml index 15c954a8f6..944351aa6a 100644 --- a/.github/workflows/update-k8s-versions.yml +++ b/.github/workflows/update-k8s-versions.yml @@ -43,7 +43,7 @@ jobs: title: "${{ steps.bumpk8s.outputs.title }}" labels: ok-to-test body: | - This PR was auto-generated by `make update-kubernetes-version` using [update-k8s-versions.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows) CI Workflow. + This PR was auto-generated by `make update-kubernetes-version` using [update-k8s-versions.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows/update-k8s-versions.yml) CI Workflow. Please only merge if all the tests pass. ``` diff --git a/.github/workflows/update-kubadm-constants.yml b/.github/workflows/update-kubadm-constants.yml index 877ed83b28..d1b60c8bf6 100644 --- a/.github/workflows/update-kubadm-constants.yml +++ b/.github/workflows/update-kubadm-constants.yml @@ -42,10 +42,9 @@ jobs: title: 'Bump kubeadm constants for kubernetes images' labels: ok-to-test body: | - This PR was auto-generated by `make update-kubeadm-constants` using [update-kubeadm-constants.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows) CI Workflow. + This PR was auto-generated by `make update-kubeadm-constants` using [update-kubeadm-constants.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows/update-kubeadm-constants.yml) CI Workflow. Please only merge if all the tests pass. ``` ${{ steps.bumpKubAdmConsts.outputs.changes }} ``` - diff --git a/hack/jenkins/common.ps1 b/hack/jenkins/common.ps1 index da1201176f..eb526f6329 100644 --- a/hack/jenkins/common.ps1 +++ b/hack/jenkins/common.ps1 @@ -53,7 +53,7 @@ If ($lastexitcode -gt 0) { } # Download gopogh and gotestsum -(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh.exe", "C:\Go\bin\gopogh.exe") +(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh.exe", "C:\Go\bin\gopogh.exe") (New-Object Net.WebClient).DownloadFile("https://github.com/gotestyourself/gotestsum/releases/download/v1.6.4/gotestsum_1.6.4_windows_amd64.tar.gz", "$env:TEMP\gotestsum.tar.gz") tar --directory "C:\Go\bin\" -xzvf "$env:TEMP\gotestsum.tar.gz" "gotestsum.exe" diff --git a/hack/jenkins/common.sh b/hack/jenkins/common.sh index ccc6a70812..8b6fa75a98 100755 --- a/hack/jenkins/common.sh +++ b/hack/jenkins/common.sh @@ -421,7 +421,7 @@ if ! type "jq" > /dev/null; then fi echo ">> Installing gopogh" -curl -LO "https://github.com/medyagh/gopogh/releases/download/v0.9.0/gopogh-${OS_ARCH}" +curl -LO "https://github.com/medyagh/gopogh/releases/download/v0.13.0/gopogh-${OS_ARCH}" sudo install "gopogh-${OS_ARCH}" /usr/local/bin/gopogh diff --git a/hack/update/golang_version/update_golang_version.go b/hack/update/golang_version/update_golang_version.go index 879639a122..da734dd2a7 100644 --- a/hack/update/golang_version/update_golang_version.go +++ b/hack/update/golang_version/update_golang_version.go @@ -100,7 +100,11 @@ var ( `GO_VERSION: .*`: `GO_VERSION: '{{.StableVersion}}'`, }, }, - + ".github/workflows/update-gopogh-version.yml": { + Replace: map[string]string{ + `GO_VERSION: .*`: `GO_VERSION: '{{.StableVersion}}'`, + }, + }, ".github/workflows/time-to-k8s-public-chart.yml": { Replace: map[string]string{ `GO_VERSION: .*`: `GO_VERSION: '{{.StableVersion}}'`,