-
Notifications
You must be signed in to change notification settings - Fork 131
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
Overhaul releasing process #779
Conversation
Got these images building sending them to the public runners with Caching is not helpful if it gets removed every day, invalidated every day with the nightly rust update, executes every time on a fresh VM, etc. Also, there was a lot of duplicated processes and esp when launched 4 times in parallel it doesn't make anything faster. Besides, Still, they take a surprisingly long time to build (the last image gets built in 46min), normally it's 3.5 min for each without any cache. I'd suggest an optimization - produce the binaries separately (it's faster and probs you'll want the binaries somewhere anyway) in CI and on the images stage just put them in the containers. |
Oh btw I've updated the images and now they run off |
The next step is I'll steal your CI dockerfile to build it nightly with the other images in #paritytech/scripts. |
Regarding
I lied, just found that they've addressed my issue. |
please check if these images work correctly before merging: |
We will learn that on our testnet deployment :) |
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.
Looks good!
deployments/BridgeDeps.Dockerfile
Outdated
@@ -2,9 +2,10 @@ | |||
# | |||
# This image is meant to be used as a building block when building images for | |||
# the various components in the bridge repo, such as nodes and relayers. | |||
FROM ubuntu:xenial | |||
FROM ubuntu:20.04 | |||
|
|||
ENV LAST_DEPS_UPDATE 2020-12-21 |
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.
We should bump this and the one on line 21.
The idea behind these lines is that we can use them to break the cache and update dependencies if needed.
Dockerfile
Outdated
@@ -8,51 +8,33 @@ | |||
# | |||
# See the `deployments/README.md` for all the available `PROJECT` values. | |||
|
|||
# This first stage prepares our dependencies to be built by `cargo-chef`. | |||
FROM rust as planner | |||
FROM docker.io/paritytech/bridge-dependencies as builder |
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.
Is it not good enough to just do paritytech/bridge-dependencies
?
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's better to have the full names when building with something that's not docker, we use buildah.
Dockerfile
Outdated
|
||
ARG PROJECT=ethereum-poa-relay | ||
RUN cargo build --release --verbose -p ${PROJECT} | ||
RUN strip ./target/release/${PROJECT} | ||
|
||
# In this final stage we copy over the final binary and do some checks | ||
# to make sure that everything looks good. | ||
FROM ubuntu:xenial as runtime | ||
FROM docker.io/ubuntu:20.04 as runtime |
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.
Same question here, why do we need to specify docker.io
?
Dockerfile
Outdated
libssl-dev curl && \ | ||
groupadd -g 1000 user && \ | ||
useradd -u 1000 -g user -s /bin/sh -m user && \ | ||
# apt clean up |
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.
# apt clean up | |
# apt clean up |
echo ::set-output name=DATE::$(date +%d-%m-%Y) | ||
|
||
- name: Build image for ${{ matrix.project }} | ||
uses: redhat-actions/buildah-build@v2.2 |
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.
Why did you choose buildah
over build-push-action
?
Pinging @TriplEight since I've got some questions here |
I fixed some of my nitpicks since I want this to get used on tonight's testnet deployment. |
-> Due to the long image builds we have to use the self-hosted runner.
-> A self-hosted runner can't
buildah
Have to update to the newer version of the deprecated official docker action.
This is, in fact, not bad. Now the action uses BuildX.
-> BuildX has an ugly bug
Overhaul of publishing
ubuntu:20.04
basebuildah
actions