-
-
Notifications
You must be signed in to change notification settings - Fork 880
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
Stop using a diesel_cli docker image, use cargo-install in woodpecker. #4723
Conversation
dessalines
commented
May 16, 2024
- The diesel_cli image is 500MB, and rebuilt daily. Much easier to use binstall to install it.
- The diesel_cli image is 500MB, and rebuilt daily. Much easier to use binstall to install it.
.woodpecker.yml
Outdated
@@ -79,9 +79,11 @@ steps: | |||
cargo_machete: | |||
image: rustlang/rust:nightly | |||
commands: | |||
# Install cargo binstall | |||
- wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz |
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.
Not sure if there's a way to extract and run multiple lines in yaml... if anyone knows how to do this that'd be appreciated.
.woodpecker.yml
Outdated
# Install cargo binstall | ||
- wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | ||
- tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz | ||
- cp cargo-binstall /usr/local/cargo/bin |
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.
Wget and tar should not need to be run again. It might be possible to also remove cp and replace cargo binstall
with ./cargo-binstall
.
Alright I wasted a shameful amount of time on this:
|
environment: | ||
CARGO_HOME: .cargo_home | ||
DATABASE_URL: postgres://lemmy:password@database:5432/lemmy | ||
commands: | ||
- <<: *install_diesel_cli | ||
- diesel migration run | ||
- diesel print-schema --config-file=diesel.toml > tmp.schema |
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.
After #4673 is finished, this will be the only place where diesel cli is needed.
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.
Nice.