Skip to content

Commit a6b9fc6

Browse files
authored
Fix: Fix submodules directory in fetcher not in composer
1 parent 2def585 commit a6b9fc6

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

Dockerfile

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ARG REL_BRANCH=REL1_43
1111
FROM ubuntu:xenial AS fetcher
1212

1313
RUN apt-get update && \
14-
apt-get install --yes --no-install-recommends git=1:2.* ssh unzip=6.* jq=1.* curl=7.* ca-certificates=201* && \
14+
apt-get install --yes --no-install-recommends git=1:2.* ssh unzip=6.* jq=1.* curl=7.* ca-certificates=201* patch && \
1515
apt-get install --reinstall ca-certificates && \
1616
apt-get clean && rm -rf /var/lib/apt/lists/*
1717

@@ -20,7 +20,6 @@ ARG WMF_BRANCH
2020
ARG REL_BRANCH
2121

2222
# clone extensions from github, using specific branch
23-
2423
COPY clone-extension.sh .
2524

2625
RUN \
@@ -78,6 +77,18 @@ bash clone-extension.sh WikiEditor ${WMF_BRANCH};\
7877
bash clone-extension.sh YouTube ${REL_BRANCH};\
7978
echo 'finished cloning'
8079

80+
##Patch Wikibase
81+
# cf. https://github.com/wmde/wikibase-release-pipeline/pull/753/files
82+
# WORKAROUND for https://phabricator.wikimedia.org/T372458
83+
# Take wikibase submodules from github as phabricator rate limits us
84+
COPY --chown=nobody:nogroup --chmod=755 \
85+
wikibase-submodules-from-github-instead-of-phabricator.patch \
86+
/tmp/wikibase-submodules-from-github-instead-of-phabricator.patch
87+
RUN patch -d Wikibase -Np1 </tmp/wikibase-submodules-from-github-instead-of-phabricator.patch && \
88+
rm /tmp/wikibase-submodules-from-github-instead-of-phabricator.patch && \
89+
git clone --depth=1 --recurse-submodules https://github.com/wikimedia/mediawiki-extensions-wikibase.git --single-branch -b ${WMF_BRANCH} ${EXTENSION}
90+
91+
8192
# clone extensions not officially distributed by mediawiki
8293
RUN git clone --depth=1 https://github.com/ProfessionalWiki/WikibaseLocalMedia.git WikibaseLocalMedia &&\
8394
rm -rf WikibaseLocalMedia/.git
@@ -212,7 +223,6 @@ RUN apt-get update && \
212223
DEBIAN_FRONTEND=noninteractive \
213224
apt-get install --yes --no-install-recommends \
214225
zlib1g-dev libjpeg-dev libpng-dev libfreetype6-dev libzip-dev zip && \
215-
patch && \
216226
apt-get clean && \
217227
rm -rf /var/lib/apt/lists/*
218228

@@ -226,15 +236,6 @@ RUN rm -rf /var/www/html/*
226236
COPY --from=collector /var/www/html /var/www/html
227237
WORKDIR /var/www/html/
228238
COPY composer.local.json /var/www/html/composer.local.json
229-
230-
# cf. https://github.com/wmde/wikibase-release-pipeline/pull/753/files
231-
# WORKAROUND for https://phabricator.wikimedia.org/T372458
232-
# Take wikibase submodules from github as phabricator rate limits us
233-
COPY --chown=nobody:nogroup --chmod=755 \
234-
wikibase-submodules-from-github-instead-of-phabricator.patch \
235-
/tmp/wikibase-submodules-from-github-instead-of-phabricator.patch
236-
RUN patch -d /var/www/html/extensions/Wikibase -Np1 </tmp/wikibase-submodules-from-github-instead-of-phabricator.patch && \
237-
rm /tmp/wikibase-submodules-from-github-instead-of-phabricator.patch
238239

239240
COPY --from=composer /usr/bin/composer /usr/bin/composer
240241
ENV COMPOSER_ALLOW_SUPERUSER=1

0 commit comments

Comments
 (0)