-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker-Compose based CI + Multiple PHP and DB types (#61)
changed to Docker-Compose based CI with support for different PHP and DB types
- Loading branch information
1 parent
fc3e1ec
commit a0b348c
Showing
8 changed files
with
258 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
coverage | ||
.tmp | ||
coverage | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,42 @@ | ||
ARG MW_VERSION | ||
FROM gesinn/docker-mediawiki-sqlite:${MW_VERSION} | ||
ARG PHP_VERSION | ||
FROM gesinn/mediawiki-ci:${MW_VERSION}-php${PHP_VERSION} | ||
|
||
ARG MW_VERSION | ||
ARG SMW_VERSION | ||
ARG PS_VERSION | ||
ARG AL_VERSION | ||
ARG MAPS_VERSION | ||
ARG SRF_VERSION | ||
RUN sed -i s/80/8080/g /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf && \ | ||
COMPOSER=composer.local.json composer require --no-update mediawiki/semantic-media-wiki ${SMW_VERSION} && \ | ||
curl -L https://github.com/wikimedia/mediawiki-extensions-PageSchemas/archive/refs/tags/${PS_VERSION}.tar.gz \ | ||
| tar zx --strip-components=1 --one-top-level=extensions/PageSchemas && \ | ||
curl -L https://github.com/wikimedia/mediawiki-extensions-AdminLinks/archive/refs/tags/${AL_VERSION}.tar.gz \ | ||
| tar zx --strip-components=1 --one-top-level=extensions/AdminLinks && \ | ||
COMPOSER=composer.local.json composer require --no-update mediawiki/maps ${MAPS_VERSION} && \ | ||
COMPOSER=composer.local.json composer require --no-update mediawiki/semantic-result-formats ${SRF_VERSION} && \ | ||
sudo -u www-data composer update && \ | ||
echo \ | ||
"wfLoadExtension( 'SemanticMediaWiki' );\n" \ | ||
"enableSemantics( 'localhost' );\n" \ | ||
"wfLoadExtension( 'PageSchemas' );\n" \ | ||
"wfLoadExtension( 'AdminLinks' );\n" \ | ||
"wfLoadExtension( 'Maps' );\n" \ | ||
"wfLoadExtension( 'SemanticResultFormats' );\n" \ | ||
>> LocalSettings.php && \ | ||
php maintenance/update.php --skip-external-dependencies --quick | ||
ARG PHP_VERSION | ||
|
||
# get needed dependencies for this extension | ||
RUN sed -i s/80/8080/g /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf | ||
|
||
RUN COMPOSER=composer.local.json composer require --no-update mediawiki/semantic-media-wiki ${SMW_VERSION} | ||
RUN curl -L https://github.com/wikimedia/mediawiki-extensions-PageSchemas/archive/refs/tags/${PS_VERSION}.tar.gz \ | ||
| tar zx --strip-components=1 --one-top-level=extensions/PageSchemas | ||
RUN curl -L https://github.com/wikimedia/mediawiki-extensions-AdminLinks/archive/refs/tags/${AL_VERSION}.tar.gz \ | ||
| tar zx --strip-components=1 --one-top-level=extensions/AdminLinks | ||
RUN COMPOSER=composer.local.json composer require --no-update mediawiki/maps ${MAPS_VERSION} | ||
RUN COMPOSER=composer.local.json composer require --no-update mediawiki/semantic-result-formats ${SRF_VERSION} | ||
RUN composer update | ||
|
||
|
||
ENV EXTENSION=SemanticDrilldown | ||
COPY composer*.json package*.json /var/www/html/extensions/$EXTENSION/ | ||
|
||
RUN cd extensions/$EXTENSION && \ | ||
npm ci && \ | ||
composer update | ||
RUN cd extensions/$EXTENSION && npm ci | ||
RUN cd extensions/$EXTENSION && composer update | ||
|
||
COPY . /var/www/html/extensions/$EXTENSION | ||
|
||
RUN echo \ | ||
"wfLoadExtension( 'SemanticMediaWiki' );\n" \ | ||
"enableSemantics( 'localhost' );\n" \ | ||
"wfLoadExtension( 'PageSchemas' );\n" \ | ||
"wfLoadExtension( 'AdminLinks' );\n" \ | ||
"wfLoadExtension( 'Maps' );\n" \ | ||
"wfLoadExtension( 'SemanticResultFormats' );\n" \ | ||
"wfLoadExtension( '$EXTENSION' );\n" \ | ||
>> LocalSettings.php | ||
>> __setup_extension__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
services: | ||
wiki: | ||
volumes: | ||
- ./coverage:${EXTENSION_FOLDER}/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
services: | ||
wiki: | ||
volumes: | ||
- ./:${EXTENSION_FOLDER} | ||
- ${EXTENSION_FOLDER}/vendor/ | ||
- ${EXTENSION_FOLDER}/node_modules/ | ||
ports: | ||
- 8080:8080 | ||
|
Oops, something went wrong.