From 1f4c6f1fa7f068cf9e618b357cc56cb676cf22a6 Mon Sep 17 00:00:00 2001 From: Julien Blin Date: Wed, 29 Oct 2025 15:28:02 -0400 Subject: [PATCH 1/2] Fix REST-VOL location Current place triggers a segfault (!). --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd6a344..adf0b44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ RUN git clone https://github.com/HDFGroup/vol-rest /tmp/hdf5-vol-rest && \ cd /tmp/hdf5-vol-rest && \ git checkout "${HDF5_VOL_REST_COMMIT}" && \ rm -rf .git && \ - cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DHDF5_VOL_REST_ENABLE_EXAMPLES=OFF -DYAJL_USE_STATIC_LIBRARIES=ON -DCURL_USE_STATIC_LIBRARIES=ON -DCMAKE_INSTALL_PREFIX=/usr/local -B./build && \ + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DHDF5_VOL_REST_ENABLE_EXAMPLES=OFF -DYAJL_USE_STATIC_LIBRARIES=ON -DCURL_USE_STATIC_LIBRARIES=ON -DCMAKE_INSTALL_PREFIX=/usr/local/vol-rest -B./build && \ cmake --build ./build --config Release && \ cmake --install ./build @@ -69,6 +69,7 @@ RUN useradd -m kothar RUN mkdir -p /opt/runtimes && chown kothar /opt/runtimes RUN mkdir -p /opt/agents && chown kothar /opt/agents COPY --chown=kothar --from=build_local_libs /usr/local/lib /usr/local/lib +COPY --chown=kothar --from=build_local_libs /usr/local/vol-rest/lib /usr/local/vol-rest/lib COPY --chown=kothar entrypoint.sh /bin/entrypoint RUN chmod +x /bin/entrypoint @@ -80,7 +81,7 @@ LABEL org.opencontainers.image.source="https://github.com/KotharComputing/agent" USER kothar ENV KOTHAR_AGENT_DOCKER_IMAGE_VERSION=${KOTHAR_AGENT_DOCKER_IMAGE_VERSION} -ENV HDF5_PLUGIN_PATH=/usr/local/lib +ENV HDF5_PLUGIN_PATH=/usr/local/vol-rest/lib ENV HDF5_VOL_CONNECTOR=REST # Initialize cosign for offline signature validation From fe76a17ca6c4dbc59820eeefbbef447b90eb179d Mon Sep 17 00:00:00 2001 From: Julien Blin Date: Wed, 29 Oct 2025 15:40:00 -0400 Subject: [PATCH 2/2] Update release process to require GitHub release and fix KOTHAR_AGENT_DOCKER_IMAGE_VERSION value --- .github/workflows/build-and-publish.yml | 40 ++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 9fadff9..142467b 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -8,6 +8,14 @@ on: - Dockerfile - entrypoint.sh - .github/workflows/** + pull_request: + paths: + - Dockerfile + - entrypoint.sh + - .github/workflows/** + release: + types: + - published workflow_dispatch: permissions: @@ -34,7 +42,28 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Determine build metadata + id: build_meta + run: | + set -eo pipefail + push="false" + tag="" + version="${GITHUB_SHA:0:7}" + if [ "$EVENT_NAME" = "release" ] && [ "$RELEASE_ACTION" = "published" ] && [ -n "$RELEASE_TAG_NAME" ]; then + push="true" + tag="$RELEASE_TAG_NAME" + version="${tag#v}" + fi + echo "push=$push" >> "$GITHUB_OUTPUT" + echo "tag=$tag" >> "$GITHUB_OUTPUT" + echo "version=$version" >> "$GITHUB_OUTPUT" + env: + EVENT_NAME: ${{ github.event_name }} + RELEASE_ACTION: ${{ github.event.action }} + RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} + - name: Log in to the container registry + if: ${{ steps.build_meta.outputs.push == 'true' }} uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -47,8 +76,9 @@ jobs: with: images: ${{ env.IMAGE_NAME }} tags: | - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} - type=sha + type=raw,value=${{ steps.build_meta.outputs.version }},enable=${{ steps.build_meta.outputs.push == 'true' }} + type=raw,value=latest,enable=${{ steps.build_meta.outputs.push == 'true' }} + type=sha,format=short,enable=${{ steps.build_meta.outputs.push != 'true' }} labels: | org.opencontainers.image.description=${{ env.IMAGE_DESCRIPTION }} org.opencontainers.image.source=https://github.com/${{ github.repository }} @@ -60,19 +90,21 @@ jobs: uses: docker/build-push-action@v5 with: context: . - push: true + push: ${{ steps.build_meta.outputs.push == 'true' }} platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | - KOTHAR_AGENT_DOCKER_IMAGE_VERSION=${{ steps.meta.outputs.short-sha }} + KOTHAR_AGENT_DOCKER_IMAGE_VERSION=${{ steps.build_meta.outputs.version }} OCI_IMAGE_DESCRIPTION=${{ env.IMAGE_DESCRIPTION }} provenance: mode=min - name: Install Cosign + if: ${{ steps.build_meta.outputs.push == 'true' }} uses: sigstore/cosign-installer@v3 - name: Sign container image with Cosign + if: ${{ steps.build_meta.outputs.push == 'true' }} env: COSIGN_YES: "true" COSIGN_EXPERIMENTAL: "true"