From b12383b97a879acfb9a580de96a1710bf8f0ca29 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Thu, 1 Mar 2018 13:10:44 +0100 Subject: [PATCH] Jenkins test --- Jenkinsfile | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f55c6e4..dfc4a2c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,18 +1,16 @@ node { def app stage('Clone') { // for display purposes - // Get some code from a GitHub repository - echo env.BRANCH_NAME + // Get some code from a GitHub repository + echo env.BRANCH_NAME script { - if (env.BRANCH_NAME == 'master') { - git url: 'https://github.com/BrokenFire/BrokenDiscordBot.git', branch: 'master' - } else { - git url: 'https://github.com/BrokenFire/BrokenDiscordBot.git', branch: 'devel' - } + if (env.BRANCH_NAME == 'master') { + git url: 'https://github.com/BrokenFire/BrokenDiscordBot.git', branch: 'master' + } else { + git url: 'https://github.com/BrokenFire/BrokenDiscordBot.git', branch: 'devel' + } } - git url: 'https://github.com/BrokenFire/BrokenDiscordBot.git', branch: 'env.BRANCH_NAME' - } stage('Gradle Buil'){ build job: 'Bot Discord Gradle', wait: true @@ -29,7 +27,7 @@ node { * Second, the 'latest' tag. * Pushing multiple tags is cheap, as all the layers are reused. */ script { - if (${env.BRANCH} == 'master') { + if (env.BRANCH_NAME == 'master') { app.push() } else { app.push("devel")