From c7aabd99a9bb24386ebebc3062952cec3262344e Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Fri, 6 Oct 2023 14:27:28 +0200 Subject: [PATCH 1/3] add trigger action --- JenkinsFile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/JenkinsFile b/JenkinsFile index 2e5b2d1..9efb689 100644 --- a/JenkinsFile +++ b/JenkinsFile @@ -42,4 +42,12 @@ pipeline { } } } -} \ No newline at end of file + // post-build actions + post { + success { + echo 'The pipeline worked!' + def pjob = build(job: 'is-registry-service-image', wait: false, propagate: false); + } + + } +} -- 2.17.1 From a9c7b7b4cf8eedfa6f197609c97aae7f81d6c910 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Fri, 6 Oct 2023 14:32:42 +0200 Subject: [PATCH 2/3] add step to post action --- JenkinsFile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/JenkinsFile b/JenkinsFile index 9efb689..c7c1eb8 100644 --- a/JenkinsFile +++ b/JenkinsFile @@ -46,7 +46,11 @@ pipeline { post { success { echo 'The pipeline worked!' - def pjob = build(job: 'is-registry-service-image', wait: false, propagate: false); + steps { + script { + build(job: 'is-registry-service-image', wait: false, propagate: false); + } + } } } -- 2.17.1 From 9e3597f9f193cdb3bf8596c3dbffdc084ac33837 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Fri, 6 Oct 2023 14:40:43 +0200 Subject: [PATCH 3/3] moved trigger build to stage --- JenkinsFile | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/JenkinsFile b/JenkinsFile index c7c1eb8..0ecbade 100644 --- a/JenkinsFile +++ b/JenkinsFile @@ -41,17 +41,12 @@ pipeline { } } - } - // post-build actions - post { - success { - echo 'The pipeline worked!' - steps { - script { - build(job: 'is-registry-service-image', wait: false, propagate: false); - } - } - } - + stage('trigger IS-registry image job') { + steps { + script { + build(job: 'is-registry-service-image', wait: false, propagate: false); + } + } + } } } -- 2.17.1