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

github: separate workflow for helm repo index update #1359

Merged

Conversation

marquiz
Copy link
Contributor

@marquiz marquiz commented Sep 15, 2023

No need to (re-)build documentation when a release is published. Great simplification of the Helm repo index update script: do not scan all releases but just get the assets from the release that was published.

This separation should make the maintenance of scripts and workflows easier.

@netlify
Copy link

netlify bot commented Sep 15, 2023

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
🔨 Latest commit 72bf84c
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/65080a301416470008a77503
😎 Deploy Preview https://deploy-preview-1359--kubernetes-sigs-nfd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marquiz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 15, 2023
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 15, 2023
@marquiz
Copy link
Contributor Author

marquiz commented Sep 15, 2023

/assign @fmuyassarov

@marquiz
Copy link
Contributor Author

marquiz commented Sep 15, 2023

/cherry-pick release-0.13

@k8s-infra-cherrypick-robot

@marquiz: once the present PR merges, I will cherry-pick it on top of release-0.13 in a new PR and assign it to you.

In response to this:

/cherry-pick release-0.13

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@marquiz
Copy link
Contributor Author

marquiz commented Sep 15, 2023

/cherry-pick release-0.14

@k8s-infra-cherrypick-robot

@marquiz: once the present PR merges, I will cherry-pick it on top of release-0.14 in a new PR and assign it to you.

In response to this:

/cherry-pick release-0.14

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@marquiz marquiz force-pushed the devel/github-release-workflow branch from f90d485 to 6552732 Compare September 15, 2023 13:11
Copy link
Member

@fmuyassarov fmuyassarov left a comment

Choose a reason for hiding this comment

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

Looks much better in my opinion:)

Comment on lines 14 to 18
- name: Install helm
run: |
curl -sfL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash -s -- --version v3.12.3

Copy link
Member

@fmuyassarov fmuyassarov Sep 18, 2023

Choose a reason for hiding this comment

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

Suggested change
- name: Install helm
run: |
curl -sfL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash -s -- --version v3.12.3
- name: Install Helm
uses: azure/setup-helm@v3

I would suggest to use action image here instead which is doing the same thing as curl+bash

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, makes sense, fixed

Comment on lines +29 to +31
- name: Push
run: git push -f https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} gh-pages
Copy link
Member

Choose a reason for hiding this comment

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

no strong reasoning, but i found using stefanzweifel/git-auto-commit-action@v4 easier and cleaner to push to remote. But as said, I'm not against having plain git commands on the workflow, just heads up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd like to only rely on "official" actions or at least actions from verified publishers to voting against stefanzweifel. It would look slightly cleaner but doesn't even save any lines of yaml

No need to (re-)build documentation when a release is published.
Great simplification of the Helm repo index update script: do not scan
all releases but just get the assets from the release that was
published.

This separation should make the maintenance of scripts and workflows
easier.
@marquiz marquiz force-pushed the devel/github-release-workflow branch from 6552732 to 72bf84c Compare September 18, 2023 08:28
Comment on lines +3 to +4
release:
types: [published, edited]
Copy link
Member

@fmuyassarov fmuyassarov Sep 18, 2023

Choose a reason for hiding this comment

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

Do you really expect to be editing the releases where there could be some assets added/removed/updated? It is fine perhaps to edit the notes, but assets? Would not that require another patch releases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's say you publish the release but "forget" to add the assets. Then you "edit" the release, adding the missing assets.

@fmuyassarov
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 18, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c94cb43f37d2cbbd5686c266d189904fc1fe3b7d

@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Merging #1359 (72bf84c) into master (45cc1cf) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1359   +/-   ##
=======================================
  Coverage   30.00%   30.00%           
=======================================
  Files          56       56           
  Lines        7451     7451           
=======================================
  Hits         2236     2236           
  Misses       4971     4971           
  Partials      244      244           

@k8s-ci-robot k8s-ci-robot merged commit f0caf93 into kubernetes-sigs:master Sep 18, 2023
13 checks passed
@k8s-infra-cherrypick-robot

@marquiz: #1359 failed to apply on top of branch "release-0.13":

Applying: github: separate workflow for helm repo index update
Using index info to reconstruct a base tree...
M	.github/workflows/gh-pages.yml
M	scripts/github/update-gh-pages.sh
Falling back to patching base and 3-way merge...
Auto-merging scripts/github/update-gh-pages.sh
Auto-merging .github/workflows/gh-pages.yml
CONFLICT (content): Merge conflict in .github/workflows/gh-pages.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 github: separate workflow for helm repo index update
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.13

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-infra-cherrypick-robot

@marquiz: #1359 failed to apply on top of branch "release-0.14":

Applying: github: separate workflow for helm repo index update
Using index info to reconstruct a base tree...
M	.github/workflows/gh-pages.yml
M	scripts/github/update-gh-pages.sh
Falling back to patching base and 3-way merge...
Auto-merging scripts/github/update-gh-pages.sh
Auto-merging .github/workflows/gh-pages.yml
CONFLICT (content): Merge conflict in .github/workflows/gh-pages.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 github: separate workflow for helm repo index update
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.14

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@marquiz marquiz deleted the devel/github-release-workflow branch September 18, 2023 09:55
@marquiz marquiz mentioned this pull request Dec 20, 2023
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants