Revert "builder-netstandard: attempt to run groupadd and useradd in the stage"
This reverts commit 0c823141199e548a1be57cb0bca195e07afac922. Project: http://git-wip-us.apache.org/repos/asf/logging-log4net/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4net/commit/3140c34f Tree: http://git-wip-us.apache.org/repos/asf/logging-log4net/tree/3140c34f Diff: http://git-wip-us.apache.org/repos/asf/logging-log4net/diff/3140c34f Branch: refs/heads/feature/RollingFileAppender-NG Commit: 3140c34f94ad6ceb88db2d782a2737f2fb72a2ef Parents: 0c82314 Author: Dominik Psenner <dpsen...@apache.org> Authored: Sun Jul 9 18:32:38 2017 +0200 Committer: Dominik Psenner <dpsen...@apache.org> Committed: Sun Jul 9 18:32:38 2017 +0200 ---------------------------------------------------------------------- Jenkinsfile | 5 ----- buildtools/docker/builder-netstandard/Dockerfile | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/3140c34f/Jenkinsfile ---------------------------------------------------------------------- diff --git a/Jenkinsfile b/Jenkinsfile index df47822..df9c3d5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,11 +47,6 @@ pipeline { WORKSPACE = '/var/workspaces/jenkins' } steps { - // create a jenkins user for dotnet to consume - sh 'sudo groupadd -r -g `id -g` jenkins-slave' - sh 'sudo useradd --base-dir /var/workspaces --create-home --shell /bin/bash --uid `id -u` --gid `id -g` --groups `id -g` -p jenkins' - - // checkout checkout scm // compile http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/3140c34f/buildtools/docker/builder-netstandard/Dockerfile ---------------------------------------------------------------------- diff --git a/buildtools/docker/builder-netstandard/Dockerfile b/buildtools/docker/builder-netstandard/Dockerfile index ba0cde9..e00b1f2 100644 --- a/buildtools/docker/builder-netstandard/Dockerfile +++ b/buildtools/docker/builder-netstandard/Dockerfile @@ -5,12 +5,12 @@ FROM microsoft/dotnet MAINTAINER "d...@logging.apache.org" # install dependencies -RUN apt-get update && apt-get install -y nant git sudo +RUN apt-get update && apt-get install -y nant git # add custom workspace that can be written by anyone RUN mkdir -p /var/workspaces && chmod 0777 /var/workspaces -# allow every user to run groupadd and useradd -RUN echo "ALL ALL=NOPASSWD: /usr/sbin/groupadd" >> /etc/sudoers -RUN echo "ALL ALL=NOPASSWD: /usr/sbin/useradd" >> /etc/sudoers +# add jenkins user that maps to the custom workspace +RUN groupadd -r -g 12040 jenkins-slave +RUN useradd --base-dir /var/workspaces --create-home --shell /bin/bash --uid 10025 --gid 12040 --groups 12040 -p -M jenkins