Repository: logging-log4net Updated Branches: refs/heads/feature/cd-pipeline 759203833 -> cdc4866b7
Jenkinsfile: set up builder-netstandard to have a user named jenkins Project: http://git-wip-us.apache.org/repos/asf/logging-log4net/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4net/commit/cdc4866b Tree: http://git-wip-us.apache.org/repos/asf/logging-log4net/tree/cdc4866b Diff: http://git-wip-us.apache.org/repos/asf/logging-log4net/diff/cdc4866b Branch: refs/heads/feature/cd-pipeline Commit: cdc4866b769439d24de175ae7806be71d138b18e Parents: 7592038 Author: Dominik Psenner <[email protected]> Authored: Sat Jul 8 18:52:58 2017 +0200 Committer: Dominik Psenner <[email protected]> Committed: Sat Jul 8 18:52:58 2017 +0200 ---------------------------------------------------------------------- Jenkinsfile | 9 +-------- buildtools/docker/builder-netstandard/Dockerfile | 10 +++++----- buildtools/docker/builder-netstandard/entrypoint.sh | 9 +++------ 3 files changed, 9 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/cdc4866b/Jenkinsfile ---------------------------------------------------------------------- diff --git a/Jenkinsfile b/Jenkinsfile index b538fd2..bc74a99 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -161,18 +161,11 @@ pipeline { agent { dockerfile { dir 'buildtools/docker/builder-netstandard' + args '-a USER=jenkins' reuseNode true } } steps { - // TODO FIXME - sh 'useradd --home-dir `pwd` --shell /bin/bash --uid `id -u` --gid `id -g` --groups `id -g` -p -M jenkins' - sh 'echo user=$USER' - sh 'echo pwd=$PWD' - sh 'echo home=$HOME' - sh 'echo `whoami`' - sh 'echo id=`id`' - sh 'echo pwd=`pwd`' sh 'cat /etc/passwd' // checkout scm http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/cdc4866b/buildtools/docker/builder-netstandard/Dockerfile ---------------------------------------------------------------------- diff --git a/buildtools/docker/builder-netstandard/Dockerfile b/buildtools/docker/builder-netstandard/Dockerfile index afe284f..a10b0c4 100644 --- a/buildtools/docker/builder-netstandard/Dockerfile +++ b/buildtools/docker/builder-netstandard/Dockerfile @@ -9,16 +9,16 @@ RUN apt-get update && apt-get install -y nant git # install gosu # entrypoint.sh requires this tool -RUN apt-get update && apt-get -y --no-install-recommends install \ - ca-certificates \ - curl +#RUN apt-get update && apt-get -y --no-install-recommends install \ +# ca-certificates \ +# curl #RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture)" \ # && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture).asc" \ # && gpg --verify /usr/local/bin/gosu.asc \ # && rm /usr/local/bin/gosu.asc \ # && chmod +x /usr/local/bin/gosu -RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture)" \ - && chmod +x /usr/local/bin/gosu +#RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture)" \ +# && chmod +x /usr/local/bin/gosu # set up an entry point for the image that allows customization # before anything else is run on the container http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/cdc4866b/buildtools/docker/builder-netstandard/entrypoint.sh ---------------------------------------------------------------------- diff --git a/buildtools/docker/builder-netstandard/entrypoint.sh b/buildtools/docker/builder-netstandard/entrypoint.sh index 8710ab5..e81af3a 100755 --- a/buildtools/docker/builder-netstandard/entrypoint.sh +++ b/buildtools/docker/builder-netstandard/entrypoint.sh @@ -1,8 +1,5 @@ #!/bin/bash -USER_ID=${UID:-9001} +echo "Setting up user '$USER' that maps to uid $(id -u)" -echo "Setting up user 'user' that maps to uid $USER_ID" -useradd --shell /bin/bash -u $USER_ID -o -c "" -m user -export HOME=/home/user - -exec /usr/local/bin/gosu user "$@" +export HOME=`pwd` +useradd --home-dir "$HOME" --shell /bin/bash --uid `id -u` --gid `id -g` --groups `id -g` -p -M "$USER"
