From b832e3786496c65d9ba505706864f78067911d7a Mon Sep 17 00:00:00 2001 From: spara Date: Mon, 30 Jul 2018 11:23:50 -0500 Subject: [PATCH] added Jenkinsfile --- Jenkinsfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..387fdf2 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,31 @@ +node { + def resultImage + def voteImage + def workerImage + docker.withRegistry("https://index.docker.io/v1/", "dockersamples" ) { + stage('Clone repo') { + checkout scm + } + stage('Build result') { + resultImage = docker.build("dockersamples/result", "./result") + } + stage('Build vote') { + voteImage = docker.build("dockersamples/vote", "./vote") + } + stage('Build worker dotnet') { + workerImage = docker.build("dockersamples/worker", "./worker") + } + stage('Push result image') { + resultImage.push("${env.BUILD_NUMBER}") + resultImage.push() + } + stage('Push vote image') { + voteImage.push("${env.BUILD_NUMBER}") + voteImage.push() + } + stage('Push worker image') { + workerImage.push("${env.BUILD_NUMBER}") + workerImage.push() + } + } +}