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"
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}")
}
}
}
### 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