diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 19ac59023..b14b9fa57 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -18,20 +18,12 @@ jobs: - name: Check out the repository uses: actions/checkout@v2 - - name: Reclaim free space - run: | - sudo swapoff -a - sudo rm -f /swapfile - df -h - free -h - - name: Run E2E deployment and tests - run: | - make e2e using="${{ matrix.globalnet }} ${{ matrix.lighthouse }}" + uses: submariner-io/shipyard/gh-actions/e2e@devel + with: + globalnet: ${{ matrix.globalnet }} + lighthouse: ${{ matrix.lighthouse }} - name: Post mortem if: failure() - run: | - df -h - free -h - make post-mortem + uses: submariner-io/shipyard/gh-actions/post-mortem@devel diff --git a/.github/workflows/flake_finder.yml b/.github/workflows/flake_finder.yml index b5c58cc2b..898bf2f15 100644 --- a/.github/workflows/flake_finder.yml +++ b/.github/workflows/flake_finder.yml @@ -20,23 +20,17 @@ jobs: - name: Check out the repository uses: actions/checkout@v2 - - name: Reclaim free space - run: | - sudo swapoff -a - sudo rm -f /swapfile - df -h - free -h - name: Run E2E deployment and tests - run: | - make e2e using="${{ matrix.cable_driver }} ${{ matrix.globalnet }} ${{ matrix.lighthouse }}" + uses: submariner-io/shipyard/gh-actions/e2e@devel + with: + cabledriver: ${{ matrix.cable_driver }} + globalnet: ${{ matrix.globalnet }} + lighthouse: ${{ matrix.lighthouse }} - name: Post mortem if: failure() - run: | - df -h - free -h - make post-mortem + uses: submariner-io/shipyard/gh-actions/post-mortem@devel upgrade-e2e: name: Latest Release to Latest Version timeout-minutes: 30 @@ -46,20 +40,9 @@ jobs: steps: - uses: actions/checkout@master - - name: Reclaim free space - run: | - sudo swapoff -a - sudo rm -f /swapfile - df -h - free -h - - name: Install an old cluster, upgrade it and check it - run: | - make upgrade-e2e + uses: submariner-io/shipyard/gh-actions/upgrade-e2e@devel - name: Post mortem if: failure() - run: | - df -h - free -h - make post-mortem + uses: submariner-io/shipyard/gh-actions/post-mortem@devel diff --git a/.github/workflows/subctl_bleeding_edge.yml b/.github/workflows/subctl_bleeding_edge.yml index 1866814a1..ee8d8f47b 100644 --- a/.github/workflows/subctl_bleeding_edge.yml +++ b/.github/workflows/subctl_bleeding_edge.yml @@ -1,7 +1,10 @@ --- on: push: - branches: [master] + branches: + - devel + - release-* + name: Release Subctl Devel jobs: release: @@ -13,15 +16,18 @@ jobs: - run: git fetch origin +refs/tags/*:refs/tags/* + - name: generate version tag + run: echo "SUBCTL_TAG=subctl-${GITHUB_REF##*/}" >> $GITHUB_ENV + - name: Generate the Artifacts run: | - make build-cross VERSION=subctl-devel + make build-cross VERSION=${{ env.SUBCTL_TAG }} echo "BINARIES=$(find dist/ -type f -name '*.tar.xz' -printf '%p ')" >> $GITHUB_ENV - - name: Bump the subctl-devel tag + - name: Bump the subctl tag uses: richardsimko/update-tag@v1.0.3 with: - tag_name: subctl-devel + tag_name: ${{ env.SUBCTL_TAG }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -29,6 +35,6 @@ jobs: uses: johnwbyrd/update-release@master with: token: ${{ secrets.GITHUB_TOKEN }} - release: Cutting Edge - tag: subctl-devel + release: ${{ env.SUBCTL_TAG }} Cutting Edge + tag: ${{ env.SUBCTL_TAG }} files: ${{ env.BINARIES }} diff --git a/.github/workflows/upgrade-e2e.yml b/.github/workflows/upgrade-e2e.yml index 09191e01a..265698b39 100644 --- a/.github/workflows/upgrade-e2e.yml +++ b/.github/workflows/upgrade-e2e.yml @@ -14,20 +14,9 @@ jobs: steps: - uses: actions/checkout@master - - name: Reclaim free space - run: | - sudo swapoff -a - sudo rm -f /swapfile - df -h - free -h - - name: Install an old cluster, upgrade it and check it - run: | - make upgrade-e2e + uses: submariner-io/shipyard/gh-actions/upgrade-e2e@devel - name: Post mortem if: failure() - run: | - df -h - free -h - make post-mortem + uses: submariner-io/shipyard/gh-actions/post-mortem@devel diff --git a/Makefile b/Makefile index 18243324f..a039931cf 100644 --- a/Makefile +++ b/Makefile @@ -111,7 +111,7 @@ bin/subctl-%: generate-embeddedyamls $(shell find pkg/subctl/ -name "*.go") vend export GOARCH GOOS; \ $(SCRIPTS_DIR)/compile.sh \ --ldflags "-X github.com/submariner-io/submariner-operator/pkg/version.Version=$(CALCULATED_VERSION) \ - -X=github.com/submariner-io/submariner-operator/pkg/versions.DefaultSubmarinerOperatorVersion=$(CALCULATED_VERSION)" \ + -X=github.com/submariner-io/submariner-operator/pkg/versions.DefaultSubmarinerOperatorVersion=$(if eq($(patsubst subctl-devel-%,devel,$(CALCULATED_VERSION)),devel),devel,$(CALCULATED_VERSION))" \ --noupx $@ ./pkg/subctl/main.go ci: generate-embeddedyamls golangci-lint markdownlint unit build images