Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for RHEL8 nodes #181

Merged
merged 2 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ COPY controllers/ controllers/
# Build
RUN CGO_ENABLED=0 GOOS=linux go build -o manager main.go

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9-1161
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1018
WORKDIR /
COPY licenses/ licenses/
COPY --from=builder /workspace/manager .
Expand Down
13 changes: 8 additions & 5 deletions build/pr_check_inner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

set -exv

cd "$HOME"

# copy the workspace from the Jenkins job off the ro volume into this container
mkdir -p /container_workspace
cp -r /workspace/. /container_workspace
cd /container_workspace
mkdir container_workspace
cd container_workspace

cp -r /workspace/. .

mkdir -p /container_workspace/bin
cp /root/go/* /container_workspace/bin
mkdir bin
cp /root/go/* bin/

mkdir -p artifacts

Expand Down
1 change: 0 additions & 1 deletion build/template_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

set -exv


python3 -m venv "build/.build_venv"
source build/.build_venv/bin/activate
pip install pyyaml
Expand Down
6 changes: 3 additions & 3 deletions pr_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ set -exv

mkdir -p "$PWD/.docker"

ghprbPullId=${ghprbPullId:-0001}
CONTAINER_NAME="${FEO_CONTAINER_NAME:-frontend-operator-pr-check-$ghprbPullId}"
docker rm -f $CONTAINER_NAME
docker rm -f $CONTAINER_NAME-run


# We're mounting the jenkins workspace over the root of the container
# This means that the pr_check_inner.sh script will be run in the context of the jenkins workspace
# This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time
Expand All @@ -17,13 +17,13 @@ docker rm -f $CONTAINER_NAME-run
docker buildx build --platform linux/amd64 -t $CONTAINER_NAME -f build/Dockerfile.pr .
docker buildx build --load -t $CONTAINER_NAME -f build/Dockerfile.pr .

docker run -i --name $CONTAINER_NAME-run -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh
docker run -i --name $CONTAINER_NAME-run -v $PWD:/workspace:Z $CONTAINER_NAME /workspace/build/pr_check_inner.sh

TEST_RESULT=$?

mkdir -p artifacts

docker cp $CONTAINER_NAME-run:/container_workspace/artifacts/ $PWD
docker cp $CONTAINER_NAME-run:container_workspace/artifacts/ $PWD

docker rm -f $CONTAINER_NAME
docker rm -f $CONTAINER_NAME-run
Expand Down
Loading