ffs
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Christoph Haas 2026-02-07 22:55:38 +01:00
parent b48bf6cf72
commit 4881226246
2 changed files with 6 additions and 7 deletions

View file

@ -22,4 +22,4 @@ steps:
# tell the Dockerfile about the commit SHA and build date # tell the Dockerfile about the commit SHA and build date
build_args: build_args:
COMMIT_SHA: ${CI_COMMIT_SHA:0:7} COMMIT_SHA: ${CI_COMMIT_SHA:0:7}
BUILD_DATE: ${CI_PIPELINE_CREATED} COMMIT_MESSAGE: ${CI_COMMIT_MESSAGE}

View file

@ -7,8 +7,8 @@
# For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html # For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html
ARG COMMIT_SHA #ARG COMMIT_SHA
ARG BUILD_DATE #ARG BUILD_DATE
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version # Make sure RUBY_VERSION matches the Ruby version in .ruby-version
ARG RUBY_VERSION=3.2.4 ARG RUBY_VERSION=3.2.4
@ -73,7 +73,7 @@ RUN rm -rf node_modules
FROM base FROM base
ARG COMMIT_SHA ARG COMMIT_SHA
ARG BUILD_DATE ARG COMMIT_MESSAGE
# Copy built artifacts: gems, application # Copy built artifacts: gems, application
COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}" COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
@ -81,9 +81,8 @@ COPY --from=build /rails /rails
# Add build information so we can check if the deployment works # Add build information so we can check if the deployment works
RUN echo "Commit SHA: ${COMMIT_SHA}" > /rails/public/versioninfo && \ RUN echo "Commit SHA: ${COMMIT_SHA}" > /rails/public/versioninfo && \
echo "Build Date: ${BUILD_DATE}" >> /rails/public/versioninfo echo "Commit message: ${COMMIT_MESSAGE}" >> /rails/public/versioninfo
RUN echo "versioninfo: SHA is [${COMMIT_SHA}] and DATE is [${BUILD_DATE}]"
RUN echo "XXXDEBUG: SHA is [${COMMIT_SHA}] and DATE is [${BUILD_DATE}]"
# Run and own only the runtime files as a non-root user for security # Run and own only the runtime files as a non-root user for security
RUN groupadd --system --gid 1000 rails && \ RUN groupadd --system --gid 1000 rails && \