From bd836493bb575362c6a08b8b9010814520e85d1c Mon Sep 17 00:00:00 2001 From: ederst Date: Thu, 26 Aug 2021 17:37:50 +0200 Subject: [PATCH 01/15] WIP: test release WF --- .github/workflows/main.yml | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 70c6fa774d44a..c0ba51fdcb320 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,14 @@ jobs: run: | make all examples test + - name: upload linux binary + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v2 + with: + name: kops-linux + path: ./build/local/kops + if-no-files-found: error + build-macos-amd64: runs-on: macos-10.15 steps: @@ -44,6 +52,14 @@ jobs: run: | make kops examples test + - name: upload macos binary + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v2 + with: + name: kops-macos + path: ./build/local/kops + if-no-files-found: error + build-windows-amd64: runs-on: windows-2019 steps: @@ -61,6 +77,14 @@ jobs: run: | make kops examples test-windows + - name: upload win binary + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v2 + with: + name: kops-win + path: ./build/local/kops + if-no-files-found: error + verify: runs-on: ubuntu-20.04 steps: @@ -77,3 +101,34 @@ jobs: working-directory: ${{ env.GOPATH }}/src/k8s.io/kops run: | make quick-ci + + release: + runs-on: ubuntu-20.04 + if: startsWith(github.ref, 'refs/tags/') + steps: + - name: Download kops linux binary + uses: actions/download-artifact@v2 + with: + name: kops-linux + path: kops-linux + + - name: Download kops macos binary + uses: actions/download-artifact@v2 + with: + name: kops-macos + path: kops-macos + + - name: Download kops windows binary + uses: actions/download-artifact@v2 + with: + name: kops-win + path: kops-win + + # ${{ secrets.GITHUB_TOKEN }}? + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: | + kops-linux + kops-macos + kops-win From fafb6ef4168302376c9e80a2b2953b19d61879a7 Mon Sep 17 00:00:00 2001 From: ederst Date: Thu, 26 Aug 2021 17:49:28 +0200 Subject: [PATCH 02/15] WIP: add needs for release job --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c0ba51fdcb320..9c24da4985bb3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -105,6 +105,11 @@ jobs: release: runs-on: ubuntu-20.04 if: startsWith(github.ref, 'refs/tags/') + needs: + - build-linux-amd64 + - build-macos-amd64 + - build-windows-amd64 + - verify steps: - name: Download kops linux binary uses: actions/download-artifact@v2 From 4de6de1b5dca707cc0452f2f9518bb0ba6b52729 Mon Sep 17 00:00:00 2001 From: ederst Date: Thu, 26 Aug 2021 18:00:46 +0200 Subject: [PATCH 03/15] WIP: nobody likes windows --- .github/workflows/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9c24da4985bb3..648075658ed25 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,13 +77,13 @@ jobs: run: | make kops examples test-windows - - name: upload win binary - if: startsWith(github.ref, 'refs/tags/') - uses: actions/upload-artifact@v2 - with: - name: kops-win - path: ./build/local/kops - if-no-files-found: error + # - name: upload win binary + # if: startsWith(github.ref, 'refs/tags/') + # uses: actions/upload-artifact@v2 + # with: + # name: kops-win + # path: ./build/local/kops + # if-no-files-found: error verify: runs-on: ubuntu-20.04 @@ -108,8 +108,8 @@ jobs: needs: - build-linux-amd64 - build-macos-amd64 - - build-windows-amd64 - - verify + # - build-windows-amd64 + # - verify steps: - name: Download kops linux binary uses: actions/download-artifact@v2 From 846f8502e50721d64fe47b48f40c78399e36bd89 Mon Sep 17 00:00:00 2001 From: ederst Date: Thu, 26 Aug 2021 18:08:22 +0200 Subject: [PATCH 04/15] WIP: let's see where everything happens --- .github/workflows/main.yml | 141 ++++++++++++++++++++----------------- 1 file changed, 75 insertions(+), 66 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 648075658ed25..190c0ddeb7cac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,11 +22,17 @@ jobs: with: path: ${{ env.GOPATH }}/src/k8s.io/kops + - name: Display structure + run: ls -R + - name: make all examples test working-directory: ${{ env.GOPATH }}/src/k8s.io/kops run: | make all examples test + - name: Display structure of downloaded files + run: ls -R + - name: upload linux binary if: startsWith(github.ref, 'refs/tags/') uses: actions/upload-artifact@v2 @@ -35,47 +41,47 @@ jobs: path: ./build/local/kops if-no-files-found: error - build-macos-amd64: - runs-on: macos-10.15 - steps: - - name: Set up go - uses: actions/setup-go@v2 - with: - go-version: 1.16.7 - - - uses: actions/checkout@v2 - with: - path: ${{ env.GOPATH }}/src/k8s.io/kops - - - name: make kops examples test - working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - run: | - make kops examples test - - - name: upload macos binary - if: startsWith(github.ref, 'refs/tags/') - uses: actions/upload-artifact@v2 - with: - name: kops-macos - path: ./build/local/kops - if-no-files-found: error - - build-windows-amd64: - runs-on: windows-2019 - steps: - - name: Set up go - uses: actions/setup-go@v2 - with: - go-version: 1.16.7 - - - uses: actions/checkout@v2 - with: - path: ${{ env.GOPATH }}/src/k8s.io/kops - - - name: make kops examples test - working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - run: | - make kops examples test-windows + # build-macos-amd64: + # runs-on: macos-10.15 + # steps: + # - name: Set up go + # uses: actions/setup-go@v2 + # with: + # go-version: 1.16.7 + + # - uses: actions/checkout@v2 + # with: + # path: ${{ env.GOPATH }}/src/k8s.io/kops + + # - name: make kops examples test + # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + # run: | + # make kops examples test + + # - name: upload macos binary + # if: startsWith(github.ref, 'refs/tags/') + # uses: actions/upload-artifact@v2 + # with: + # name: kops-macos + # path: ./build/local/kops + # if-no-files-found: error + + # build-windows-amd64: + # runs-on: windows-2019 + # steps: + # - name: Set up go + # uses: actions/setup-go@v2 + # with: + # go-version: 1.16.7 + + # - uses: actions/checkout@v2 + # with: + # path: ${{ env.GOPATH }}/src/k8s.io/kops + + # - name: make kops examples test + # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + # run: | + # make kops examples test-windows # - name: upload win binary # if: startsWith(github.ref, 'refs/tags/') @@ -85,29 +91,29 @@ jobs: # path: ./build/local/kops # if-no-files-found: error - verify: - runs-on: ubuntu-20.04 - steps: - - name: Set up go - uses: actions/setup-go@v2 - with: - go-version: 1.16.7 + # verify: + # runs-on: ubuntu-20.04 + # steps: + # - name: Set up go + # uses: actions/setup-go@v2 + # with: + # go-version: 1.16.7 - - uses: actions/checkout@v2 - with: - path: ${{ env.GOPATH }}/src/k8s.io/kops + # - uses: actions/checkout@v2 + # with: + # path: ${{ env.GOPATH }}/src/k8s.io/kops - - name: make quick-ci - working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - run: | - make quick-ci + # - name: make quick-ci + # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + # run: | + # make quick-ci release: runs-on: ubuntu-20.04 if: startsWith(github.ref, 'refs/tags/') needs: - build-linux-amd64 - - build-macos-amd64 + # - build-macos-amd64 # - build-windows-amd64 # - verify steps: @@ -117,17 +123,20 @@ jobs: name: kops-linux path: kops-linux - - name: Download kops macos binary - uses: actions/download-artifact@v2 - with: - name: kops-macos - path: kops-macos + - name: Display structure + run: ls -R - - name: Download kops windows binary - uses: actions/download-artifact@v2 - with: - name: kops-win - path: kops-win + # - name: Download kops macos binary + # uses: actions/download-artifact@v2 + # with: + # name: kops-macos + # path: kops-macos + + # - name: Download kops windows binary + # uses: actions/download-artifact@v2 + # with: + # name: kops-win + # path: kops-win # ${{ secrets.GITHUB_TOKEN }}? - name: Release From 5074d63362a547fc4f39371a18e77792df0c99f1 Mon Sep 17 00:00:00 2001 From: ederst Date: Thu, 26 Aug 2021 18:13:47 +0200 Subject: [PATCH 05/15] WIP: try a different build directory --- .github/workflows/main.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 190c0ddeb7cac..b7e01ca4c8ca3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,23 +22,17 @@ jobs: with: path: ${{ env.GOPATH }}/src/k8s.io/kops - - name: Display structure - run: ls -R - - name: make all examples test working-directory: ${{ env.GOPATH }}/src/k8s.io/kops run: | make all examples test - - name: Display structure of downloaded files - run: ls -R - - name: upload linux binary if: startsWith(github.ref, 'refs/tags/') uses: actions/upload-artifact@v2 with: name: kops-linux - path: ./build/local/kops + path: ./go/src/k8s.io/kops/.build/local/kops if-no-files-found: error # build-macos-amd64: @@ -144,5 +138,6 @@ jobs: with: files: | kops-linux - kops-macos - kops-win + + # kops-macos + # kops-win From 4e58ceaeaf7a75d8dc9b6d80dc2316e81b0a3739 Mon Sep 17 00:00:00 2001 From: ederst Date: Thu, 26 Aug 2021 20:22:49 +0200 Subject: [PATCH 06/15] WIP: improve things --- .github/workflows/main.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b7e01ca4c8ca3..ce845213bb294 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,7 @@ --- name: CI -'on': + 'on': - push - pull_request @@ -31,8 +31,8 @@ jobs: if: startsWith(github.ref, 'refs/tags/') uses: actions/upload-artifact@v2 with: - name: kops-linux - path: ./go/src/k8s.io/kops/.build/local/kops + name: kops-linux-amd64 + path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops if-no-files-found: error # build-macos-amd64: @@ -111,11 +111,16 @@ jobs: # - build-windows-amd64 # - verify steps: - - name: Download kops linux binary + - name: Download all kops binary artifacts uses: actions/download-artifact@v2 - with: - name: kops-linux - path: kops-linux + # with: + # name: kops-linux-amd64 + # path: kops-linux-amd64 + + - name: renamve kops binary artifacts + working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + run: | + mv kops-linux-amd64/kops kops-linux-amd64/kops-linux-amd64 - name: Display structure run: ls -R @@ -137,7 +142,7 @@ jobs: uses: softprops/action-gh-release@v1 with: files: | - kops-linux + kops-linux-amd64/kops-linux-amd64 # kops-macos # kops-win From c7490959b7d61af0799f9d451442c6a651aff90e Mon Sep 17 00:00:00 2001 From: ederst Date: Thu, 26 Aug 2021 20:24:59 +0200 Subject: [PATCH 07/15] WIP: the on thing... --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce845213bb294..2b7e05773cd08 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,7 @@ --- name: CI - 'on': +'on': - push - pull_request From d919d0944518157252637ade3d893e9c933ae7b2 Mon Sep 17 00:00:00 2001 From: ederst Date: Thu, 26 Aug 2021 21:50:24 +0200 Subject: [PATCH 08/15] WIP: dummy linux build --- .github/workflows/main.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2b7e05773cd08..e1a7587af4efc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,10 @@ jobs: - name: make all examples test working-directory: ${{ env.GOPATH }}/src/k8s.io/kops run: | - make all examples test + mkdir -p ${{ env.GOPATH }}/src/k8s.io/kops/.build/local + echo "linux bin" > ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops + +# make all examples test - name: upload linux binary if: startsWith(github.ref, 'refs/tags/') @@ -34,6 +37,7 @@ jobs: name: kops-linux-amd64 path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops if-no-files-found: error + retention-days: 1 # build-macos-amd64: # runs-on: macos-10.15 @@ -117,14 +121,13 @@ jobs: # name: kops-linux-amd64 # path: kops-linux-amd64 + - name: Display structure + run: ls -R + - name: renamve kops binary artifacts - working-directory: ${{ env.GOPATH }}/src/k8s.io/kops run: | mv kops-linux-amd64/kops kops-linux-amd64/kops-linux-amd64 - - name: Display structure - run: ls -R - # - name: Download kops macos binary # uses: actions/download-artifact@v2 # with: From a0c239a25494b7c4bf413b2deac508a48560bedd Mon Sep 17 00:00:00 2001 From: ederst Date: Thu, 26 Aug 2021 21:53:33 +0200 Subject: [PATCH 09/15] WIP: build real linux bin --- .github/workflows/main.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1a7587af4efc..8dc293ce1513f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,10 +25,7 @@ jobs: - name: make all examples test working-directory: ${{ env.GOPATH }}/src/k8s.io/kops run: | - mkdir -p ${{ env.GOPATH }}/src/k8s.io/kops/.build/local - echo "linux bin" > ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops - -# make all examples test + make all examples test - name: upload linux binary if: startsWith(github.ref, 'refs/tags/') @@ -117,12 +114,9 @@ jobs: steps: - name: Download all kops binary artifacts uses: actions/download-artifact@v2 - # with: - # name: kops-linux-amd64 - # path: kops-linux-amd64 - - name: Display structure - run: ls -R + # - name: Display structure + # run: ls -R - name: renamve kops binary artifacts run: | @@ -140,7 +134,6 @@ jobs: # name: kops-win # path: kops-win - # ${{ secrets.GITHUB_TOKEN }}? - name: Release uses: softprops/action-gh-release@v1 with: From 9e15d8bba21b52bdaa6931423da4545e074ecd2c Mon Sep 17 00:00:00 2001 From: ederst Date: Fri, 27 Aug 2021 09:40:15 +0200 Subject: [PATCH 10/15] WIP: improve ci workflow (do double trigger, all bins release) --- .github/workflows/main.yml | 181 ++++++++++++++++++------------------- 1 file changed, 90 insertions(+), 91 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8dc293ce1513f..7b8460416c5f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,9 +1,19 @@ --- name: CI -'on': - - push - - pull_request +on: + push: + tags: + - '*' + branches: + - master + - fork-master + - 'release-*' + pull_request: + branches: + - master + - fork-master + - 'release-*' env: GOPROXY: https://proxy.golang.org @@ -36,109 +46,98 @@ jobs: if-no-files-found: error retention-days: 1 - # build-macos-amd64: - # runs-on: macos-10.15 - # steps: - # - name: Set up go - # uses: actions/setup-go@v2 - # with: - # go-version: 1.16.7 - - # - uses: actions/checkout@v2 - # with: - # path: ${{ env.GOPATH }}/src/k8s.io/kops - - # - name: make kops examples test - # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - # run: | - # make kops examples test - - # - name: upload macos binary - # if: startsWith(github.ref, 'refs/tags/') - # uses: actions/upload-artifact@v2 - # with: - # name: kops-macos - # path: ./build/local/kops - # if-no-files-found: error - - # build-windows-amd64: - # runs-on: windows-2019 - # steps: - # - name: Set up go - # uses: actions/setup-go@v2 - # with: - # go-version: 1.16.7 - - # - uses: actions/checkout@v2 - # with: - # path: ${{ env.GOPATH }}/src/k8s.io/kops - - # - name: make kops examples test - # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - # run: | - # make kops examples test-windows - - # - name: upload win binary - # if: startsWith(github.ref, 'refs/tags/') - # uses: actions/upload-artifact@v2 - # with: - # name: kops-win - # path: ./build/local/kops - # if-no-files-found: error - - # verify: - # runs-on: ubuntu-20.04 - # steps: - # - name: Set up go - # uses: actions/setup-go@v2 - # with: - # go-version: 1.16.7 - - # - uses: actions/checkout@v2 - # with: - # path: ${{ env.GOPATH }}/src/k8s.io/kops - - # - name: make quick-ci - # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - # run: | - # make quick-ci + build-macos-amd64: + runs-on: macos-10.15 + steps: + - name: Set up go + uses: actions/setup-go@v2 + with: + go-version: 1.16.7 + + - uses: actions/checkout@v2 + with: + path: ${{ env.GOPATH }}/src/k8s.io/kops + + - name: make kops examples test + working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + run: | + make kops examples test + + - name: upload macos binary + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v2 + with: + name: kops-darwin-amd64 + path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops + if-no-files-found: error + retention-days: 1 + + build-windows-amd64: + runs-on: windows-2019 + steps: + - name: Set up go + uses: actions/setup-go@v2 + with: + go-version: 1.16.7 + + - uses: actions/checkout@v2 + with: + path: ${{ env.GOPATH }}/src/k8s.io/kops + + - name: make kops examples test + working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + run: | + make kops examples test-windows + + - name: upload windows binary + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v2 + with: + name: kops-windows-amd64 + path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops + if-no-files-found: error + retention-days: 1 + + verify: + runs-on: ubuntu-20.04 + steps: + - name: Set up go + uses: actions/setup-go@v2 + with: + go-version: 1.16.7 + + - uses: actions/checkout@v2 + with: + path: ${{ env.GOPATH }}/src/k8s.io/kops + + - name: make quick-ci + working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + run: | + make quick-ci release: runs-on: ubuntu-20.04 if: startsWith(github.ref, 'refs/tags/') needs: - build-linux-amd64 - # - build-macos-amd64 - # - build-windows-amd64 - # - verify + - build-macos-amd64 + - build-windows-amd64 + - verify steps: - name: Download all kops binary artifacts uses: actions/download-artifact@v2 - # - name: Display structure - # run: ls -R - - - name: renamve kops binary artifacts + - name: rename kops binary artifacts run: | mv kops-linux-amd64/kops kops-linux-amd64/kops-linux-amd64 - - # - name: Download kops macos binary - # uses: actions/download-artifact@v2 - # with: - # name: kops-macos - # path: kops-macos - - # - name: Download kops windows binary - # uses: actions/download-artifact@v2 - # with: - # name: kops-win - # path: kops-win + mv kops-darwin-amd64/kops kops-darwin-amd64/kops-darwin-amd64 + mv kops-windows-amd64/kops kops-windows-amd64/kops-windows-amd64 - name: Release uses: softprops/action-gh-release@v1 with: + fail_on_unmatched_files: true files: | kops-linux-amd64/kops-linux-amd64 - - # kops-macos - # kops-win + kops-darwin-amd64/kops-darwin-amd64 + kops-windows-amd64/kops-windows-amd64 From 4b647509a97cf87d9d2fe5e142432754d0ab81b8 Mon Sep 17 00:00:00 2001 From: ederst Date: Mon, 30 Aug 2021 16:18:26 +0200 Subject: [PATCH 11/15] WIP: Remove the BP version from the tag when CI build --- tools/get_version.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/get_version.sh b/tools/get_version.sh index 46fdfd44084d3..52144e698b051 100755 --- a/tools/get_version.sh +++ b/tools/get_version.sh @@ -36,6 +36,7 @@ if [[ -n "${CI}" ]]; then EXACT_TAG=$(git describe --tags --exact-match 2>/dev/null || true) if [[ -n "${EXACT_TAG}" ]]; then VERSION="${EXACT_TAG#v}" # Remove the v prefix from the git tag + VERSION="${VERSION//-bearingpoint*/}" # remove the bearingpoint version from the tag if [[ "${VERSION}" != "${KOPS_RELEASE_VERSION}" ]]; then echo "Build was tagged with ${VERSION}, but version.go had version ${KOPS_RELEASE_VERSION}" exit 1 From 910018c27798cba1ea4df8502b9bd6410a4dc015 Mon Sep 17 00:00:00 2001 From: ederst Date: Mon, 30 Aug 2021 16:41:44 +0200 Subject: [PATCH 12/15] WIP: do git describe only --- .github/workflows/main.yml | 221 +++++++++++++++++++------------------ 1 file changed, 114 insertions(+), 107 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7b8460416c5f5..5b186f504a93f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,112 +32,119 @@ jobs: with: path: ${{ env.GOPATH }}/src/k8s.io/kops - - name: make all examples test + - name: git describe variants working-directory: ${{ env.GOPATH }}/src/k8s.io/kops run: | - make all examples test - - - name: upload linux binary - if: startsWith(github.ref, 'refs/tags/') - uses: actions/upload-artifact@v2 - with: - name: kops-linux-amd64 - path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops - if-no-files-found: error - retention-days: 1 - - build-macos-amd64: - runs-on: macos-10.15 - steps: - - name: Set up go - uses: actions/setup-go@v2 - with: - go-version: 1.16.7 - - - uses: actions/checkout@v2 - with: - path: ${{ env.GOPATH }}/src/k8s.io/kops - - - name: make kops examples test - working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - run: | - make kops examples test - - - name: upload macos binary - if: startsWith(github.ref, 'refs/tags/') - uses: actions/upload-artifact@v2 - with: - name: kops-darwin-amd64 - path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops - if-no-files-found: error - retention-days: 1 - - build-windows-amd64: - runs-on: windows-2019 - steps: - - name: Set up go - uses: actions/setup-go@v2 - with: - go-version: 1.16.7 - - - uses: actions/checkout@v2 - with: - path: ${{ env.GOPATH }}/src/k8s.io/kops - - - name: make kops examples test - working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - run: | - make kops examples test-windows - - - name: upload windows binary - if: startsWith(github.ref, 'refs/tags/') - uses: actions/upload-artifact@v2 - with: - name: kops-windows-amd64 - path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops - if-no-files-found: error - retention-days: 1 - - verify: - runs-on: ubuntu-20.04 - steps: - - name: Set up go - uses: actions/setup-go@v2 - with: - go-version: 1.16.7 - - - uses: actions/checkout@v2 - with: - path: ${{ env.GOPATH }}/src/k8s.io/kops - - - name: make quick-ci - working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - run: | - make quick-ci - - release: - runs-on: ubuntu-20.04 - if: startsWith(github.ref, 'refs/tags/') - needs: - - build-linux-amd64 - - build-macos-amd64 - - build-windows-amd64 - - verify - steps: - - name: Download all kops binary artifacts - uses: actions/download-artifact@v2 - - - name: rename kops binary artifacts - run: | - mv kops-linux-amd64/kops kops-linux-amd64/kops-linux-amd64 - mv kops-darwin-amd64/kops kops-darwin-amd64/kops-darwin-amd64 - mv kops-windows-amd64/kops kops-windows-amd64/kops-windows-amd64 - - - name: Release - uses: softprops/action-gh-release@v1 - with: - fail_on_unmatched_files: true - files: | - kops-linux-amd64/kops-linux-amd64 - kops-darwin-amd64/kops-darwin-amd64 - kops-windows-amd64/kops-windows-amd64 + git describe --debug + git describe --debug --always + git describe --debug --always --all + + # - name: make all examples test + # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + # run: | + # make all examples test + + # - name: upload linux binary + # if: startsWith(github.ref, 'refs/tags/') + # uses: actions/upload-artifact@v2 + # with: + # name: kops-linux-amd64 + # path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops + # if-no-files-found: error + # retention-days: 1 + + # build-macos-amd64: + # runs-on: macos-10.15 + # steps: + # - name: Set up go + # uses: actions/setup-go@v2 + # with: + # go-version: 1.16.7 + + # - uses: actions/checkout@v2 + # with: + # path: ${{ env.GOPATH }}/src/k8s.io/kops + + # - name: make kops examples test + # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + # run: | + # make kops examples test + + # - name: upload macos binary + # if: startsWith(github.ref, 'refs/tags/') + # uses: actions/upload-artifact@v2 + # with: + # name: kops-darwin-amd64 + # path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops + # if-no-files-found: error + # retention-days: 1 + + # build-windows-amd64: + # runs-on: windows-2019 + # steps: + # - name: Set up go + # uses: actions/setup-go@v2 + # with: + # go-version: 1.16.7 + + # - uses: actions/checkout@v2 + # with: + # path: ${{ env.GOPATH }}/src/k8s.io/kops + + # - name: make kops examples test + # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + # run: | + # make kops examples test-windows + + # - name: upload windows binary + # if: startsWith(github.ref, 'refs/tags/') + # uses: actions/upload-artifact@v2 + # with: + # name: kops-windows-amd64 + # path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops + # if-no-files-found: error + # retention-days: 1 + + # verify: + # runs-on: ubuntu-20.04 + # steps: + # - name: Set up go + # uses: actions/setup-go@v2 + # with: + # go-version: 1.16.7 + + # - uses: actions/checkout@v2 + # with: + # path: ${{ env.GOPATH }}/src/k8s.io/kops + + # - name: make quick-ci + # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + # run: | + # make quick-ci + + # release: + # runs-on: ubuntu-20.04 + # if: startsWith(github.ref, 'refs/tags/') + # needs: + # - build-linux-amd64 + # - build-macos-amd64 + # - build-windows-amd64 + # - verify + # steps: + # - name: Download all kops binary artifacts + # uses: actions/download-artifact@v2 + + # - name: rename kops binary artifacts + # run: | + # mv kops-linux-amd64/kops kops-linux-amd64/kops-linux-amd64 + # mv kops-darwin-amd64/kops kops-darwin-amd64/kops-darwin-amd64 + # mv kops-windows-amd64/kops kops-windows-amd64/kops-windows-amd64 + + # - name: Release + # uses: softprops/action-gh-release@v1 + # with: + # fail_on_unmatched_files: true + # files: | + # kops-linux-amd64/kops-linux-amd64 + # kops-darwin-amd64/kops-darwin-amd64 + # kops-windows-amd64/kops-windows-amd64 From 3d82e1c465ce8ad37e0e180576554feae85fe5f2 Mon Sep 17 00:00:00 2001 From: ederst Date: Mon, 30 Aug 2021 16:47:47 +0200 Subject: [PATCH 13/15] WIP: gotta fetchem all --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5b186f504a93f..ae467fe65b533 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,13 +31,12 @@ jobs: - uses: actions/checkout@v2 with: path: ${{ env.GOPATH }}/src/k8s.io/kops + fetch-depth: 0 - name: git describe variants working-directory: ${{ env.GOPATH }}/src/k8s.io/kops run: | - git describe --debug git describe --debug --always - git describe --debug --always --all # - name: make all examples test # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops From 8169de7ca369dec2003187d238f316baf8d45388 Mon Sep 17 00:00:00 2001 From: ederst Date: Mon, 30 Aug 2021 17:15:56 +0200 Subject: [PATCH 14/15] WIP: only fetchem all when releasing --- .github/workflows/main.yml | 239 ++++++++++++++++++++----------------- 1 file changed, 127 insertions(+), 112 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae467fe65b533..90e2984050d77 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,121 +29,136 @@ jobs: go-version: 1.16.7 - uses: actions/checkout@v2 + if: startsWith(github.ref, 'refs/tags/') with: path: ${{ env.GOPATH }}/src/k8s.io/kops fetch-depth: 0 - - name: git describe variants + - uses: actions/checkout@v2 + if: startsWith(github.ref, 'refs/tags/') == false + with: + path: ${{ env.GOPATH }}/src/k8s.io/kops + + - name: make all examples test + working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + run: | + make all examples test + + - name: upload linux binary + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v2 + with: + name: kops-linux-amd64 + path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops + if-no-files-found: error + retention-days: 1 + + build-macos-amd64: + runs-on: macos-10.15 + steps: + - name: Set up go + uses: actions/setup-go@v2 + with: + go-version: 1.16.7 + + - uses: actions/checkout@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + path: ${{ env.GOPATH }}/src/k8s.io/kops + fetch-depth: 0 + + - uses: actions/checkout@v2 + if: startsWith(github.ref, 'refs/tags/') == false + with: + path: ${{ env.GOPATH }}/src/k8s.io/kops + + - name: make kops examples test working-directory: ${{ env.GOPATH }}/src/k8s.io/kops run: | - git describe --debug --always - - # - name: make all examples test - # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - # run: | - # make all examples test - - # - name: upload linux binary - # if: startsWith(github.ref, 'refs/tags/') - # uses: actions/upload-artifact@v2 - # with: - # name: kops-linux-amd64 - # path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops - # if-no-files-found: error - # retention-days: 1 - - # build-macos-amd64: - # runs-on: macos-10.15 - # steps: - # - name: Set up go - # uses: actions/setup-go@v2 - # with: - # go-version: 1.16.7 - - # - uses: actions/checkout@v2 - # with: - # path: ${{ env.GOPATH }}/src/k8s.io/kops - - # - name: make kops examples test - # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - # run: | - # make kops examples test - - # - name: upload macos binary - # if: startsWith(github.ref, 'refs/tags/') - # uses: actions/upload-artifact@v2 - # with: - # name: kops-darwin-amd64 - # path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops - # if-no-files-found: error - # retention-days: 1 - - # build-windows-amd64: - # runs-on: windows-2019 - # steps: - # - name: Set up go - # uses: actions/setup-go@v2 - # with: - # go-version: 1.16.7 - - # - uses: actions/checkout@v2 - # with: - # path: ${{ env.GOPATH }}/src/k8s.io/kops - - # - name: make kops examples test - # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - # run: | - # make kops examples test-windows - - # - name: upload windows binary - # if: startsWith(github.ref, 'refs/tags/') - # uses: actions/upload-artifact@v2 - # with: - # name: kops-windows-amd64 - # path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops - # if-no-files-found: error - # retention-days: 1 - - # verify: - # runs-on: ubuntu-20.04 - # steps: - # - name: Set up go - # uses: actions/setup-go@v2 - # with: - # go-version: 1.16.7 - - # - uses: actions/checkout@v2 - # with: - # path: ${{ env.GOPATH }}/src/k8s.io/kops - - # - name: make quick-ci - # working-directory: ${{ env.GOPATH }}/src/k8s.io/kops - # run: | - # make quick-ci - - # release: - # runs-on: ubuntu-20.04 - # if: startsWith(github.ref, 'refs/tags/') - # needs: - # - build-linux-amd64 - # - build-macos-amd64 - # - build-windows-amd64 - # - verify - # steps: - # - name: Download all kops binary artifacts - # uses: actions/download-artifact@v2 - - # - name: rename kops binary artifacts - # run: | - # mv kops-linux-amd64/kops kops-linux-amd64/kops-linux-amd64 - # mv kops-darwin-amd64/kops kops-darwin-amd64/kops-darwin-amd64 - # mv kops-windows-amd64/kops kops-windows-amd64/kops-windows-amd64 - - # - name: Release - # uses: softprops/action-gh-release@v1 - # with: - # fail_on_unmatched_files: true - # files: | - # kops-linux-amd64/kops-linux-amd64 - # kops-darwin-amd64/kops-darwin-amd64 - # kops-windows-amd64/kops-windows-amd64 + make kops examples test + + - name: upload macos binary + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v2 + with: + name: kops-darwin-amd64 + path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops + if-no-files-found: error + retention-days: 1 + + build-windows-amd64: + runs-on: windows-2019 + steps: + - name: Set up go + uses: actions/setup-go@v2 + with: + go-version: 1.16.7 + + - uses: actions/checkout@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + path: ${{ env.GOPATH }}/src/k8s.io/kops + fetch-depth: 0 + + - uses: actions/checkout@v2 + if: startsWith(github.ref, 'refs/tags/') == false + with: + path: ${{ env.GOPATH }}/src/k8s.io/kops + + - name: make kops examples test + working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + run: | + make kops examples test-windows + + - name: upload windows binary + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v2 + with: + name: kops-windows-amd64 + path: ${{ env.GOPATH }}/src/k8s.io/kops/.build/local/kops + if-no-files-found: error + retention-days: 1 + + verify: + runs-on: ubuntu-20.04 + steps: + - name: Set up go + uses: actions/setup-go@v2 + with: + go-version: 1.16.7 + + - uses: actions/checkout@v2 + with: + path: ${{ env.GOPATH }}/src/k8s.io/kops + + - name: make quick-ci + working-directory: ${{ env.GOPATH }}/src/k8s.io/kops + run: | + make quick-ci + + release: + runs-on: ubuntu-20.04 + if: startsWith(github.ref, 'refs/tags/') + needs: + - build-linux-amd64 + - build-macos-amd64 + - build-windows-amd64 + - verify + steps: + - name: Download all kops binary artifacts + uses: actions/download-artifact@v2 + + - name: rename kops binary artifacts + run: | + mv kops-linux-amd64/kops kops-linux-amd64/kops-linux-amd64 + mv kops-darwin-amd64/kops kops-darwin-amd64/kops-darwin-amd64 + mv kops-windows-amd64/kops kops-windows-amd64/kops-windows-amd64 + + - name: Release + uses: softprops/action-gh-release@v1 + with: + fail_on_unmatched_files: true + files: | + kops-linux-amd64/kops-linux-amd64 + kops-darwin-amd64/kops-darwin-amd64 + kops-windows-amd64/kops-windows-amd64 From 472893f43ccbd94f7fbfb799c196a50fce792a1f Mon Sep 17 00:00:00 2001 From: ederst Date: Mon, 30 Aug 2021 17:21:56 +0200 Subject: [PATCH 15/15] WIP: name the fetchems --- .github/workflows/main.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 90e2984050d77..c0a78bd3d998d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,13 +28,15 @@ jobs: with: go-version: 1.16.7 - - uses: actions/checkout@v2 + - name: checkout full + uses: actions/checkout@v2 if: startsWith(github.ref, 'refs/tags/') with: path: ${{ env.GOPATH }}/src/k8s.io/kops fetch-depth: 0 - - uses: actions/checkout@v2 + - name: checkout shallow + uses: actions/checkout@v2 if: startsWith(github.ref, 'refs/tags/') == false with: path: ${{ env.GOPATH }}/src/k8s.io/kops @@ -61,13 +63,15 @@ jobs: with: go-version: 1.16.7 - - uses: actions/checkout@v2 + - name: checkout full + uses: actions/checkout@v2 if: startsWith(github.ref, 'refs/tags/') with: path: ${{ env.GOPATH }}/src/k8s.io/kops fetch-depth: 0 - - uses: actions/checkout@v2 + - name: checkout shallow + uses: actions/checkout@v2 if: startsWith(github.ref, 'refs/tags/') == false with: path: ${{ env.GOPATH }}/src/k8s.io/kops @@ -94,13 +98,15 @@ jobs: with: go-version: 1.16.7 - - uses: actions/checkout@v2 + - name: checkout full + uses: actions/checkout@v2 if: startsWith(github.ref, 'refs/tags/') with: path: ${{ env.GOPATH }}/src/k8s.io/kops fetch-depth: 0 - - uses: actions/checkout@v2 + - name: checkout shallow + uses: actions/checkout@v2 if: startsWith(github.ref, 'refs/tags/') == false with: path: ${{ env.GOPATH }}/src/k8s.io/kops