You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.8 KiB

  1. ARG VERSION=2.169
  2. FROM jenkins/jenkins:${VERSION}-slim
  3. ARG VERSION
  4. USER root
  5. RUN groupadd -g 1001 docker && usermod -G docker jenkins
  6. ENV DEBIAN_FRONTEND=noninteractive
  7. RUN apt-get update && \
  8. apt-get install -y \
  9. apt-transport-https \
  10. ca-certificates \
  11. curl \
  12. gnupg2 \
  13. sudo \
  14. software-properties-common && \
  15. ( curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - ) && \
  16. add-apt-repository \
  17. "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" && \
  18. apt-get update && \
  19. apt-get install -y docker-ce-cli && \
  20. rm -rf /var/lib/apt/lists/*
  21. COPY systemtests/jenkins/bin/stub-script /usr/local/bin/docker-pusher
  22. COPY systemtests/jenkins/sudoers /etc/sudoers.d/jenkins
  23. USER jenkins
  24. RUN echo $VERSION > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state
  25. RUN echo $VERSION > /usr/share/jenkins/ref/jenkins.install.InstallUtil.lastExecVersion
  26. COPY systemtests/jenkins/plugins.txt /usr/share/jenkins/ref/plugins.txt
  27. RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
  28. COPY systemtests/jenkins/ref/* /usr/share/jenkins/ref/
  29. COPY systemtests/jenkins/init.groovy.d/*.groovy /usr/share/jenkins/ref/init.groovy.d/
  30. USER root
  31. RUN git config --global user.name docker && \
  32. git config --global user.email docker@docker.invalid
  33. COPY systemtests/repo1 /var/lib/git/repo1
  34. RUN cd /var/lib/git/repo1 && \
  35. git init . && \
  36. git add --all && \
  37. git commit -m repo1
  38. COPY . /var/lib/git/pipelinelib
  39. RUN cd /var/lib/git/pipelinelib && \
  40. git checkout -b test-in-docker-$VERSION && \
  41. test -z "$(git status -s)" || ( \
  42. git add --all && \
  43. git commit -m wip \
  44. ) && \
  45. git checkout master && \
  46. git merge -s octopus test-in-docker-$VERSION
  47. USER jenkins