Skip to content

Commit

Permalink
Jenkins release job fix
Browse files Browse the repository at this point in the history
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 <radek.felcman@oracle.com>
  • Loading branch information
rfelcman authored and lukasj committed Aug 11, 2021
1 parent 89afd74 commit c0f808e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions etc/jenkins/release.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,13 @@ spec:
// Build and release EclipseLink by release.sh script
stage('Build and release EclipseLink') {
steps {
container('el-build') {
git branch: GIT_BRANCH_RELEASE, credentialsId: SSH_CREDENTIALS_ID, url: GIT_REPOSITORY_URL
sh """
etc/jenkins/release.sh "${RELEASE_VERSION}" "${NEXT_VERSION}" "${DRY_RUN}" "${OVERWRITE_GIT}" "${OVERWRITE_STAGING}"
"""
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 "${RELEASE_VERSION}" "${NEXT_VERSION}" "${DRY_RUN}" "${OVERWRITE_GIT}" "${OVERWRITE_STAGING}"
"""
}
}
}
}
Expand Down

0 comments on commit c0f808e

Please sign in to comment.