Hashar has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/399754 )
Change subject: docker: convert ci-src-setup to docker-pkg ...................................................................... docker: convert ci-src-setup to docker-pkg Change-Id: I010d7a1b11f63c2727564960e51bd3a2788e8edd --- D dockerfiles/ci-src-setup/Dockerfile A dockerfiles/ci-src-setup/Dockerfile.template A dockerfiles/ci-src-setup/changelog A dockerfiles/ci-src-setup/control M jjb/macro-docker.yaml M jjb/mediawiki.yaml 6 files changed, 52 insertions(+), 78 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/54/399754/1 diff --git a/dockerfiles/ci-src-setup/Dockerfile b/dockerfiles/ci-src-setup/Dockerfile deleted file mode 100644 index ac7d716..0000000 --- a/dockerfiles/ci-src-setup/Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -FROM wmfreleng/ci-jessie:latest as clone-integration-jenkins - -COPY .cache-buster-integration-jenkins /.cache-buster-integration-jenkins - -RUN git clone --depth 1 https://gerrit.wikimedia.org/r/p/integration/jenkins.git /srv/jenkins && \ - rm -rf /srv/jenkins/.git - - -FROM wmfreleng/composer:latest as composer - - -FROM wmfreleng/ci-jessie - -# wmfreleng/php -COPY sury-php.gpg /etc/apt/trusted.gpg.d/php.gpg - -RUN apt-get update && \ - apt-get install --yes \ - # Required by sury per https://packages.sury.org/php/README.txt - apt-transport-https lsb-release && \ - echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list && \ - # Only update the source we have added to save time - apt-get update -o Dir::Etc::sourcelist="sources.list.d/php.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" && \ - apt-get install --yes \ - php7.0-cli && \ - apt-get remove --yes \ - apt-transport-https lsb-release && \ - apt-get autoremove --yes && apt-get clean && rm -rf /var/lib/apt/lists/* && \ - rm /etc/apt/sources.list.d/php.list - -# wmfreleng/php-mediawiki -RUN apt-get update && \ - apt-get install --yes \ - # Required by sury per https://packages.sury.org/php/README.txt - apt-transport-https lsb-release && \ - echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list && \ - # Only update the source we have added to save time - apt-get update -o Dir::Etc::sourcelist="sources.list.d/php.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" && \ - apt-get install --yes \ - # Needed for composer to install things from dist - php7.0-zip \ - # Needed for mediawiki - php-ast php7.0-mbstring php7.0-xml && \ - apt-get remove --yes --purge \ - apt-transport-https lsb-release && \ - apt-get autoremove --yes && apt-get clean && rm -rf /var/lib/apt/lists/* && \ - rm /etc/apt/sources.list.d/php.list - -# TODO python image? -# TODO is python2 and 3 needed for the slave scripts? -RUN apt-get update && \ - apt-get install --yes \ - python python3 && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - -# zuul-cloner -RUN apt-get update && \ - apt-get install --yes \ - zuul \ - # pin python-pbr https://phabricator.wikimedia.org/T153877 - python-pbr=0.8.2-1 && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - -COPY --from=clone-integration-jenkins /srv/jenkins/bin /srv/slave-scripts -COPY --from=clone-integration-jenkins /srv/jenkins/etc/zuul-clonemap.yaml /srv/zuul-clonemap.yaml -COPY --from=composer /srv/composer /srv/composer - -COPY setup-mw.sh /srv/setup-mw.sh -COPY setup-mwext.sh /srv/setup-mwext.sh - -RUN mkdir -p /srv/deployment/integration/slave-scripts/etc && \ - ln -s /srv/slave-scripts /srv/deployment/integration/slave-scripts/bin && \ - ln -s /srv/zuul-clonemap.yaml /srv/deployment/integration/slave-scripts/etc/zuul-clonemap.yaml && \ - ln -s /srv/composer/vendor/bin/composer /usr/local/bin/composer - -USER nobody diff --git a/dockerfiles/ci-src-setup/Dockerfile.template b/dockerfiles/ci-src-setup/Dockerfile.template new file mode 100644 index 0000000..9076478 --- /dev/null +++ b/dockerfiles/ci-src-setup/Dockerfile.template @@ -0,0 +1,44 @@ +FROM {{ "ci-jessie" | image_tag }} as clone-integration-jenkins + +RUN git clone --depth 1 https://gerrit.wikimedia.org/r/p/integration/jenkins.git /srv/jenkins && \ + rm -rf /srv/jenkins/.git + +FROM wmfreleng/composer:latest as composer + +FROM {{ "ci-jessie" | image_tag }} + +# releng/php +COPY sury-php.gpg /etc/apt/trusted.gpg.d/php.gpg +# Sury uses https and requires lsb per https://packages.sury.org/php/README.txt +RUN {{ "apt-transport-https" | apt_install }} + +# Install php7 from Sury +# +RUN echo "deb https://packages.sury.org/php/ jessie main" > /etc/apt/sources.list.d/php.list \ + # php7.0-zip needed by composer to install things from dist + # others php packages are needed by mediawiki/libraries + && {{ "php7.0-cli php7.0-zip php-ast php7.0-mbstring php7.0-xml" | apt_install }} \ + && apt-get purge --yes apt-transport-https \ + && rm /etc/apt/sources.list.d/php.list + +# TODO python image? +# TODO is python2 and 3 needed for the slave scripts? +RUN {{ "python python3" | apt_install }} + +# zuul-cloner +# pin python-pbr https://phabricator.wikimedia.org/T153877 +RUN {{ "zuul python-pbr=0.8.2-1" | apt_install }} + +COPY --from=clone-integration-jenkins /srv/jenkins/bin /srv/slave-scripts +COPY --from=clone-integration-jenkins /srv/jenkins/etc/zuul-clonemap.yaml /srv/zuul-clonemap.yaml +COPY --from=composer /srv/composer /srv/composer + +COPY setup-mw.sh /srv/setup-mw.sh +COPY setup-mwext.sh /srv/setup-mwext.sh + +RUN mkdir -p /srv/deployment/integration/slave-scripts/etc && \ + ln -s /srv/slave-scripts /srv/deployment/integration/slave-scripts/bin && \ + ln -s /srv/zuul-clonemap.yaml /srv/deployment/integration/slave-scripts/etc/zuul-clonemap.yaml && \ + ln -s /srv/composer/vendor/bin/composer /usr/local/bin/composer + +USER nobody diff --git a/dockerfiles/ci-src-setup/changelog b/dockerfiles/ci-src-setup/changelog new file mode 100644 index 0000000..e56261e --- /dev/null +++ b/dockerfiles/ci-src-setup/changelog @@ -0,0 +1,5 @@ +ci-src-setup (0.1.0) wikimedia; urgency=medium + + * Initial port to docker-pkg + + -- Antoine Musso <[email protected]> Thu, 21 Dec 2017 22:46:23 +0100 diff --git a/dockerfiles/ci-src-setup/control b/dockerfiles/ci-src-setup/control new file mode 100644 index 0000000..8c6d9e3 --- /dev/null +++ b/dockerfiles/ci-src-setup/control @@ -0,0 +1 @@ +Depends: ci-jessie diff --git a/jjb/macro-docker.yaml b/jjb/macro-docker.yaml index 009c6fa..f6247ac 100644 --- a/jjb/macro-docker.yaml +++ b/jjb/macro-docker.yaml @@ -103,7 +103,7 @@ --volume "$(pwd)"/cache:/cache \ --volume /srv/git:/srv/git \ --entrypoint "bash" \ - wmfreleng/ci-src-setup:v2017.11.21.12.57 \ + wmfreleng/ci-src-setup:0.1.0 \ /srv/setup-mwext.sh # nothing else can be executed due to exec diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml index 36f1ef5..46028f6 100644 --- a/jjb/mediawiki.yaml +++ b/jjb/mediawiki.yaml @@ -436,7 +436,7 @@ --volume "$(pwd)"/cache:/cache \ --volume /srv/git:/srv/git \ --entrypoint "bash" \ - wmfreleng/ci-src-setup:v2017.11.21.12.57 \ + wmfreleng/ci-src-setup:0.1.0 \ /srv/setup-mw.sh # nothing else can be executed due to exec - shell: | -- To view, visit https://gerrit.wikimedia.org/r/399754 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I010d7a1b11f63c2727564960e51bd3a2788e8edd Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
