automate weekly publication
diff --git a/weekly.sh b/weekly.sh
new file mode 100755
index 0000000..2533777
--- /dev/null
+++ b/weekly.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+JENKINS_VERSION=`curl -q https://api.github.com/repos/jenkinsci/jenkins/tags | grep '"name":' | grep -o '1\.[0-9][0-9][0-9]'  | uniq | sort | tail -1`
+echo $JENKINS_VERSION
+
+JENKINS_SHA=`curl http://repo.jenkins-ci.org/simple/releases/org/jenkins-ci/main/jenkins-war/${JENKINS_VERSION}/jenkins-war-${JENKINS_VERSION}.war.sha1`
+echo $JENKINS_SHA
+
+sed -e "s/ENV JENKINS_VERSION .*/ENV JENKINS_VERSION $JENKINS_VERSION/g" -e "s/ENV JENKINS_SHA .*/ENV JENKINS_SHA $JENKINS_SHA/g" Dockerfile > Dockerfile.$JENKINS_VERSION
+
+docker build -f Dockerfile.$JENKINS_VERSION -t jenkinsci/jenkins:$JENKINS_VERSION .
+docker push jenkinsci/jenkins:$JENKINS_VERSION
+
+docker build -f Dockerfile.$JENKINS_VERSION -t jenkinsci/jenkins:latest .
+docker push jenkinsci/jenkins:latest
+
+