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] Workflow to automatically build and push etcd binaries #4

Merged
merged 21 commits into from
Sep 23, 2024

Conversation

aneesh1
Copy link

@aneesh1 aneesh1 commented Sep 19, 2024

Automates building and pushing etcd binaries whenever we create a new branch.

@aneesh1 aneesh1 force-pushed the aa/github-workflow-dd-build branch 2 times, most recently from 0719df3 to c0ed647 Compare September 19, 2024 21:51
env:
KUBE_BUILD_PLATFORM: ${{ matrix.platform }}
- name: Build etcd
run: REPOSITORY=https://github.com/${{ env.GITHUB_REPOSITORY}}.git ./scripts/build-binary ${{ env.RELEASE_VERSION }}
Copy link
Author

Choose a reason for hiding this comment

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

There was another script, ./scripts/release.sh, that I tried to use - it didn't work.

If I supplied a custom tag like RELEASE_VERSION=v3.5.14-dd.16-aneesh-test, it still would look for a branch name like release-3.5. We seem to have a different branch naming scheme and I didn't want to change the code in ./scripts/release.sh, so I found this script instead which builds the binaries for us.

If we're interested in changing our branch naming scheme, we can switch to ./scripts/release.sh in a follow up PR, but for now, this works.

asset_path: ./_output/release-tars/etcd-${{ env.RELEASE_VERSION }}-${{ matrix.platform }}.${{ matrix.extension }}
asset_name: etcd-${{ env.RELEASE_VERSION }}-${{ matrix.platform }}.${{ matrix.extension }}
asset_content_type: application/tar+gzip
addchecksum:
Copy link
Author

Choose a reason for hiding this comment

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

Needed to be separate b/c it relies on the output of the release job and b/c it can't run with strategy.matrix since it'll try and upload a file twice (which doesn't work).

Copy link

Choose a reason for hiding this comment

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

Why not merge both.
Also do we need the checksum file at all ?
Or do we need the checksum file to be named SHA256SUMS ?

Copy link
Author

@aneesh1 aneesh1 Sep 23, 2024

Choose a reason for hiding this comment

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

Also do we need the checksum file at all ?

We use it on our ansible playbook (specifically, this function) - I think it'd be good to keep.

I've changed the flow to now be:

  1. Build everything
  2. Define the build matrix to attach select artifacts to the release.

.github/workflows/dd-build.yaml Show resolved Hide resolved
@aneesh1 aneesh1 marked this pull request as ready for review September 20, 2024 18:17
Copy link

@nyodas nyodas left a comment

Choose a reason for hiding this comment

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

Let's try this out and see if we're good.

@aneesh1 aneesh1 merged commit 44e611b into release-3.5-dd-v3.5.14-dd.1 Sep 23, 2024
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants