From c8ad3f28529c5c139bea48b17509b9da2ab3cb83 Mon Sep 17 00:00:00 2001 From: Valeriia Date: Fri, 13 Nov 2020 09:09:45 +0200 Subject: [PATCH 1/3] Update Jenkinsfile --- Jenkinsfile | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e3e8fb3b9..c0b02e587 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,9 +4,33 @@ pipeline { stage('Build') { steps { echo 'Running build automation' - sh './gradlew build --no-daemon' + sh '.gradlew build --no-daemon' archiveArtifacts artifacts: 'dist/trainSchedule.zip' } } - } -} \ No newline at end of file + stage('Build Docker Image') { + when { + branch 'master' + } + steps { + script { + app = docker.build("/train-schedule") + app.inside { + sh 'echo $(curl localhost:8080)' + } + } + } + } + stage('Push Docker Image') { + when { + branch 'master' + } + steps { + script { + docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_login') { + app.push("${env.BUILD_NUMBER}") + app.push("latest") + } + } + } + } From 1ca33b564059584a37c64e11adee3989e3e7dd27 Mon Sep 17 00:00:00 2001 From: Valeriia Date: Fri, 13 Nov 2020 11:30:06 +0200 Subject: [PATCH 2/3] Update Jenkinsfile --- Jenkinsfile | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c0b02e587..8b1378917 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,36 +1 @@ -pipeline { - agent any - stages { - stage('Build') { - steps { - echo 'Running build automation' - sh '.gradlew build --no-daemon' - archiveArtifacts artifacts: 'dist/trainSchedule.zip' - } - } - stage('Build Docker Image') { - when { - branch 'master' - } - steps { - script { - app = docker.build("/train-schedule") - app.inside { - sh 'echo $(curl localhost:8080)' - } - } - } - } - stage('Push Docker Image') { - when { - branch 'master' - } - steps { - script { - docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_login') { - app.push("${env.BUILD_NUMBER}") - app.push("latest") - } - } - } - } + From 605b8bfb691b4ba0cb233c47121f60e942a3681a Mon Sep 17 00:00:00 2001 From: Valeriia Date: Fri, 13 Nov 2020 12:32:50 +0200 Subject: [PATCH 3/3] new --- testing | 1 + 1 file changed, 1 insertion(+) create mode 100644 testing diff --git a/testing b/testing new file mode 100644 index 000000000..ce0136250 --- /dev/null +++ b/testing @@ -0,0 +1 @@ +hello