diff --git a/.github/ISSUE_TEMPLATE/update-base-ubi-rust-builders.md b/.github/ISSUE_TEMPLATE/update-base-ubi-rust-builders.md index cb552e447..ad112752f 100644 --- a/.github/ISSUE_TEMPLATE/update-base-ubi-rust-builders.md +++ b/.github/ISSUE_TEMPLATE/update-base-ubi-rust-builders.md @@ -51,7 +51,7 @@ Add/Change/Remove anything that isn't applicable anymore > This list should be completed by the assignee(s), once respective PRs have been merged. Once all items have been > checked, the issue can be moved into _Development: Done_. -- [ ] Done for [ubi9-rust-builder/Dockerfile](https://github.com/stackabletech/docker-images/blob/main/ubi9-rust-builder/Dockerfile) +- [ ] Done for [ubi10-rust-builder/Dockerfile](https://github.com/stackabletech/docker-images/blob/main/ubi10-rust-builder/Dockerfile) - [ ] Can build the image locally - [ ] Can build an operator image @@ -59,7 +59,7 @@ Add/Change/Remove anything that isn't applicable anymore Testing instructions ```shell -docker build -t oci.stackable.tech/sdp/ubi9-rust-builder . -f ubi9-rust-builder/Dockerfile +docker build -t oci.stackable.tech/sdp/ubi10-rust-builder . -f ubi10-rust-builder/Dockerfile # Change directory into the an operator repository and ensure the image can build docker build . -f docker/Dockerfile diff --git a/.github/workflows/ubi-rust-builder.yml b/.github/workflows/ubi-rust-builder.yml index 7f8f580f5..5afef7bba 100644 --- a/.github/workflows/ubi-rust-builder.yml +++ b/.github/workflows/ubi-rust-builder.yml @@ -8,7 +8,6 @@ on: branches: - main paths: - - ubi9-rust-builder/** - ubi10-rust-builder/** - .github/actions/** - .github/workflows/ubi-rust-builder.yml @@ -25,7 +24,7 @@ jobs: fail-fast: false matrix: runner: ["ubuntu-latest", "ubicloud-standard-8-arm-ubuntu-2404"] - ubi-version: ["ubi9"] + ubi-version: ["ubi10"] runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -65,7 +64,7 @@ jobs: strategy: fail-fast: false matrix: - ubi-version: ["ubi9"] + ubi-version: ["ubi10"] runs-on: ubuntu-latest needs: ["build"] steps: diff --git a/.scripts/upload_new_maven_version.sh b/.scripts/upload_new_maven_version.sh index 9b8e21ec3..fbd25d350 100755 --- a/.scripts/upload_new_maven_version.sh +++ b/.scripts/upload_new_maven_version.sh @@ -71,4 +71,4 @@ curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --uploa echo "Successfully uploaded Maven $VERSION to Nexus" echo "https://repo.stackable.tech/service/rest/repository/browse/packages/maven/" -echo "https://github.com/prometheus/maven/releases/tag/$VERSION" +echo "https://github.com/apache/maven/releases/tag/maven-$VERSION" diff --git a/.scripts/upload_new_nvm_version.sh b/.scripts/upload_new_nvm_version.sh new file mode 100755 index 000000000..6eddd22fe --- /dev/null +++ b/.scripts/upload_new_nvm_version.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +set -euo pipefail + +VERSION=${1:?"Missing version number argument (arg 1)"} +NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} + +read -r -s -p "Nexus Password: " NEXUS_PASSWORD +echo + +# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory +# Find the directory name of the script +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# the temp directory used, within $DIR +WORK_DIR=$(mktemp -d -p "$DIR") + +# check if tmp dir was created +if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then + echo "Could not create temp dir" + exit 1 +fi + +# deletes the temp directory +function cleanup { + rm -rf "$WORK_DIR" +} + +# register the cleanup function to be called on the EXIT signal +trap cleanup EXIT + +cd "$WORK_DIR" || exit + +# https://github.com/nvm-sh/nvm/archive/refs/tags/v0.40.3.tar.gz +BASE_URL="https://github.com/nvm-sh/nvm/archive/refs/tags" +ARCHIVE_FILE="v$VERSION.tar.gz" +ARCHIVE_URL="$BASE_URL/$ARCHIVE_FILE" + +echo "Downloading nvm $VERSION" +curl --fail -LO --progress-bar "$ARCHIVE_URL" + +# nvm maintainers don't produce sum files + +echo "Uploading to Nexus" + +curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$ARCHIVE_FILE" 'https://repo.stackable.tech/repository/packages/nvm/' + +echo "Successfully uploaded nvm $VERSION to Nexus" +echo "https://repo.stackable.tech/service/rest/repository/browse/packages/nvm/" +echo "https://github.com/nvm-sh/nvm/releases/tag/v$VERSION" diff --git a/airflow/Dockerfile b/airflow/Dockerfile index f518903fc..235f3bd37 100644 --- a/airflow/Dockerfile +++ b/airflow/Dockerfile @@ -1,33 +1,33 @@ # syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7 +# check=error=true;skip=InvalidDefaultArgInFrom,SecretsUsedInArgOrEnv # Disabled error checks: # - SecretsUsedInArgOrEnv : OPA_AUTH_MANAGER is a false positive and breaks the build. -# check=error=true;skip=InvalidDefaultArgInFrom,SecretsUsedInArgOrEnv ARG GIT_SYNC_VERSION +ARG UV_VERSION # For updated versions check https://github.com/kubernetes/git-sync/releases # which should contain a image location (e.g. registry.k8s.io/git-sync/git-sync:v3.6.8) FROM oci.stackable.tech/sdp/git-sync/git-sync:${GIT_SYNC_VERSION} AS gitsync-image +# TODO (@NickLarsenNZ): Get the image into our registry +FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv-image + FROM local-image/shared/statsd-exporter AS statsd_exporter-builder FROM local-image/vector AS opa-auth-manager-builder ARG OPA_AUTH_MANAGER ARG PYTHON_VERSION -ARG UV_VERSION +ARG STACKABLE_USER_UID COPY airflow/opa-auth-manager/${OPA_AUTH_MANAGER} /tmp/opa-auth-manager WORKDIR /tmp/opa-auth-manager -RUN < 0 {if (!seen[$0]++) print $0}' | tr '\n' ',' | sed 's/,$//') -python${PYTHON_VERSION} -m venv --system-site-packages /stackable/app - +uv venv --python "${PYTHON_VERSION}" --system-site-packages /stackable/app source /stackable/app/bin/activate -# Upgrade pip to the latest version -# Also install uv to get support for build constraints -pip install --no-cache-dir --upgrade pip -pip install --no-cache-dir uv==${UV_VERSION} +# Another project manager uv tool install hatch cd "$(/stackable/patchable --images-repo-root=src checkout airflow ${PRODUCT_VERSION})" @@ -225,6 +221,8 @@ COPY --from=gitsync-image --chown=${STACKABLE_USER_UID}:0 /git-sync ${HOME}/git- COPY airflow/licenses /licenses +COPY --from=uv-image --chown=${STACKABLE_USER_UID}:0 /uv /uvx /bin/ + # Update image and install needed packages RUN <