From c821b63a5a636f8449d372bcc9e30e7d1e4cbbb1 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Thu, 19 Oct 2023 16:01:12 +0200 Subject: [PATCH 1/2] add calls to portainer webhook --- JenkinsFile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/JenkinsFile b/JenkinsFile index 868a400..bd491ca 100644 --- a/JenkinsFile +++ b/JenkinsFile @@ -41,4 +41,18 @@ pipeline { } } } -} \ No newline at end of file + post { + always { + script { + withCredentials([string(credentialsId: 'is-registry-devnext-hook', variable: 'REGISTRY_DEVNEXT')]) { + sh "curl -v $REGISTRY_DEVNEXT" + } + } + script { + withCredentials([string(credentialsId: 'is-registry-devsec-hook', variable: 'REGISTRY_DEVSEC')]) { + sh "curl -v $REGISTRY_DEVSEC" + } + } + } + } +} From 2a0ad17388a7c0708d2245a3e21b8d0165e916d1 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Thu, 19 Oct 2023 16:14:13 +0200 Subject: [PATCH 2/2] fix curl call --- JenkinsFile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/JenkinsFile b/JenkinsFile index bd491ca..ecbe24a 100644 --- a/JenkinsFile +++ b/JenkinsFile @@ -45,12 +45,12 @@ pipeline { always { script { withCredentials([string(credentialsId: 'is-registry-devnext-hook', variable: 'REGISTRY_DEVNEXT')]) { - sh "curl -v $REGISTRY_DEVNEXT" + sh "curl -v -X POST $REGISTRY_DEVNEXT" } } script { withCredentials([string(credentialsId: 'is-registry-devsec-hook', variable: 'REGISTRY_DEVSEC')]) { - sh "curl -v $REGISTRY_DEVSEC" + sh "curl -v -X POST $REGISTRY_DEVSEC" } } }