From 8acb61aa8cd0c6966b73287ef134feab5d7337c0 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Wed, 29 Jun 2022 08:07:40 +0530 Subject: [PATCH 1/4] fix release process Signed-off-by: Yuvraj --- .github/workflows/checks.yml | 7 ++++ .github/workflows/upgrade_automtion.yml | 43 +++++++++++++++++++++++-- .releaserc.json | 8 +---- 3 files changed, 49 insertions(+), 9 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d448fe901..34de01229 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -109,6 +109,13 @@ jobs: CURRENT_TAG=$(git tag --sort=-refname --points-at ${{ github.ref }} | head -n 1) echo "::set-output name=currentTag::$CURRENT_TAG" + upgrade: + name: Update package.json + needs: [check_for_tag] + uses: ./upgrade_automation.yml + with: + component: flyteconsole + push_docker_image: name: Build & Push Flyteconsole Image needs: [check_for_tag] diff --git a/.github/workflows/upgrade_automtion.yml b/.github/workflows/upgrade_automtion.yml index d52bb075f..f0d8a5ef7 100644 --- a/.github/workflows/upgrade_automtion.yml +++ b/.github/workflows/upgrade_automtion.yml @@ -10,6 +10,7 @@ on: options: - boilerplate - flyteidl + - flyteconsole jobs: trigger-upgrade: name: ${{ github.event.inputs.component }} Upgrade @@ -23,7 +24,7 @@ jobs: upgrade_flyteidl: name: Upgrade Flyteidl runs-on: ubuntu-latest - if: ${{ github.event.inputs.component == "boilerplate" }} + if: ${{ github.event.inputs.component == "flyteidl" }} steps: - uses: actions/checkout@v2 with: @@ -47,7 +48,7 @@ jobs: signoff: true branch: flyte-bot-update-flyteidl delete-branch: true - title: 'Update Flyteidl version' + title: "Update Flyteidl version" body: | Update Flyteidl version - Auto-generated by [flyte-bot] @@ -57,3 +58,41 @@ jobs: owners maintainers draft: false + + upgrade_flyteconsole: + name: Upgrade Flyteconsole version + runs-on: ubuntu-latest + if: ${{ github.event.inputs.component == "flyteconsole" }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + - name: Update release + run: | + FLYTECONSOLE_VERSION=$(curl --silent "https://api.github.com/repos/flyteorg/flyteconsole/releases/latest" | jq -r .tag_name) + TODO: sed command + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.FLYTE_BOT_PAT }} + commit-message: Update Flyteconsole version + committer: Flyte-Bot + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: true + branch: flyte-bot-update-flytecosnole + delete-branch: true + title: "Update Flyteconsole version" + body: | + Update Flyteconsole version + - Auto-generated by [flyte-bot] + labels: | + flyteconsole + team-reviewers: | + owners + maintainers + draft: false diff --git a/.releaserc.json b/.releaserc.json index 89c98cecf..f31bd2684 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -10,12 +10,6 @@ ], ["@semantic-release/npm", { "npmPublish": false }], "@semantic-release/github", - [ - "@semantic-release/git", - { - "assets": ["package.json", "CHANGELOG.md"], - "message": "chore(release): Release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" - } - ] + [] ] } From 1d6efc7c2ee794073848620b498718f91d52cd6b Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Wed, 29 Jun 2022 08:41:03 +0530 Subject: [PATCH 2/4] more changes Signed-off-by: Yuvraj --- .github/workflows/checks.yml | 42 ++++++++++++++++++++++--- .github/workflows/upgrade_automtion.yml | 37 ---------------------- 2 files changed, 37 insertions(+), 42 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 34de01229..ff1c2047d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -110,11 +110,43 @@ jobs: echo "::set-output name=currentTag::$CURRENT_TAG" upgrade: - name: Update package.json - needs: [check_for_tag] - uses: ./upgrade_automation.yml - with: - component: flyteconsole + name: Upgrade Flyteconsole version + runs-on: ubuntu-latest + needs: + - check_for_tag + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + - name: Update release + run: | + FLYTECONSOLE_VERSION=$(curl --silent "https://api.github.com/repos/flyteorg/flyteconsole/releases/latest" | jq -r .tag_name) + sed -e 's/"version": [^\"]*"/"version": "$FLYTECONSOLE_VERSION"/g' packages/zapp/console/package.json + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.FLYTE_BOT_PAT }} + commit-message: Update Flyteconsole version + committer: Flyte-Bot + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: true + branch: flyte-bot-update-flytecosnole + delete-branch: true + title: "Update Flyteconsole version" + body: | + Update Flyteconsole version + - Auto-generated by [flyte-bot] + labels: | + flyteconsole + team-reviewers: | + owners + maintainers + draft: false push_docker_image: name: Build & Push Flyteconsole Image diff --git a/.github/workflows/upgrade_automtion.yml b/.github/workflows/upgrade_automtion.yml index f0d8a5ef7..af967a4d7 100644 --- a/.github/workflows/upgrade_automtion.yml +++ b/.github/workflows/upgrade_automtion.yml @@ -59,40 +59,3 @@ jobs: maintainers draft: false - upgrade_flyteconsole: - name: Upgrade Flyteconsole version - runs-on: ubuntu-latest - if: ${{ github.event.inputs.component == "flyteconsole" }} - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: "0" - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - name: Update release - run: | - FLYTECONSOLE_VERSION=$(curl --silent "https://api.github.com/repos/flyteorg/flyteconsole/releases/latest" | jq -r .tag_name) - TODO: sed command - - name: Create Pull Request - id: cpr - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.FLYTE_BOT_PAT }} - commit-message: Update Flyteconsole version - committer: Flyte-Bot - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - signoff: true - branch: flyte-bot-update-flytecosnole - delete-branch: true - title: "Update Flyteconsole version" - body: | - Update Flyteconsole version - - Auto-generated by [flyte-bot] - labels: | - flyteconsole - team-reviewers: | - owners - maintainers - draft: false From f130846af0ded155366ba4c889bf1b2290435b8d Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 30 Jun 2022 19:04:10 +0530 Subject: [PATCH 3/4] more changes Signed-off-by: Yuvraj --- .github/workflows/checks.yml | 63 +++++++++--------------------- Makefile | 7 ++++ packages/zapp/console/package.json | 2 +- 3 files changed, 26 insertions(+), 46 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ff1c2047d..ab988bc6c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -109,54 +109,27 @@ jobs: CURRENT_TAG=$(git tag --sort=-refname --points-at ${{ github.ref }} | head -n 1) echo "::set-output name=currentTag::$CURRENT_TAG" - upgrade: - name: Upgrade Flyteconsole version + push_docker_image: + name: Push to Github Registry runs-on: ubuntu-latest - needs: - - check_for_tag steps: - uses: actions/checkout@v2 with: - fetch-depth: "0" - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - name: Update release + fetch-depth: '0' + - name: Autobump version + env: + TAG: ${{ needs.check_for_tag.outputs.currentTag }} run: | - FLYTECONSOLE_VERSION=$(curl --silent "https://api.github.com/repos/flyteorg/flyteconsole/releases/latest" | jq -r .tag_name) - sed -e 's/"version": [^\"]*"/"version": "$FLYTECONSOLE_VERSION"/g' packages/zapp/console/package.json - - name: Create Pull Request - id: cpr - uses: peter-evans/create-pull-request@v3 + VERSION=${TAG:1} make update_npmversion + - name: Push Docker Image to Github Registry + uses: whoan/docker-build-with-cache-action@v5 with: - token: ${{ secrets.FLYTE_BOT_PAT }} - commit-message: Update Flyteconsole version - committer: Flyte-Bot - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - signoff: true - branch: flyte-bot-update-flytecosnole - delete-branch: true - title: "Update Flyteconsole version" - body: | - Update Flyteconsole version - - Auto-generated by [flyte-bot] - labels: | - flyteconsole - team-reviewers: | - owners - maintainers - draft: false - - push_docker_image: - name: Build & Push Flyteconsole Image - needs: [check_for_tag] - uses: flyteorg/flytetools/.github/workflows/publish.yml@master - with: - version: ${{ needs.check_for_tag.outputs.currentTag }} - dockerfile: Dockerfile - push: true - repository: ${{ github.repository }} - secrets: - FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} - FLYTE_BOT_USERNAME: ${{ secrets.FLYTE_BOT_USERNAME }} + username: "${{ secrets.FLYTE_BOT_USERNAME }}" + password: evalsocket + image_name: flyteorg/flyteconsole + image_tag: latest,${{ github.sha }},${{ needs.check_for_tag.outputs.currentTag }} + push_git_tag: true + push_image_and_stages: false + dockerfile: Dockerfile + registry: ghcr.io + build_extra_args: "--compress=true" \ No newline at end of file diff --git a/Makefile b/Makefile index ecf6bb4de..41bccb94c 100644 --- a/Makefile +++ b/Makefile @@ -42,3 +42,10 @@ test_unit_codecov: .PHONY: generate_ssl generate_ssl: ./script/generate_ssl.sh + +PLACEHOLDER_NPM := \"version\": \"0.0.0-develop\" + +.PHONY: update_npmversion +update_npmversion: + grep "$(PLACEHOLDER_NPM)" "packages/zapp/console/package.json" + sed -i "s/$(PLACEHOLDER_NPM)/\"version\": \"${VERSION}\"/g" "packages/zapp/console/package.json" \ No newline at end of file diff --git a/packages/zapp/console/package.json b/packages/zapp/console/package.json index 1419c1208..d87895a86 100644 --- a/packages/zapp/console/package.json +++ b/packages/zapp/console/package.json @@ -1,6 +1,6 @@ { "name": "@flyteconsole/client-app", - "version": "1.1.3", + "version": "0.0.0-develop", "description": "The web UI for the Flyte platform", "repository": { "type": "git", From 0912f7b4aa76885f040f7617525426b3027c1044 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 30 Jun 2022 20:02:52 +0530 Subject: [PATCH 4/4] fix workflow Signed-off-by: Yuvraj --- .github/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ab988bc6c..c9371e7ca 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -111,6 +111,7 @@ jobs: push_docker_image: name: Push to Github Registry + needs: [check_for_tag] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2