Fix Jenkins workspace permission issue
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit

- Add jenkins user to Dockerfile.ci and run as non-root
- Remove '-u root:root' args from Jenkinsfile Docker agent
- Build files will now be owned by jenkins user, allowing proper cleanup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: f545f3d8aa33
Signed-off-by: twi-devel <torsten.wierschin@life-maps.com>
This commit is contained in:
torstenandCopilot committed 2026-10-22 18:42:44 +02:00
1 parent a89ac10175
commit 27dbe998b1
2 files changed
+7 -1

No files matched your search

Vendored
-1
View File
@@ -3,7 +3,6 @@ pipeline {
docker {
image 'lifemaps/ci-cpp:latest'
reuseNode true
args '-u root:root'
}
}
+7
View File
@@ -2,6 +2,10 @@ FROM ubuntu:26.04
ENV DEBIAN_FRONTEND=noninteractive
# Create jenkins user with same UID as host jenkins (typically 1000)
RUN groupadd -g 1000 jenkins && \
useradd -u 1000 -g 1000 -m -s /bin/bash jenkins
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3 \
@@ -30,3 +34,6 @@ ENV QT_QPA_PLATFORM=offscreen
RUN git config --global --add safe.directory "*"
WORKDIR /workspace
# Switch to non-root user
USER jenkins