From b7bcc9146bb25892f0fe9832f79c51bb50fe79b9 Mon Sep 17 00:00:00 2001 From: Radek Felcman Date: Wed, 11 Aug 2021 11:39:19 +0200 Subject: [PATCH] Jenkins release job fix This is fix for "git push" call, which failed with "git@github.com: Permission denied (publickey)." error message. It's related with some Eclipse-CI infrastructure security settings. "release.sh" script must be called within "el-build" container and this container is wrapped by "sshagent([SSH_CREDENTIALS_ID]) {". Opposite nesting "sshagent([SSH_CREDENTIALS_ID]) {" inside "container('el-build') {" instruction leads into error. Signed-off-by: Radek Felcman --- etc/jenkins/release.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/jenkins/release.groovy b/etc/jenkins/release.groovy index 86fe424..c621212 100644 --- a/etc/jenkins/release.groovy +++ b/etc/jenkins/release.groovy @@ -138,9 +138,9 @@ spec: // Perform release stage('Build and release Oracle DDL Parser') { steps { - container('el-build') { - git branch: GIT_BRANCH_RELEASE, credentialsId: SSH_CREDENTIALS_ID, url: GIT_REPOSITORY_URL - sshagent([SSH_CREDENTIALS_ID]) { + git branch: GIT_BRANCH_RELEASE, credentialsId: SSH_CREDENTIALS_ID, url: GIT_REPOSITORY_URL + sshagent([SSH_CREDENTIALS_ID]) { + container('el-build') { sh ''' etc/jenkins/release.sh "${DDLPARSER_VERSION}" "${NEXT_DDLPARSER_VERSION}" "${DRY_RUN}" "${OVERWRITE}" '''