From 84e6eee99b8ac3b5fa16b1bb098a827b098966f0 Mon Sep 17 00:00:00 2001 From: surtexx <91895868+surtexx@users.noreply.github.com> Date: Mon, 13 Nov 2023 17:37:48 +0200 Subject: [PATCH] Delete pipeline_lib.groovy --- pipeline_lib.groovy | 57 --------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 pipeline_lib.groovy diff --git a/pipeline_lib.groovy b/pipeline_lib.groovy deleted file mode 100644 index cf99da6b2..000000000 --- a/pipeline_lib.groovy +++ /dev/null @@ -1,57 +0,0 @@ -def run(){ - if(env.CHANGE_ID != null){ - pipeline{ - agent any - stages { - stage ("build") { - steps { - echo "Running build automation..." - sh './mvnw checkstyle:checkstyle' - sh './mvnw verify' - sh './mvnw clean package -DskipTests=true' - } - } - stage ("Build Docker Image") { - steps { - script{ - app = docker.build("surtexx/mr:${GIT_COMMIT[0..7]}", "-f Dockerfile1 .") - } - } - } - stage ("Push Docker Image") { - steps { - script{ - docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_login') { - app.push("${GIT_COMMIT[0..7]}") - app.push("latest") - } - } - } - } - } - } - } - else if(env.BRANCH_NAME == "main"){ - pipeline{ - agent any - stages{ - stage ("Build Docker Image") { - steps { - script{ - app = docker.build("surtexx/main", "-f Dockerfile1 .") - } - } - } - stage ("Push Docker Image") { - steps { - script{ - docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_login') { - app.push("latest") - } - } - } - } - } - } - } -}