From 175a1fc1fc24b3df758d820d2ba8f5eb03ccf4e4 Mon Sep 17 00:00:00 2001 From: peusterm Date: Tue, 19 Sep 2017 11:39:53 +0200 Subject: [PATCH] Jenkins: Push to public Docker registry Signed-off-by: peusterm --- Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8ac8efe..0f6d50a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,19 +12,22 @@ pipeline { stage('Build') { steps { echo 'Building...' - sh "docker build -t test-son-emu-img ." + sh "docker build -t sonatanfv/son-emu:dev ." } } stage('Test') { steps { echo 'Testing...' - sh "docker run --name son-emu --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock test-son-emu-img 'py.test -v src/emuvim/test/unittests'" + sh "docker run --name son-emu --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock sonatanfv/son-emu:dev 'py.test -v src/emuvim/test/unittests'" } } stage('Package') { steps { echo 'Packaging (Docker-image)...' - sh "docker tag test-son-emu-img:latest registry.sonata-nfv.eu:5000/son-emu:latest" + // push to public Docker registry + sh "docker push sonatanfv/son-emu:dev" + // 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" } } -- 2.25.1