-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add a command for building the artifacts inside Docker #9609
base: main
Are you sure you want to change the base?
Conversation
This adds: * A Dockerfile.artifacts with the dependencies required to run the `rake artifact:all` command inside Docker * A `./ci/docker_build_artifacts.sh` script that makes use of this image * A gradle task that simply executes that script
I opened this PR to have a place to discuss it and to have the Dockefile pushed somewhere, but TBH I find the value of this somewhat dubious myself:
I'm opened to suggestions or just dropping this PR until we figure out something better. |
I'm not aware of any portable way of building rpms and debs that we could use here. The rake tasks for rpm and deb use external dependencies and those we'd still have when building via Gradle directly. |
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 love this PR, but I'm worried about dealing with, and updating, two different base images.
Could we give the gradle thing a shot, and fall back to this strategy if that fails?
docker run --rm \ | ||
-v $(pwd):/logstash:delegated \ | ||
ls-artifacts \ | ||
sh -c "cd logstash && rake artifact:all" |
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 think the reason this breaks on docker is that we don't have a gradle task for it. If we had ./gradlew artifactAll
invoke the rake task it would probably not segfault. Here's an example gradle task that invokes rake https://github.com/elastic/logstash/blob/master/build.gradle#L176
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.
Indeed, that does the trick, I'll update the PR.
This adds:
rake artifact:all
command inside Docker./ci/docker_build_artifacts.sh
script that makes use of this image