Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399357 )

Change subject: docker: migrate castor to docker-pkg
......................................................................

docker: migrate castor to docker-pkg

Change-Id: Ib25682859750311bcd0019294f7439ac8c6142ad
---
D dockerfiles/castor/Dockerfile
A dockerfiles/castor/Dockerfile.template
A dockerfiles/castor/changelog
M dockerfiles/castor/example-run.sh
A dockerfiles/castor/jjb
D dockerfiles/castor/prebuild.sh
M jjb/castor-save-workspacecache.bash
M jjb/castor.yaml
8 files changed, 21 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/57/399357/1

diff --git a/dockerfiles/castor/Dockerfile b/dockerfiles/castor/Dockerfile
deleted file mode 100644
index 92aa38c..0000000
--- a/dockerfiles/castor/Dockerfile
+++ /dev/null
@@ -1,12 +0,0 @@
-FROM docker-registry.wikimedia.org/wikimedia-stretch:latest
-
-RUN apt-get update \
-    && DEBIAN_FRONTEND=noninteractive apt-get install --yes \
-        rsync \
-    && rm -rf /var/lib/apt/lists/*
-
-COPY src/ /castor
-COPY run.bash /run.bash
-
-USER nobody
-ENTRYPOINT ["/run.bash"]
diff --git a/dockerfiles/castor/Dockerfile.template 
b/dockerfiles/castor/Dockerfile.template
new file mode 100644
index 0000000..72e243b
--- /dev/null
+++ b/dockerfiles/castor/Dockerfile.template
@@ -0,0 +1,11 @@
+FROM {{ registry }}/wikimedia-stretch
+
+RUN {{ "rsync" | apt_install }} \
+    && mkdir -p /castor
+
+COPY jjb/castor-define-namespace.bash /castor/
+COPY jjb/castor-load-sync.bash /castor/
+COPY run.bash /run.bash
+
+USER nobody
+ENTRYPOINT ["/run.bash"]
diff --git a/dockerfiles/castor/changelog b/dockerfiles/castor/changelog
new file mode 100644
index 0000000..54e7d01
--- /dev/null
+++ b/dockerfiles/castor/changelog
@@ -0,0 +1,5 @@
+castor (0.1.0) wikimedia; urgency=medium
+
+  * Initial port to docker-pkg.
+
+ -- Antoine Musso <[email protected]>  Wed, 20 Dec 2017 09:36:29 +0100
diff --git a/dockerfiles/castor/example-run.sh 
b/dockerfiles/castor/example-run.sh
index 3b5775c..136b794 100755
--- a/dockerfiles/castor/example-run.sh
+++ b/dockerfiles/castor/example-run.sh
@@ -22,5 +22,5 @@
     --env ZUUL_PROJECT=mediawiki/core \
     --env ZUUL_BRANCH=master \
     --env JOB_NAME=dosomething \
-    wmfreleng/castor:latest \
+    docker-registry.wikimedia.org/releng/castor:latest \
     config
diff --git a/dockerfiles/castor/jjb b/dockerfiles/castor/jjb
new file mode 120000
index 0000000..16b3cfb
--- /dev/null
+++ b/dockerfiles/castor/jjb
@@ -0,0 +1 @@
+../../jjb
\ No newline at end of file
diff --git a/dockerfiles/castor/prebuild.sh b/dockerfiles/castor/prebuild.sh
deleted file mode 100755
index aa77e9f..0000000
--- a/dockerfiles/castor/prebuild.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-set -e
-
-# Copy castor shell scripts from the jjb snippets
-rm -fR "$(dirname "$0")"/src
-mkdir -p "$(dirname "$0")"/src
-for castor_script in castor-define-namespace.bash castor-load-sync.bash; do
-    cp -vf "$(dirname "$0")"/../../jjb/"$castor_script" "$(dirname "$0")"/src
-done
diff --git a/jjb/castor-save-workspacecache.bash 
b/jjb/castor-save-workspacecache.bash
index cc94458..2f5e634 100644
--- a/jjb/castor-save-workspacecache.bash
+++ b/jjb/castor-save-workspacecache.bash
@@ -20,7 +20,7 @@
   --archive \
   --compress \
   --rsh="/usr/bin/ssh -a -T -o ConnectTimeout=6 -o 
UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" \
-  --rsync-path="docker run --rm -i --volume ${remote_cache_dir}:${cache_dir} 
--entrypoint=/usr/bin/rsync wmfreleng/castor:v2017.10.30.21.03" \
+  --rsync-path="docker run --rm -i --volume ${remote_cache_dir}:${cache_dir} 
--entrypoint=/usr/bin/rsync docker-registry.wikimedia.org/releng/castor:0.1.0" \
   --delete-delay \
   jenkins-deploy@"${REMOTE_INSTANCE}:${cache_dir}/" "${DEST}"
 
diff --git a/jjb/castor.yaml b/jjb/castor.yaml
index 4fcef75..8fb690f 100644
--- a/jjb/castor.yaml
+++ b/jjb/castor.yaml
@@ -66,7 +66,7 @@
                  exec docker run --rm \
                      --env-file <(/usr/bin/env|egrep -v 
'^(HOME|SHELL|PATH|LOGNAME|MAIL)=') \
                      --volume "$(pwd)"/cache:/cache \
-                          'wmfreleng/castor:v2017.10.30.21.03' clear || :
+                         'docker-registry.wikimedia.org/releng/castor:0.1.0' 
clear || :
                  # nothing else can be executed due to exec
 
 # Entry point to load cache from central cache
@@ -92,7 +92,7 @@
             exec docker run --rm \
                 --env-file <(/usr/bin/env|egrep -v 
'^(HOME|SHELL|PATH|LOGNAME|MAIL)=') \
                 --volume "${WORKSPACE}/cache":/cache \
-                wmfreleng/castor:v2017.10.30.21.03 \
+                docker-registry.wikimedia.org/releng/castor:0.1.0 \
                 load
                 # nothing else can be executed due to exec
 

-- 
To view, visit https://gerrit.wikimedia.org/r/399357
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib25682859750311bcd0019294f7439ac8c6142ad
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

Reply via email to