Jenkins: Push to public Docker registry, :latest and :dev, updated readme
authorpeusterm <manuel.peuster@uni-paderborn.de>
Tue, 19 Sep 2017 10:09:31 +0000 (12:09 +0200)
committerpeusterm <manuel.peuster@uni-paderborn.de>
Tue, 19 Sep 2017 10:09:31 +0000 (12:09 +0200)
Signed-off-by: peusterm <manuel.peuster@uni-paderborn.de>
Jenkinsfile
README.md

index 0f6d50a..5e85992 100644 (file)
@@ -26,6 +26,9 @@ pipeline {
                 echo 'Packaging (Docker-image)...'
                 // push to public Docker registry
                 sh "docker push sonatanfv/son-emu:dev"
+                // might be moved to another job (:dev and :latest are the same for now)
+                sh "docker tag sonatanfv/son-emu:dev sonatanfv/son-emu:latest"
+                sh "docker push sonatanfv/son-emu:latest"
                 // push to internal Docker registry
                 sh "docker tag sonatanfv/son-emu:dev registry.sonata-nfv.eu:5000/son-emu:latest"
                 sh "docker push registry.sonata-nfv.eu:5000/son-emu"        
@@ -36,14 +39,14 @@ pipeline {
          success {
                  mail(from: "jenkins@sonata-nfv.eu", 
                  to: "manuel.peuster@upb.de", 
-                 subject: "SUCCESS: son-emu-pipeline",
-                 body: "Job ${env.BUILD_ID} on ${env.JENKINS_URL}")
+                 subject: "SUCCESS: ${env.JOB_NAME}/${env.BUILD_ID} building ${env.BRANCH_NAME}",
+                 body: "${env.JENKINS_URL}")
          }
          failure {
                   mail(from: "jenkins@sonata-nfv.eu", 
                  to: "manuel.peuster@upb.de", 
-                 subject: "FAILURE: son-emu-pipeline",
-                 body: "Job ${env.BUILD_ID} on ${env.JENKINS_URL}")
+                 subject: "FAILURE: ${env.JOB_NAME}/${env.BUILD_ID} building ${env.BRANCH_NAME}",
+                 body: "${env.JENKINS_URL}")
          }
     }
 }
index 9fe159e..f82a010 100755 (executable)
--- a/README.md
+++ b/README.md
@@ -120,10 +120,14 @@ Follow the MOTD in the VM to run the example topology and the dummy-gatekeeper.
 ### Option 3: Nested Docker Deployment
 This option requires a Docker installation on the host machine on which the emulator should be deployed.
 
-* `git clone https://github.com/sonata-nfv/son-emu.git`
-* `cd ~/son-emu`
-* Build the container: `docker build -t son-emu-img .`
-* Run the (interactive) container: `docker run --name son-emu -it --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock son-emu-img /bin/bash`
+* **Option a)** Build container manually:
+    * `git clone https://github.com/sonata-nfv/son-emu.git`
+    * `cd ~/son-emu`
+    * Build the container: `docker build -t son-emu-img .`
+    * Run the (interactive) container: `docker run --name son-emu -it --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock son-emu-img /bin/bash`
+* **Option b)** Use latest pre-build container from [DockerHub](https://hub.docker.com/r/sonatanfv/son-emu/)
+    * Pull the container: `docker pull sonatanfv/son-emu:dev`
+    * Run the (interactive) container: `docker run --name son-emu -it --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock sonatanfv/son-emu:dev /bin/bash`
 
 
 ## Usage