From a62a99f0d38ff8defa9990e99ef4d811c02e7f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=BChnel?= Date: Thu, 16 Jan 2020 14:19:47 +0000 Subject: [PATCH] added pip to windows image --- .../Dockerfile | 106 +++++++++--------- containers/agent-windows-jenkins/Dockerfile | 3 + 2 files changed, 56 insertions(+), 53 deletions(-) diff --git a/containers/agent-debian-testing-clang8-ssd/Dockerfile b/containers/agent-debian-testing-clang8-ssd/Dockerfile index 2fb06b5..4baab8d 100644 --- a/containers/agent-debian-testing-clang8-ssd/Dockerfile +++ b/containers/agent-debian-testing-clang8-ssd/Dockerfile @@ -1,53 +1,53 @@ -FROM debian:testing - -RUN apt-get update ;\ - apt-get install -y --no-install-recommends locales \ - cmake ninja-build git ca-certificates clang lld ccache python3 build-essential \ - clang-tidy clang-format \ - python3-psutil arcanist zip wget \ - openjdk-11-jdk \ - python3-pip python3-setuptools \ - swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq; \ - apt-get clean - -# Make python3 default (needed by git-clang-format and others). -RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python -# required for openssh server -RUN mkdir -p /run/sshd - -ARG user=jenkins -ARG group=jenkins -ARG uid=1000 -ARG gid=1000 -ARG AGENT_WORKDIR=/home/${user}/agent - -RUN mkdir -p /scripts - -# install the swarm client -RUN cd /scripts ;\ - wget https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/swarm-client/3.17/swarm-client-3.17.jar ;\ - mv swarm-client-3.17.jar swarm-client.jar - -COPY start_agent.sh report_results.sh /scripts/ - -# for the phabtalk script -RUN pip3 install -r https://raw.githubusercontent.com/google/llvm-premerge-checks/master/scripts/phabtalk/requirements.txt - -RUN groupadd -g ${gid} ${group} ;\ - useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} ;\ - mkdir /home/${user}/ccache - -RUN chown -R ${user}:${user} /home/${user} - -WORKDIR /home/${user} -ENV CCACHE_PATH=/mnt/disks/ssd0/ccache - -# configure locale -RUN sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\ - locale-gen -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - -CMD ["/scripts/start_agent.sh"] - +FROM debian:testing + +RUN apt-get update ;\ + apt-get install -y --no-install-recommends locales \ + cmake ninja-build git ca-certificates clang lld ccache python3 build-essential \ + clang-tidy clang-format \ + python3-psutil arcanist zip wget \ + openjdk-11-jdk \ + python3-pip python3-setuptools \ + swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq; \ + apt-get clean + +# Make python3 default (needed by git-clang-format and others). +RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python +# required for openssh server +RUN mkdir -p /run/sshd + +ARG user=jenkins +ARG group=jenkins +ARG uid=1000 +ARG gid=1000 +ARG AGENT_WORKDIR=/home/${user}/agent + +RUN mkdir -p /scripts + +# install the swarm client +RUN cd /scripts ;\ + wget https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/swarm-client/3.17/swarm-client-3.17.jar ;\ + mv swarm-client-3.17.jar swarm-client.jar + +COPY start_agent.sh report_results.sh /scripts/ + +# install python dependencies for the scripts +RUN pip3 install -r https://raw.githubusercontent.com/google/llvm-premerge-checks/master/scripts/phabtalk/requirements.txt + +RUN groupadd -g ${gid} ${group} ;\ + useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} ;\ + mkdir /home/${user}/ccache + +RUN chown -R ${user}:${user} /home/${user} + +WORKDIR /home/${user} +ENV CCACHE_PATH=/mnt/disks/ssd0/ccache + +# configure locale +RUN sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\ + locale-gen +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +CMD ["/scripts/start_agent.sh"] + diff --git a/containers/agent-windows-jenkins/Dockerfile b/containers/agent-windows-jenkins/Dockerfile index f1aff8b..0edba2f 100644 --- a/containers/agent-windows-jenkins/Dockerfile +++ b/containers/agent-windows-jenkins/Dockerfile @@ -17,6 +17,9 @@ RUN powershell -NoProfile -InputFormat None -Command ` RUN pip install gsutil VOLUME C:\credentials +# install python dependencies for the scripts +RUN pip install -r https://raw.githubusercontent.com/google/llvm-premerge-checks/master/scripts/phabtalk/requirements.txt + # temporary directory, can be mounted on host if required VOLUME C:\Temp