Skip to content

Commit

Permalink
[PLAT-12440] Fixed the 'switch to correct branch' step of update-vers…
Browse files Browse the repository at this point in the history
…ion GH action

Summary:
- The update-version GH action of the charts repo has an issue for 2.20.* releases. It was switching to the 2.2 branch for the 2.20 releases in the 'switch to correct branch' step because 2.20 is treated as a number and gets truncated to 2.2 as the simplest form.
- I made the changes to pass the 'yb_release_train' argument as a string.
- It will fix the following GH action failures -
   - https://github.com/yugabyte/charts/actions/runs/7559369603/job/20583030779
   - https://github.com/yugabyte/charts/actions/runs/7659484788/job/20874696519

Test Plan:
- Tested it on custom gh action - https://github.com/baba230896/test-helm-versioning/actions/runs/7692835435
- curl command

```
curl -X POST \
-H "Authorization: token TOKEN" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" https://api.github.com/repos/baba230896/test-helm-versioning/dispatches \
--data '{"event_type": "update-on-release", "client_payload":
    {"yb_release_train_f": 2.20,
     "yb_release_train_str": "2.20" } }'
```

Reviewers: bgandhi, sanketh, anijhawan, jharveysmith

Reviewed By: bgandhi

Differential Revision: https://phorge.dev.yugabyte.com/D32003
  • Loading branch information
baba230896 committed Jan 30, 2024
1 parent d5df8e6 commit 8f8b810
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/create-repository-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fi
echo "Release train determined: $train"
echo "::set-output name=yb_train::${train}"
- name: "Trigger Repository Dispatch - yugabyte/terraform-gcp-yugabyte"
run: |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" \
Expand All @@ -35,8 +35,8 @@ jobs:
--data '{"event_type": "build-on-release", "client_payload":
{"prerelease": "${{ github.event.release.prerelease }}",
"release": "${{github.event.release.tag_name}}",
"yb_release_train": ${{steps.yb_train.outputs.yb_train}} } }'
"yb_release_train": "${{steps.yb_train.outputs.yb_train}}" } }'
- name: "Trigger Repository Dispatch - yugabyte/terraform-aws-yugabyte"
run: |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" \
Expand All @@ -45,8 +45,8 @@ jobs:
--data '{"event_type": "build-on-release", "client_payload":
{"prerelease": "${{ github.event.release.prerelease }}",
"release": "${{github.event.release.tag_name}}",
"yb_release_train": ${{steps.yb_train.outputs.yb_train}} } }'
"yb_release_train": "${{steps.yb_train.outputs.yb_train}}" } }'
- name: "Trigger Repository Dispatch - yugabyte/terraform-azure-yugabyte"
run: |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" \
Expand All @@ -55,8 +55,8 @@ jobs:
--data '{"event_type": "build-on-release", "client_payload":
{"prerelease": "${{ github.event.release.prerelease }}",
"release": "${{github.event.release.tag_name}}",
"yb_release_train": ${{steps.yb_train.outputs.yb_train}} } }'
"yb_release_train": "${{steps.yb_train.outputs.yb_train}}" } }'
- name: "Trigger Repository Dispatch - yugabyte/azure-resource-manager"
run: |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" \
Expand All @@ -65,8 +65,8 @@ jobs:
--data '{"event_type": "build-on-release", "client_payload":
{"prerelease": "${{ github.event.release.prerelease }}",
"release": "${{github.event.release.tag_name}}",
"yb_release_train": ${{steps.yb_train.outputs.yb_train}} } }'
"yb_release_train": "${{steps.yb_train.outputs.yb_train}}" } }'
- name: "Trigger Repository Dispatch - yugabyte/gcp-deployment-manager"
run: |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" \
Expand All @@ -75,8 +75,8 @@ jobs:
--data '{"event_type": "build-on-release", "client_payload":
{"prerelease": "${{ github.event.release.prerelease }}",
"release": "${{github.event.release.tag_name}}",
"yb_release_train": ${{steps.yb_train.outputs.yb_train}} } }'
"yb_release_train": "${{steps.yb_train.outputs.yb_train}}" } }'
- name: "Trigger Repository Dispatch - yugabyte/aws-cloudformation"
run: |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" \
Expand All @@ -85,8 +85,8 @@ jobs:
--data '{"event_type": "build-on-release", "client_payload":
{"prerelease": "${{ github.event.release.prerelease }}",
"release": "${{github.event.release.tag_name}}",
"yb_release_train": ${{steps.yb_train.outputs.yb_train}} } }'
"yb_release_train": "${{steps.yb_train.outputs.yb_train}}" } }'
- name: "Trigger Repository Dispatch - yugabyte/homebrew-tap"
run: |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" \
Expand All @@ -95,8 +95,8 @@ jobs:
--data '{"event_type": "update-on-release", "client_payload":
{"prerelease": "${{ github.event.release.prerelease }}",
"release": "${{github.event.release.tag_name}}",
"yb_release_train": ${{steps.yb_train.outputs.yb_train}} } }'
"yb_release_train": "${{steps.yb_train.outputs.yb_train}}" } }'
- name: "Trigger Repository Dispatch - yugabyte/utilities"
run: |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" \
Expand All @@ -105,8 +105,8 @@ jobs:
--data '{"event_type": "build-on-release", "client_payload":
{"prerelease": "${{ github.event.release.prerelease }}",
"release": "${{github.event.release.tag_name}}",
"yb_release_train": ${{steps.yb_train.outputs.yb_train}} } }'
"yb_release_train": "${{steps.yb_train.outputs.yb_train}}" } }'
- name: "Trigger Repository Dispatch - yugabyte/charts"
run: |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" \
Expand All @@ -115,7 +115,7 @@ jobs:
--data '{"event_type": "update-on-release", "client_payload":
{"prerelease": "${{ github.event.release.prerelease }}",
"release": "${{github.event.release.tag_name}}",
"yb_release_train": ${{steps.yb_train.outputs.yb_train}} } }'
"yb_release_train": "${{steps.yb_train.outputs.yb_train}}" } }'
- name: "Trigger Repository Dispatch - yugabyte/yugabyte-db-action"
run: |
Expand Down

0 comments on commit 8f8b810

Please sign in to comment.