-
Notifications
You must be signed in to change notification settings - Fork 118
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: workflow to build and publish the stacks-node image used internally for integration tests #1497
base: master
Are you sure you want to change the base?
Conversation
…ly for integration tests [skip ci]
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.
Can you clarify what the difference is between the docker image being built in this workflow compared to the image built in the stacks-blockchain repo for the desired branch? I may be missing some context, but they appear to be getting built the same way, with the only difference possibly being the supported platforms.
If the workflow in the stacks-blockchain repo does not currently fit your need, it may make more sense to modify it in the origin repo rather than maintain an orphaned build process in a separate repository. Additionally, if this is for integration testing we should try to use the same images built and published from the stacks-blockchain repo if possible for them to be considered valid.
What are your thoughts?
- name: Checkout | ||
uses: actions/checkout@v3 |
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.
Seems like this step can be used to checkout the stacks-blockchain repo instead of the api repo
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.
It checks out the API repo to grab the dockerfile (in this repo) used in a job later down. That could be changed to pull the dockerfile via a git uri but the syntax isn't very nice.
Yep that's the primary difference (arm64 in particular).
Yeah, I think that makes sense. One barrier here would be that even with the cross-arch compilation technique used in this PR, it still adds around 15 minutes to the build time for the image (and we'd still want it building imagines on each branch, at least for now). Perhaps the blockchain repo maintainers would be alright with that though. I'll try to get a PR out on that repo, then we can re-consider this PR if that doesn't pan out. |
If I'm not mistaken, I think jwiley has already completed this work here: stacks-network/stacks-core#3199 |
We're still blocked on upstream adding ARM64 support. And we might also need this workflow for the upcoming Stacks v2.2 release. Leaving this PR as-is for now. |
This should be re-addressed closer to Stacks 3.0 release to see if cross-platform stacks-node images are available from core repo |
@zone117x Are we still waiting for this one? |
PR against master branch so that the github "run workflow" UI is available.
The API pulls a pre-built image for the stacks-node, used for both local development and in CI tests. Currently, it's pulling from another repo:
stacks-blockchain-api/stacks-blockchain/docker/Dockerfile
Line 2 in 5ee9d34
This PR creates a workflow dispatch to build and publish the testing stacks-node docker image. Once merged, a follow-up PR will change the above code to use the image produced by this repo.
Cross-compilation optimizations are implemented to build both x86 and arm64 images (without taking several hours).
Image tags use the short git commit hash -- this can be improved later once the stacks-blockchain
next
branch stabilizes (e.g. with an RC).See demo run here: https://github.com/hirosystems/stacks-blockchain-api/actions/runs/3759601436/jobs/6389358450