diff --git a/.woodpecker.yml b/.woodpecker.yml index 9102dcc..e6eeb23 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -22,4 +22,4 @@ steps: # tell the Dockerfile about the commit SHA and build date build_args: COMMIT_SHA: ${CI_COMMIT_SHA:0:7} - BUILD_DATE: ${CI_PIPELINE_CREATED} + COMMIT_MESSAGE: ${CI_COMMIT_MESSAGE} diff --git a/Dockerfile b/Dockerfile index 085e12b..3dfaee8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,8 @@ # For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html -ARG COMMIT_SHA -ARG BUILD_DATE +#ARG COMMIT_SHA +#ARG BUILD_DATE # Make sure RUBY_VERSION matches the Ruby version in .ruby-version ARG RUBY_VERSION=3.2.4 @@ -73,7 +73,7 @@ RUN rm -rf node_modules FROM base ARG COMMIT_SHA -ARG BUILD_DATE +ARG COMMIT_MESSAGE # Copy built artifacts: gems, application 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 RUN echo "Commit SHA: ${COMMIT_SHA}" > /rails/public/versioninfo && \ - echo "Build Date: ${BUILD_DATE}" >> /rails/public/versioninfo - -RUN echo "XXXDEBUG: SHA is [${COMMIT_SHA}] and DATE is [${BUILD_DATE}]" + echo "Commit message: ${COMMIT_MESSAGE}" >> /rails/public/versioninfo +RUN echo "versioninfo: SHA is [${COMMIT_SHA}] and DATE is [${BUILD_DATE}]" # Run and own only the runtime files as a non-root user for security RUN groupadd --system --gid 1000 rails && \