-
Notifications
You must be signed in to change notification settings - Fork 176
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
[CI] Add github action to build boot-tools on demand #3787
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3787 +/- ##
==========================================
+ Coverage 53.61% 55.44% +1.82%
==========================================
Files 548 768 +220
Lines 49302 70277 +20975
==========================================
+ Hits 26432 38963 +12531
- Misses 20629 28135 +7506
- Partials 2241 3179 +938
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
.github/workflows/tools.yml
Outdated
docker-push: | ||
name: Push to container registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we are pushing containers to registry, maybe we can rename it to build-boot-tools
?
.github/workflows/tools.yml
Outdated
- name: Set up Google Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v1 | ||
with: | ||
project_id: flow # TODO: is this correct? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @sjonpaulbrown to confirm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the correct project id.
.github/workflows/tools.yml
Outdated
mkdir boot-tools | ||
mv bootstrap util transit boot-tools/ | ||
tar -czf boot-tools.tar ./boot-tools/ | ||
gsutil cp boot-tools.tar gs://flow-genesis-bootstrap/boot-tools.tar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we update this to conditionally support test builds that are uploaded with an artifact name that uses the ref rather than boot-tools.tar
?
If we also address the comment on the inputs, we could essentially use the following to conditionally set the name. This would allow us to kick of on-demand builds that would allow us to build the boot tools for testing purposes.
ARTIFACT_NAME=$([ "$INPUT_PRODBUILD" = "1" ] && echo "boot-tools.tar" || echo "$(git rev-parse --short HEAD).tar")
gsutil cp boot-tools.tar gs://flow-genesis-bootstrap/$ARTIFACT_NAME
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about it uploads to a tag specific directory by default, and there's an option to promote it to the official image
e.g.
- upload to
tools/v0.x.x/boot-tools.tar
(ortools/1234abc/boot-tools.tar
if that's what was passed totag
) - if "promote" is set, also upload to
./boot-tools.tar
then the spork tooling could always pull from the versioned file, and the node operator docs could continue to point to the current location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds like a good solution to me.
.github/workflows/tools.yml
Outdated
inputs: | ||
tag: | ||
description: 'Tagged commit to build tools against' | ||
required: true | ||
type: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In conjunction with my other comment, this additional input would allow us to conditionally build production builds as well as test builds that we could use before publishing the production tools.
inputs: | |
tag: | |
description: 'Tagged commit to build tools against' | |
required: true | |
type: string | |
inputs: | |
tag: | |
description: 'Tagged commit to build tools against' | |
required: true | |
type: string | |
prodbuild: | |
description: 'Execute production artifact build. Defaults to test build that will create artifact with short commit' | |
type: string | |
default: 0 |
- id: auth | ||
uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: ${{ secrets.GCR_SERVICE_KEY }} # TODO: we need a new key to allow uploads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sjonpaulbrown @gomisha could one of your help create and add a new secret for this usecase?
bors merge |
3787: [CI] Add github action to build boot-tools on demand r=peterargue a=peterargue The PR adds a github action workflow that can be run on demand to build the `bootstrap`, `transit` and `util` tools, then upload them to GCS Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
3787: [CI] Add github action to build boot-tools on demand r=peterargue a=peterargue The PR adds a github action workflow that can be run on demand to build the `bootstrap`, `transit` and `util` tools, then upload them to GCS Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
The PR adds a github action workflow that can be run on demand to build the
bootstrap
,transit
andutil
tools, then upload them to GCS