Skip to content

Commit

Permalink
Merge pull request #1025 from Katka92/fix_mount_volume_issue
Browse files Browse the repository at this point in the history
Fix mounted files permissions
  • Loading branch information
openshift-merge-bot[bot] authored Nov 15, 2024
2 parents d1de6b5 + c8cf8ee commit 9522a36
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion integration-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/s
RUN wget "https://github.com/sigstore/cosign/releases/download/v2.0.0/cosign-linux-amd64" && \
mv cosign-linux-amd64 /usr/local/bin/cosign && \
chmod +x /usr/local/bin/cosign

USER node:0

COPY --chown=node:root --chmod=775 . /tmp/e2e
Expand Down
6 changes: 4 additions & 2 deletions integration-tests/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ if [ -d "/e2e" ]; then
cd /e2e
npm i
npx cypress install
chmod -R a+rwx ../e2e
else
cd /tmp/e2e
fi

npx cypress run $args

if [ -d "/e2e/cypress" ]; then
chmod -R a+rwx /e2e/cypress
cp -a /e2e/cypress/* /tmp/artifacts
chmod -R a+rwx /tmp/artifacts
chmod -R a+rwx /e2e/cypress
else
cp -r /tmp/e2e/cypress/* /tmp/artifacts
cp -a /tmp/e2e/cypress/* /tmp/artifacts
fi
24 changes: 11 additions & 13 deletions pr_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ IQE_PLUGINS="hac_dev"
IQE_MARKER_EXPRESSION="smoke"
IQE_FILTER_EXPRESSION=""

# If test dockerfile changes, rebuild the runner image
TEST_IMAGE="quay.io/hacdev/hac-tests:next"
if ! git diff --exit-code --quiet origin/$ghprbTargetBranch HEAD -- integration-tests/Dockerfile; then
echo "Dockerfile changes detected, rebuilding test image"
TEST_IMAGE="hac-dev:pr-${ghprbPullId}"

cd integration-tests
podman build -t "$TEST_IMAGE" . -f Dockerfile
cd ..
fi

# Build and push to quay
set -exv
# source is preferred to | bash -s in this case to avoid a subshell
Expand Down Expand Up @@ -100,18 +111,6 @@ COMMON_SETUP="-v $WORKSPACE/artifacts:/tmp/artifacts:Z,U \
-e CYPRESS_GH_PR_TITLE=${PR_TITLE} \
-e CYPRESS_SSO_URL=${HAC_KC_SSO_URL} \
-e GH_COMMENTBODY=${GH_COMMENTBODY}"
TEST_IMAGE="quay.io/hacdev/hac-tests:next"

# If test dockerfile changes, rebuild the runner image
if ! git diff --exit-code --quiet origin/$ghprbTargetBranch HEAD -- integration-tests/Dockerfile; then
echo "Dockerfile changes detected, rebuilding test image"
TEST_IMAGE="hac-dev:pr-${ghprbPullId}"

cd integration-tests
docker build -t "$TEST_IMAGE" . -f Dockerfile
podman pull docker-daemon:$TEST_IMAGE
cd ..
fi

set +e
TEST_RUN=0
Expand All @@ -130,7 +129,6 @@ podman run --userns=keep-id ${COMMON_SETUP} \

if [[ $TEST_IMAGE =~ "hac-dev:pr" ]]; then
podman rmi -f $TEST_IMAGE
docker rmi -f $TEST_IMAGE
fi

bonfire namespace release -f ${NAMESPACE}
Expand Down

0 comments on commit 9522a36

Please sign in to comment.