Skip to content

Commit

Permalink
DO NOT LAND
Browse files Browse the repository at this point in the history
Debugging, committed to make act use it.

Skip-PR-comments: true
Run-GHA: true

Required-githooks: true

Signed-off-by: Brian J. Murrell <[email protected]>
  • Loading branch information
brianjmurrell committed Jul 16, 2024
1 parent 54b6641 commit cf50275
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/rpm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ jobs:
- name: Build RPM Docker image
id: build-rpm-docker-image
continue-on-error: true
run: docker build --file ${{ inputs.PACKAGING_DIR }}/packaging/Dockerfile.mockbuild
run: set -x; cat ${{ inputs.PACKAGING_DIR }}/packaging/Dockerfile.mockbuild;
docker build --file ${{ inputs.PACKAGING_DIR }}/packaging/Dockerfile.mockbuild
--build-arg CACHEBUST=$(date +%s%3N)
--build-arg CB0=$(date +%V)
--build-arg REPO_FILE_URL=$REPO_FILE_URL
Expand All @@ -338,6 +339,7 @@ jobs:
rm -rf mock_result
mkdir -p mock_result
script="echo \"In docker I am \$(id)\"
echo "nameserver 169.254.0.1" > /etc/resolv.conf
if ! rm -rf artifacts/$TARGET/ ||
! mkdir -p artifacts/$TARGET/; then
echo \"Failed to create artifacts/$TARGET/\"
Expand All @@ -349,7 +351,7 @@ jobs:
fi
id
id build
make CHROOT_NAME=\"$CHROOT_NAME\"
make CHROOT_NAME=\"$CHROOT_NAME\" \
DISTRO_VERSION=\"$DISTRO_VERSION\" chrootbuild"
if [ -e ci/rpm/build.sh ]; then
script="ci/rpm/build.sh"
Expand All @@ -361,9 +363,10 @@ jobs:
unique="$RANDOM"
else
unique="${{ github.run_id }}-${{ github.run_attempt }}"
docker_args=(--user build)
fi
docker run --name mock-build-"$unique"-${{ matrix.distro }} \
--user build \
docker run --name mock-build-"$unique"-${{ matrix.distro }} \
"${docker_args[@]}" \
-v "$PWD":"$PWD" -w "$PWD" \
-v "$PWD"/mock_result:/var/lib/mock/$CHROOT_NAME/result \
-v /scratch:/scratch \
Expand Down
8 changes: 5 additions & 3 deletions packaging/Dockerfile.mockbuild
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ ARG UID=1000
# Add build user (to keep rpmbuild happy)
ENV USER build
ENV PASSWD build
RUN useradd -u $UID -ms /bin/bash $USER
RUN echo "$USER:$PASSWD" | chpasswd
# add the user to the mock group so it can run mock
RUN usermod -a -G mock $USER
RUN set -x; if [ $UID != 0 ]; then \
useradd -u $UID -ms /bin/bash $USER; \
echo "$USER:$PASSWD" | chpasswd; \
usermod -a -G mock $USER; \
fi

ARG CB0
RUN dnf -y upgrade && \
Expand Down

0 comments on commit cf50275

Please sign in to comment.