From ac4c4f383f3a40c47cd179f160a35ab629553e46 Mon Sep 17 00:00:00 2001 From: Rithin-QB Date: Wed, 22 May 2024 15:20:13 +0530 Subject: [PATCH] add Dockerpush --- jenkins-shared-lib/vars/pushDockerImage.groovy | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 jenkins-shared-lib/vars/pushDockerImage.groovy diff --git a/jenkins-shared-lib/vars/pushDockerImage.groovy b/jenkins-shared-lib/vars/pushDockerImage.groovy new file mode 100644 index 0000000..0cf0683 --- /dev/null +++ b/jenkins-shared-lib/vars/pushDockerImage.groovy @@ -0,0 +1,4 @@ +def call(String imageName, String imageTag, String dockerRepoUrl) { + sh "docker tag ${imageName}:${imageTag} ${dockerRepoUrl}:${imageTag}" + sh "docker push ${dockerRepoUrl}:${imageTag}" +} \ No newline at end of file