From d384f2e7fe06de73dcf40199f74e6a0cc6b848e8 Mon Sep 17 00:00:00 2001 From: BrokenFire Date: Sun, 18 Feb 2018 19:15:37 +0100 Subject: [PATCH] - --- Jenkinsfile | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 92a5357..0535d2b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,35 +4,32 @@ pipeline { stages { def app stage('Clone') { // for display purposes - // Get some code from a GitHub repository - git 'https://github.com/BrokenFire/BrokenDiscordBot.git' + steps{ + // Get some code from a GitHub repository + git 'https://github.com/BrokenFire/BrokenDiscordBot.git' + } + } stage('Build image') { - /* This builds the actual image; synonymous to - * docker build on the command line */ + steps { + /* This builds the actual image; synonymous to + * docker build on the command line */ - app = docker.build("brokenfire/brokendiscordbot","--rm=true .") + app = docker.build("brokenfire/brokendiscordbot","--rm=true .") + } } stage('Push image') { - /* Finally, we'll push the image with two tags: - * First, the incremental build number from Jenkins - * Second, the 'latest' tag. - * Pushing multiple tags is cheap, as all the layers are reused. */ - app.push() + steps { + + /* Finally, we'll push the image with two tags: + * First, the incremental build number from Jenkins + * Second, the 'latest' tag. + * Pushing multiple tags is cheap, as all the layers are reused. */ + app.push("devel") + } } stage('Cleaning'){ sh "docker image prune -f" } } - stage('Push image') { - /* Finally, we'll push the image with two tags: - * First, the incremental build number from Jenkins - * Second, the 'latest' tag. - * Pushing multiple tags is cheap, as all the layers are reused. */ - app.push("devel") - - } - stage('Cleaning'){ - sh "docker image prune -f" - } }