-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat: move patch apply logic to patchable #1032
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
a2509c3
wip
dervoeti ee787fe
Merge branch 'main' of https://github.com/stackabletech/docker-images…
dervoeti 48e0345
Update druid/Dockerfile
dervoeti 21fbd88
fix: remove unnecessary check / shadow repo root var
dervoeti 5fa3620
fix: druid src path
dervoeti 75f8990
fix: druid src path
dervoeti bdc6dfd
feat: introduce stackable-devel image
dervoeti 597ec11
fix: use PathBuf in ProductVersionContext
dervoeti 0293728
chore: align zookeeper patch directory structure
dervoeti 455e2fa
fix: stackable-devel dnf and shell config
dervoeti 70360f2
chore: switch patch process in other products
dervoeti 1b02ecf
fix: hive build
dervoeti abd2a55
Merge branch 'main' of https://github.com/stackabletech/docker-images…
dervoeti de74bde
fix: trino build
dervoeti e17b727
fix: spark build
dervoeti df556a5
Merge branch 'main' of https://github.com/stackabletech/docker-images…
dervoeti 3019af4
chore: make hadolint happy
dervoeti 65a8ef9
fix: remove hbase intermediate sources / remove unnecessary and operator
dervoeti 0a92081
chore: remove product sources in subshell
dervoeti eb83aba
fix: permissions in patchable build process
dervoeti 237d275
Merge branch 'main' of https://github.com/stackabletech/docker-images…
dervoeti 92327a9
Merge branch 'main' of https://github.com/stackabletech/docker-images…
dervoeti 245f135
Merge branch 'main' of https://github.com/stackabletech/docker-images…
dervoeti d11d061
chore: remove unnecessary curl command in build process
dervoeti 8dbf055
chore: move adding of JMX config and start-metastore script from buil…
dervoeti 92b43bf
chore: remove git repo in trino and hbase-operator-tools to avoid mav…
dervoeti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
versions = [ | ||
{ | ||
"product": "8", | ||
"stackable-base": "1.0.0", | ||
"stackable-devel": "1.0.0", | ||
}, | ||
{ | ||
"product": "11", | ||
"stackable-base": "1.0.0", | ||
"stackable-devel": "1.0.0", | ||
}, | ||
{ | ||
"product": "17", | ||
"stackable-base": "1.0.0", | ||
"stackable-devel": "1.0.0", | ||
}, | ||
{ | ||
"product": "21", | ||
"stackable-base": "1.0.0", | ||
"stackable-devel": "1.0.0", | ||
}, | ||
{ | ||
"product": "22", | ||
"stackable-base": "1.0.0", | ||
"stackable-devel": "1.0.0", | ||
}, | ||
{ | ||
"product": "23", | ||
"stackable-base": "1.0.0", | ||
"stackable-devel": "1.0.0", | ||
}, | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
versions = [ | ||
{ | ||
"product": "1.0.0", | ||
"stackable-devel": "1.0.0", | ||
}, | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# syntax=docker/dockerfile:1.10.0@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5 | ||
# check=error=true | ||
|
||
# | ||
# Base image for builder stages | ||
# | ||
|
||
# Find the latest version at https://catalog.redhat.com/software/containers/ubi9/ubi-minimal/615bd9b4075b022acc111bf5?container-tabs=gti | ||
# IMPORTANT: Make sure to use the "Manifest List Digest" that references the images for multiple architectures | ||
# rather than just the "Image Digest" that references the image for the selected architecture. | ||
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:c0e70387664f30cd9cf2795b547e4a9a51002c44a4a86aa9335ab030134bf392 | ||
|
||
# intentionally unused | ||
ARG PRODUCT | ||
ARG STACKABLE_USER_UID | ||
ARG STACKABLE_USER_GID | ||
ARG STACKABLE_USER_NAME | ||
|
||
# Sets the default shell to Bash with strict error handling and robust pipeline processing. | ||
# "-e": Exits immediately if a command exits with a non-zero status | ||
# "-u": Treats unset variables as an error, preventing unexpected behavior from undefined variables. | ||
# "-o pipefail": Causes a pipeline to return the exit status of the last command in the pipe that failed, ensuring errors in any part of a pipeline are not ignored. | ||
# "-c": Allows the execution of commands passed as a string | ||
# This is automatically inherited in all other Dockerfiles that use this unless it is overwritten | ||
SHELL ["/bin/bash", "-euo", "pipefail", "-c"] | ||
|
||
# We configure microdnf to not install weak dependencies in this file | ||
# Not doing this caused the content of images to become unpredictable because | ||
# based on which packages get updated by `microdnf update` new weak dependencies | ||
# might be installed that were not present earlier (the ubi base image doesn't | ||
# seem to install weak dependencies) | ||
# This also affects the packages that are installed in our Dockerfiles (java as prime | ||
# example). | ||
# https://github.com/stackabletech/docker-images/pull/533 | ||
COPY stackable-base/stackable/dnf.conf /etc/dnf/dnf.conf | ||
|
||
# This SHOULD be kept in sync with operator-templating and other tools to reduce build times | ||
# Find the latest version here: https://doc.rust-lang.org/stable/releases.html | ||
# renovate: datasource=github-releases packageName=rust-lang/rust | ||
ENV RUST_DEFAULT_TOOLCHAIN_VERSION=1.84.1 | ||
# Find the latest version here: https://crates.io/crates/cargo-cyclonedx | ||
# renovate: datasource=crate packageName=cargo-cyclonedx | ||
ENV CARGO_CYCLONEDX_CRATE_VERSION=0.5.7 | ||
# Find the latest version here: https://crates.io/crates/cargo-auditable | ||
# renovate: datasource=crate packageName=cargo-auditable | ||
ENV CARGO_AUDITABLE_CRATE_VERSION=0.6.6 | ||
|
||
RUN <<EOF | ||
microdnf update | ||
|
||
# git: Needed to fetch source | ||
# gcc: Needed for compilation | ||
microdnf install \ | ||
gcc \ | ||
git | ||
|
||
### | ||
### Add Stackable user and group | ||
### | ||
# Added only temporarily to create the user and group, removed again below | ||
microdnf install shadow-utils | ||
groupadd --gid ${STACKABLE_USER_GID} --system ${STACKABLE_USER_NAME} | ||
|
||
# The --no-log-init is required to work around a bug/problem in Go/Docker when very large UIDs are used | ||
# See https://github.com/moby/moby/issues/5419#issuecomment-41478290 for more context | ||
# Making this a system user prevents a mail dir from being created, expiry of passwords etc. but it will warn: | ||
# useradd warning: stackable's uid 1000 is greater than SYS_UID_MAX 999 | ||
# We can safely ignore this warning, to get rid of the warning we could change /etc/login.defs but that does not seem worth it | ||
# We'll leave the home directory hardcoded to /stackable because I don't want to deal with which chars might be valid and which might not in user name vs. directory | ||
useradd \ | ||
--no-log-init \ | ||
--gid ${STACKABLE_USER_GID} \ | ||
--uid ${STACKABLE_USER_UID} \ | ||
--system \ | ||
--create-home \ | ||
--home-dir /stackable \ | ||
${STACKABLE_USER_NAME} | ||
microdnf remove shadow-utils | ||
|
||
microdnf clean all | ||
rm -rf /var/cache/yum | ||
|
||
# WARNING (@NickLarsenNZ): We should pin the rustup version | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain "$RUST_DEFAULT_TOOLCHAIN_VERSION" | ||
. "$HOME/.cargo/env" && cargo --quiet install cargo-cyclonedx@"$CARGO_CYCLONEDX_CRATE_VERSION" cargo-auditable@"$CARGO_AUDITABLE_CRATE_VERSION" && rustup toolchain install | ||
EOF | ||
|
||
|
||
# **patchable** | ||
# Tool for patch management | ||
# Copy source code of patchable | ||
COPY rust/patchable/ /patchable/rust/patchable | ||
# Copy workspace files | ||
COPY Cargo.* /patchable/ | ||
|
||
RUN <<EOF | ||
microdnf update | ||
microdnf install openssl-devel pkg-config | ||
cd /patchable | ||
. "$HOME/.cargo/env" | ||
cargo auditable --quiet build --release && cargo cyclonedx --all --spec-version 1.5 --describe binaries | ||
mv /patchable/target/release/patchable /stackable/patchable | ||
microdnf clean all | ||
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
versions = [ | ||
{ | ||
"product": "1.0.0", | ||
}, | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.