Skip to content

Commit

Permalink
Merge pull request #181 from Victoremepunto/fix-dockerfile
Browse files Browse the repository at this point in the history
fix for RHEL8 nodes
  • Loading branch information
adamrdrew authored Jul 15, 2024
2 parents 4f29a77 + 7f45c08 commit 323a919
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
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

0 comments on commit 323a919

Please sign in to comment.