jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/403921 )
Change subject: Migrate npm stretch containers to docker-pkg
......................................................................
Migrate npm stretch containers to docker-pkg
Update npm-browser-test
Update:
analytics-wikistats2-npm-browser-node-6-docker
chromium-render-npm-browser-node-6-docker
mwgate-npm-browser-node-6-docker
oojs-core-npm-browser-node-6-docker
unicodejs-npm-browser-node-6-docker
visualeditor-npm-browser-node-6-docker
wikibase-data-values-value-view-npm-browser-node-6-docker
wikibase-javascript-api-npm-browser-node-6-docker
wikidata-query-gui-npm-browser-node-6-docker
wikimedia-portals-deploy-npm-browser-node-6-docker
wikimedia-portals-npm-browser-node-6-docker
Bug: T177276
Change-Id: Idf1fd6fe37bbe6c4a9e2e4fafe141626ba1ad30c
---
A dockerfiles/npm-browser-test/.gitignore
R dockerfiles/npm-browser-test/Dockerfile.template
A dockerfiles/npm-browser-test/changelog
A dockerfiles/npm-browser-test/control
M dockerfiles/npm-browser-test/example-run.sh
R dockerfiles/npm-stretch/Dockerfile.template
A dockerfiles/npm-stretch/changelog
A dockerfiles/npm-stretch/control
A dockerfiles/npm-test-stretch/.gitignore
R dockerfiles/npm-test-stretch/Dockerfile.template
A dockerfiles/npm-test-stretch/changelog
A dockerfiles/npm-test-stretch/control
M dockerfiles/npm-test-stretch/example-run.sh
M jjb/job-templates.yaml
14 files changed, 44 insertions(+), 37 deletions(-)
Approvals:
Hashar: Looks good to me, approved
jenkins-bot: Verified
diff --git a/dockerfiles/npm-browser-test/.gitignore
b/dockerfiles/npm-browser-test/.gitignore
new file mode 100644
index 0000000..139ce78
--- /dev/null
+++ b/dockerfiles/npm-browser-test/.gitignore
@@ -0,0 +1,3 @@
+/cache
+/log
+/src
diff --git a/dockerfiles/npm-browser-test/Dockerfile
b/dockerfiles/npm-browser-test/Dockerfile.template
similarity index 68%
rename from dockerfiles/npm-browser-test/Dockerfile
rename to dockerfiles/npm-browser-test/Dockerfile.template
index f89be23..7fce0a2 100644
--- a/dockerfiles/npm-browser-test/Dockerfile
+++ b/dockerfiles/npm-browser-test/Dockerfile.template
@@ -1,15 +1,7 @@
-FROM wmfreleng/npm-test-stretch:latest
+FROM {{ "npm-test-stretch" | image_tag }}
USER root
-RUN apt-get update && \
- apt-get install --yes \
- chromium \
- chromium-driver \
- firefox-esr \
- phantomjs \
- xvfb \
- && \
- apt-get clean && rm -rf /var/lib/apt/lists/*
+RUN {{ "chromium chromium-driver firefox-esr phantomjs xvfb" | apt_install }}
COPY firefox /usr/local/bin/firefox
diff --git a/dockerfiles/npm-browser-test/changelog
b/dockerfiles/npm-browser-test/changelog
new file mode 100644
index 0000000..2d458fb
--- /dev/null
+++ b/dockerfiles/npm-browser-test/changelog
@@ -0,0 +1,5 @@
+npm-browser-test (0.1.0) wikimedia; urgency=medium
+
+ * Initial port to docker-pkg.
+
+ -- Antoine Musso <[email protected]> Fri, 12 Jan 2018 14:06:40 +0100
diff --git a/dockerfiles/npm-browser-test/control
b/dockerfiles/npm-browser-test/control
new file mode 100644
index 0000000..3118ffa
--- /dev/null
+++ b/dockerfiles/npm-browser-test/control
@@ -0,0 +1 @@
+Depends: npm-test-stretch
diff --git a/dockerfiles/npm-browser-test/example-run.sh
b/dockerfiles/npm-browser-test/example-run.sh
index 756863e..eb8c0eb 100644
--- a/dockerfiles/npm-browser-test/example-run.sh
+++ b/dockerfiles/npm-browser-test/example-run.sh
@@ -2,14 +2,13 @@
set -euo pipefail
-mkdir -m 777 -p log
-mkdir -m 777 -p src
-mkdir -m 777 -p cache
+mkdir -m 777 -p cache log src
+(
cd src
git init
git fetch --quiet --depth 1
https://gerrit.wikimedia.org/r/data-values/value-view
git checkout FETCH_HEAD
-cd ..
+)
docker run \
--rm --tty \
@@ -17,5 +16,4 @@
--volume /"$(pwd)"/cache://cache \
--volume /"$(pwd)"/log://log \
--volume /"$(pwd)"/src://src \
- wmfreleng/npm-browser-test:latest
-rm -rf log
+ docker-registry.wikimedia.org/releng/npm-browser-test:latest
diff --git a/dockerfiles/npm-stretch/Dockerfile
b/dockerfiles/npm-stretch/Dockerfile.template
similarity index 67%
rename from dockerfiles/npm-stretch/Dockerfile
rename to dockerfiles/npm-stretch/Dockerfile.template
index 755227f..d1d9d83 100644
--- a/dockerfiles/npm-stretch/Dockerfile
+++ b/dockerfiles/npm-stretch/Dockerfile.template
@@ -1,7 +1,7 @@
# Debian stretch lacks npm, so we get our [email protected] from our Jessie based image
-FROM wmfreleng/npm:latest as npm-jessie
+FROM {{ "npm" | image_tag }} as npm-jessie
-FROM wmfreleng/ci-stretch:latest
+FROM {{ "ci-stretch" | image_tag }}
COPY --from=npm-jessie /usr/local/lib/node_modules/npm/
/usr/local/lib/node_modules/npm/
# Manually link since COPY copies symlink destination instead of the actual
symlink
RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
@@ -11,13 +11,9 @@
# build-essential for compilation
# python-minimal for node-gyp
# ruby/etc for jsduck
-RUN apt-get update && \
- apt-get install --yes \
- nodejs-legacy \
- python-minimal \
- ruby ruby-dev rubygems-integration build-essential && \
- gem install --no-rdoc --no-ri jsduck && \
- apt-get clean && rm -rf /var/lib/apt/lists/*
+RUN {{ "nodejs-legacy python-minimal ruby ruby-dev rubygems-integration
build-essential" | apt_install }}
+
+RUN gem install --no-rdoc --no-ri jsduck
# If no volume is mounted, make sure /cache exists
RUN install --directory /cache --owner nobody
diff --git a/dockerfiles/npm-stretch/changelog
b/dockerfiles/npm-stretch/changelog
new file mode 100644
index 0000000..51db851
--- /dev/null
+++ b/dockerfiles/npm-stretch/changelog
@@ -0,0 +1,5 @@
+npm-stretch (0.1.0) wikimedia; urgency=medium
+
+ * Initial port to docker-pkg.
+
+ -- Antoine Musso <[email protected]> Fri, 12 Jan 2018 14:06:40 +0100
diff --git a/dockerfiles/npm-stretch/control b/dockerfiles/npm-stretch/control
new file mode 100644
index 0000000..3ceafe0
--- /dev/null
+++ b/dockerfiles/npm-stretch/control
@@ -0,0 +1 @@
+Depends: npm, ci-stretch
diff --git a/dockerfiles/npm-test-stretch/.gitignore
b/dockerfiles/npm-test-stretch/.gitignore
new file mode 100644
index 0000000..139ce78
--- /dev/null
+++ b/dockerfiles/npm-test-stretch/.gitignore
@@ -0,0 +1,3 @@
+/cache
+/log
+/src
diff --git a/dockerfiles/npm-test-stretch/Dockerfile
b/dockerfiles/npm-test-stretch/Dockerfile.template
similarity index 62%
rename from dockerfiles/npm-test-stretch/Dockerfile
rename to dockerfiles/npm-test-stretch/Dockerfile.template
index 9ac859a..2170995 100644
--- a/dockerfiles/npm-test-stretch/Dockerfile
+++ b/dockerfiles/npm-test-stretch/Dockerfile.template
@@ -1,8 +1,7 @@
# Inheritance! Make sure npm-test-stretch is in sync with npm-test.
+FROM {{ "npm-test" | image_tag }} as npm-test
-FROM wmfreleng/npm-test:latest as npm-test
-
-FROM wmfreleng/npm-stretch:latest
+FROM {{ "npm-stretch" | image_tag }}
USER nobody
COPY --from=npm-test /run.sh /run.sh
diff --git a/dockerfiles/npm-test-stretch/changelog
b/dockerfiles/npm-test-stretch/changelog
new file mode 100644
index 0000000..e180b2e
--- /dev/null
+++ b/dockerfiles/npm-test-stretch/changelog
@@ -0,0 +1,5 @@
+npm-test-stretch (0.1.0) wikimedia; urgency=medium
+
+ * Initial port to docker-pkg.
+
+ -- Antoine Musso <[email protected]> Fri, 12 Jan 2018 14:06:40 +0100
diff --git a/dockerfiles/npm-test-stretch/control
b/dockerfiles/npm-test-stretch/control
new file mode 100644
index 0000000..2957a4b
--- /dev/null
+++ b/dockerfiles/npm-test-stretch/control
@@ -0,0 +1 @@
+Depends: npm-test, npm-stretch
diff --git a/dockerfiles/npm-test-stretch/example-run.sh
b/dockerfiles/npm-test-stretch/example-run.sh
index 098e0f9..5f40a08 100644
--- a/dockerfiles/npm-test-stretch/example-run.sh
+++ b/dockerfiles/npm-test-stretch/example-run.sh
@@ -1,20 +1,18 @@
#!/bin/bash
-mkdir -m 777 -p log
-mkdir -m 777 -p src
-mkdir -m 777 -p cache
+set -euo pipefail
+
+mkdir -m 777 -p cache log src
+(
cd src
git init
git fetch --quiet --depth 1
"https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue"
"refs/changes/01/387501/1"
git checkout FETCH_HEAD
-cd ..
+)
docker run \
--rm --tty \
--volume /"$(pwd)"/log://var/lib/jenkins/log \
--volume /"$(pwd)"/cache://cache \
--volume /"$(pwd)"/src://src \
- wmfreleng/npm-test-stretch:latest
-rm -rf src
-rm -rf log
-rm -rf cache
+ docker-registry.wikimedia.org/releng/npm-test-stretch:latest
diff --git a/jjb/job-templates.yaml b/jjb/job-templates.yaml
index 21548ec..af58338 100644
--- a/jjb/job-templates.yaml
+++ b/jjb/job-templates.yaml
@@ -229,7 +229,7 @@
- job-template:
!!merge : *job_npm-node-6-docker
name: '{name}-npm-browser-node-6-docker'
- docker_image_var: 'wmfreleng/npm-browser-test:v2017.12.18.12.55'
+ docker_image_var:
'docker-registry.wikimedia.org/releng/npm-browser-test:v0.1.0'
# Reinject Zuul parameters since JJB strip for some reason
triggers:
- zuul
--
To view, visit https://gerrit.wikimedia.org/r/403921
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idf1fd6fe37bbe6c4a9e2e4fafe141626ba1ad30c
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits