Skip to content

Commit

Permalink
Fix to test the new milestone offset
Browse files Browse the repository at this point in the history
  • Loading branch information
mars committed Aug 23, 2024
1 parent f6c43a1 commit af5bf8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ FROM --platform=linux/amd64 heroku/heroku:${STACK_VERSION}-build as build
ARG STACK_VERSION
ENV STACK="heroku-${STACK_VERSION}"

ARG GOOGLE_CHROME_MILESTONE_OFFSET

# On Heroku-24 and later the default user is not root.
# Once support for Heroku-22 and older is removed, the `useradd` steps below can be removed.
USER root
Expand All @@ -15,6 +17,9 @@ USER non-root-user
RUN mkdir -p /tmp/build /tmp/cache /tmp/env
COPY --chown=non-root-user . /buildpack

# Emulate the platform providing app config vars via env directory
RUN if [ -n "${GOOGLE_CHROME_MILESTONE_OFFSET}" ]; then echo "${GOOGLE_CHROME_MILESTONE_OFFSET}" > /tmp/env/GOOGLE_CHROME_MILESTONE_OFFSET; fi

# Sanitize the environment seen by the buildpack, to prevent reliance on
# environment variables that won't be present when it's run by Heroku CI.
RUN env -i PATH=$PATH HOME=$HOME STACK=$STACK /buildpack/bin/detect /tmp/build
Expand Down
2 changes: 1 addition & 1 deletion bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ docker run --rm heroku-buildpack-chrome-for-testing bash -l -c 'du --human-reada


# Verify that the milestone offset builds too
docker build --progress=plain --build-arg="STACK_VERSION=${STACK_VERSION}" --build-arg="GOOGLE_CHROME_MILESTONE_OFFSET=-4" -t heroku-buildpack-chrome-for-testing .
docker build --progress=plain --build-arg="STACK_VERSION=${STACK_VERSION}" --build-arg="GOOGLE_CHROME_MILESTONE_OFFSET=-4" -t heroku-buildpack-chrome-for-testing --no-cache .

# Check the profile.d scripts correctly added the binaries to PATH.
docker run --rm heroku-buildpack-chrome-for-testing bash -l -c 'chrome --version'
Expand Down

0 comments on commit af5bf8c

Please sign in to comment.