Fix Jenkins workspace permission issue
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
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
This commit is contained in:
2 files changed
+7
-1
No files matched your search
Vendored
-1
@@ -3,7 +3,6 @@ pipeline {
|
||||
docker {
|
||||
image 'lifemaps/ci-cpp:latest'
|
||||
reuseNode true
|
||||
args '-u root:root'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user