Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow steps to build and publish quickstart manifests #5260

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

khanhtc1202
Copy link
Member

What this PR does / why we need it:

This PR updates the workflow to automate the quickstart manifest release process. A PR to update quickstart manifests will be opened after the release process finishes updating the binary to the PipeCD release page.

Which issue(s) this PR fixes:

Part of #5148

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.10%. Comparing base (f017312) to head (6c7786e).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5260      +/-   ##
==========================================
+ Coverage   24.03%   24.10%   +0.06%     
==========================================
  Files         439      441       +2     
  Lines       47040    47099      +59     
==========================================
+ Hits        11305    11352      +47     
- Misses      34832    34844      +12     
  Partials      903      903              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

t-kikuc
t-kikuc previously approved these changes Oct 7, 2024
@khanhtc1202 khanhtc1202 enabled auto-merge (squash) October 7, 2024 15:52
version: ${{ env.HELM_VERSION }}
- name: Build quickstart manifests
run: |
helm template pipecd oci://ghcr.io/pipe-cd/chart/pipecd --version ${{ env.PIPECD_VERSION }} -n pipecd -f quickstart/control-plane-values.yaml > quickstart/manifests/control-plane.yaml
Copy link
Contributor

@Warashi Warashi Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oci://ghcr.io/pipe-cd/chart/pipecd is pushed in publish_image_chart.yaml. So I think we should place this PR's codes in it.

- name: Publish helm charts
run: |
make build/chart VERSION=${{ env.PIPECD_VERSION }}
helm push .artifacts/pipecd-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.GHCR }}/pipe-cd/chart
helm push .artifacts/piped-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.GHCR }}/pipe-cd/chart
helm push .artifacts/helloworld-${{ env.PIPECD_VERSION }}.tgz oci://${{ env.GHCR }}/pipe-cd/chart

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Warashi Got your point. I think I only want to trigger this workflow on release (the publish_image_chart trigger on every pull request which is merged to master), so I guess we should make a new workflow instead of adding to an existing one. WDYT? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed my mind. I moved these steps to the publish_image_chart workflow as your suggestion, with some of the conditions checked in the steps' definition. Please recheck when you have time.

Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
Comment on lines 9 to 10
release:
types: [created]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how this workflow works when triggered with a release event.
I think it will work as expected. However, it will run twice simultaneously because we usually push a tag by creating a new release.

I suggest to use startsWith(github.ref, 'refs/tags/') to run steps only if the tags are pushed.

ref; https://docs.github.com/ja/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#startswith
ref; https://docs.github.com/ja/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context (github.ref)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment, addressed by 6c7786e 👀

Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
Copy link
Contributor

@Warashi Warashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

@khanhtc1202 khanhtc1202 merged commit ea78506 into master Oct 8, 2024
14 of 16 checks passed
@khanhtc1202 khanhtc1202 deleted the workflow-publish-quickstart-manifests branch October 8, 2024 04:26
github-actions bot pushed a commit that referenced this pull request Oct 8, 2024
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>
t-kikuc added a commit that referenced this pull request Oct 8, 2024
#5263 (#5265)

* Fix panic in ECS driftdetection when a taskdef in livestates does not exist (#5240)

* Generate v0.49.x docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix: avoid panic when live taskdef does not exist

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Upgrade aws-sdk-go-v2 (#5241)

* Generate v0.49.x docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* upgrade aws-sdk-go-v2

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* upgrade aws-sdk-go-v2/**/*

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix compile errors caused by the breaking change

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix a test due to added RestartPolicy

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix: avoid panic when live taskdef does not exist

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix go.sum by `make update/go-deps`

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Remove an unused field 'configFilePathInGitRepo' (#5248)

* Generate v0.49.x docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* remove unused field 'configFilePathInGitRepo'

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Support fetching a piped config from AWS SSM Parameter Store (#5249)

* Generate v0.49.x docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* add --aws-ssm-parameter

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* add config-aws-ssm-parameter to piped

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* update docs of runtime options

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Remove subnet ordering in head manifest (#5254)

Signed-off-by: HoangNguyen689 <ndhoang.bk.hedspi@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Update quickstart header note (#5255)

Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Update feature status (#5256)

Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Support directly designating a gitSSHKey instead of File for launcher (#5258)

* Generate v0.49.x docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* add --git-ssh-key-env

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* update docs: add '--git-ssh-key-env'

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* add '\n' at the end of ssh key

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Directly use data instead of env

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Clarify the flag description

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix error message:  'and' -> 'or'

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Add workflow steps to build and publish quickstart manifests (#5260)

Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Update workflow not to run by matrix (#5262)

Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Update RELEASE to v0.49.1 and update v0.49.x docs (#5263)

* update RELEASE to v0.49.1

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* update docs of v0.49.x by `make release version=v0.49.1`

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>
Signed-off-by: HoangNguyen689 <ndhoang.bk.hedspi@gmail.com>
Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Co-authored-by: Tetsuya Kikuchi <97105818+t-kikuc@users.noreply.github.com>
Co-authored-by: HoangNguyen689 <ndhoang.bk.hedspi@gmail.com>
Co-authored-by: Khanh Tran <32532742+khanhtc1202@users.noreply.github.com>
Co-authored-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants