From 96c324096a719fee9eb9f980c043be2d637d9307 Mon Sep 17 00:00:00 2001 From: yuvraj Date: Thu, 22 Apr 2021 01:05:59 +0530 Subject: [PATCH 1/7] added goreleaser for publishing menifest Signed-off-by: yuvraj --- .github/workflows/publish-menifest.yml | 25 +++++++++++++++++++++++++ .goreleaser.yml | 14 ++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/publish-menifest.yml create mode 100644 .goreleaser.yml diff --git a/.github/workflows/publish-menifest.yml b/.github/workflows/publish-menifest.yml new file mode 100644 index 0000000000..15d7368ceb --- /dev/null +++ b/.github/workflows/publish-menifest.yml @@ -0,0 +1,25 @@ +name: Publish flyte manifest +on: + push: + tags: + - 'v*' + +jobs: + goreleaser: + name: Goreleaser + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.14 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000000..97dccfff38 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,14 @@ +project_name: flyte +builds: + - skip: true +release: + github: + owner: flyteorg + name: flyte + draft: false + prerelease: auto + discussion_category_name: General + name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}" + disable: false + extra_files: + - glob: ./deployment/**/* \ No newline at end of file From 323f20d8300a4cce84407d4e407346cd24990b7f Mon Sep 17 00:00:00 2001 From: yuvraj Date: Tue, 27 Apr 2021 20:30:46 +0530 Subject: [PATCH 2/7] Rename release file name Signed-off-by: yuvraj --- .github/workflows/publish-menifest.yml | 3 +++ .gitignore | 1 + .goreleaser.yml | 2 +- Makefile | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-menifest.yml b/.github/workflows/publish-menifest.yml index 15d7368ceb..7c5a4775f9 100644 --- a/.github/workflows/publish-menifest.yml +++ b/.github/workflows/publish-menifest.yml @@ -16,6 +16,9 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.14 + - name: build Release Menifest + run: | + make prepare_artifacts - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: diff --git a/.gitignore b/.gitignore index bdde967a1d..bd8ac5ca2c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ docs/_sources/ docs/flytekit/flytekit.interfaces.html docs/searchindex.js docs/ +release/ __pycache__/ diff --git a/.goreleaser.yml b/.goreleaser.yml index 97dccfff38..e20059bbbf 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -11,4 +11,4 @@ release: name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}" disable: false extra_files: - - glob: ./deployment/**/* \ No newline at end of file + - glob: ./release/* \ No newline at end of file diff --git a/Makefile b/Makefile index 19cb24ee95..481ded60e5 100644 --- a/Makefile +++ b/Makefile @@ -41,3 +41,7 @@ stats: @generate-dashboard -o deployment/stats/prometheus/flytepropeller-dashboard.json stats/flytepropeller_dashboard.py @generate-dashboard -o deployment/stats/prometheus/flyteadmin-dashboard.json stats/flyteadmin_dashboard.py @generate-dashboard -o deployment/stats/prometheus/flyteuser-dashboard.json stats/flyteuser_dashboard.py + +.PHONY: prepare_artifacts +prepare_artifacts: + bash script/prepare_artifacts.sh \ No newline at end of file From e67e279ad54081c5eba934d7e2bbc0d022940c02 Mon Sep 17 00:00:00 2001 From: yuvraj Date: Tue, 27 Apr 2021 20:32:17 +0530 Subject: [PATCH 3/7] Added script for artifacts Signed-off-by: yuvraj --- script/prepare_artifacts.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 script/prepare_artifacts.sh diff --git a/script/prepare_artifacts.sh b/script/prepare_artifacts.sh new file mode 100644 index 0000000000..c437012553 --- /dev/null +++ b/script/prepare_artifacts.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -ex + +mkdir -p release +cp deployment/eks/flyte_generated.yaml ./release/flyte_eks_menifest.yaml +cp deployment/gcp/flyte_generated.yaml ./release/flyte_gcp_menifest.yaml +cp deployment/sandbox/flyte_generated.yaml ./release/flyte_sandbox_menifest.yaml +cp deployment/test/flyte_generated.yaml ./release/flyte_test_menifest.yaml \ No newline at end of file From 1ad85b545101d95c05d2237051faa9354d43eecd Mon Sep 17 00:00:00 2001 From: yuvraj Date: Tue, 27 Apr 2021 23:37:08 +0530 Subject: [PATCH 4/7] More changes Signed-off-by: yuvraj --- .github/workflows/publish-menifest.yml | 17 ++++++++++++++--- .goreleaser.yml | 2 +- script/prepare_artifacts.sh | 12 +++++++----- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-menifest.yml b/.github/workflows/publish-menifest.yml index 7c5a4775f9..88084d1422 100644 --- a/.github/workflows/publish-menifest.yml +++ b/.github/workflows/publish-menifest.yml @@ -1,13 +1,17 @@ name: Publish flyte manifest on: - push: - tags: - - 'v*' + workflow_dispatch: + inputs: + version: + description: 'version name. example v0.1.1' + required: true jobs: goreleaser: name: Goreleaser runs-on: ubuntu-latest + outputs: + version: ${{ steps.bump-version.outputs.tag }} steps: - uses: actions/checkout@v2 with: @@ -16,6 +20,13 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.14 + - name: Bump version and push tag + id: bump-version + uses: anothrNick/github-tag-action@1.17.2 + env: + GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} + WITH_V: true + CUSTOM_TAG: ${{ github.event.inputs.version }} - name: build Release Menifest run: | make prepare_artifacts diff --git a/.goreleaser.yml b/.goreleaser.yml index e20059bbbf..a69fd22b81 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -8,7 +8,7 @@ release: draft: false prerelease: auto discussion_category_name: General - name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}" + name_template: "{{.ProjectName}}-v{{.Version}}" disable: false extra_files: - glob: ./release/* \ No newline at end of file diff --git a/script/prepare_artifacts.sh b/script/prepare_artifacts.sh index c437012553..5cfd5d585f 100644 --- a/script/prepare_artifacts.sh +++ b/script/prepare_artifacts.sh @@ -2,8 +2,10 @@ set -ex -mkdir -p release -cp deployment/eks/flyte_generated.yaml ./release/flyte_eks_menifest.yaml -cp deployment/gcp/flyte_generated.yaml ./release/flyte_gcp_menifest.yaml -cp deployment/sandbox/flyte_generated.yaml ./release/flyte_sandbox_menifest.yaml -cp deployment/test/flyte_generated.yaml ./release/flyte_test_menifest.yaml \ No newline at end of file +for file in ./deployment/**/flyte_generated.yaml; do + if [ -f "$file" ]; then + result=${file/#"./deployment/"} + result=${result/%"/flyte_generated.yaml"} + cp $file "./release/flyte_${result}_menifest.yaml" + fi +done From 358faf8ce93f9d206c79576168cd45b85d874490 Mon Sep 17 00:00:00 2001 From: yuvraj Date: Tue, 27 Apr 2021 23:51:04 +0530 Subject: [PATCH 5/7] More changes Signed-off-by: yuvraj --- .github/workflows/publish-menifest.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish-menifest.yml b/.github/workflows/publish-menifest.yml index 88084d1422..31699cd8cc 100644 --- a/.github/workflows/publish-menifest.yml +++ b/.github/workflows/publish-menifest.yml @@ -27,6 +27,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} WITH_V: true CUSTOM_TAG: ${{ github.event.inputs.version }} + RELEASE_BRANCHES: master + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + ref: ${{ github.event.inputs.version }} - name: build Release Menifest run: | make prepare_artifacts From 12a7d24fd87d3a96e18f33aa5dabb5e6f1dc6852 Mon Sep 17 00:00:00 2001 From: yuvraj Date: Wed, 28 Apr 2021 21:13:56 +0530 Subject: [PATCH 6/7] fix typo Signed-off-by: yuvraj --- script/prepare_artifacts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/prepare_artifacts.sh b/script/prepare_artifacts.sh index 5cfd5d585f..e2d60e7f8d 100644 --- a/script/prepare_artifacts.sh +++ b/script/prepare_artifacts.sh @@ -6,6 +6,6 @@ for file in ./deployment/**/flyte_generated.yaml; do if [ -f "$file" ]; then result=${file/#"./deployment/"} result=${result/%"/flyte_generated.yaml"} - cp $file "./release/flyte_${result}_menifest.yaml" + cp $file "./release/flyte_${result}_manifest.yaml" fi done From 24551d5063089f48177712d727fc9a8e712fe02b Mon Sep 17 00:00:00 2001 From: yuvraj Date: Wed, 28 Apr 2021 23:52:48 +0530 Subject: [PATCH 7/7] minor changes Signed-off-by: yuvraj --- .github/workflows/publish-menifest.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/publish-menifest.yml b/.github/workflows/publish-menifest.yml index 31699cd8cc..834e3f51d6 100644 --- a/.github/workflows/publish-menifest.yml +++ b/.github/workflows/publish-menifest.yml @@ -1,4 +1,4 @@ -name: Publish flyte manifest +name: Create a flyte release on: workflow_dispatch: inputs: @@ -16,10 +16,6 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: "0" - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.14 - name: Bump version and push tag id: bump-version uses: anothrNick/github-tag-action@1.17.2