From d00d86bd616ea0a74b928f5c09ebc819d1a6c88b Mon Sep 17 00:00:00 2001 From: Patrik Dufresne Date: Fri, 2 Mar 2018 08:55:19 -0500 Subject: [PATCH] Add auto-push to github --- Jenkinsfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 277a2de..020cd8b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,6 +2,7 @@ pipeline { environment { NEXUS = credentials("local-nexus") GITLAB = credentials("gitlab-jenkins") + GITHUB = credentials("github") } parameters { booleanParam(defaultValue: false, description: 'Generate a release build with a tagged version.', name: 'Release') @@ -47,5 +48,11 @@ pipeline { addInfoBadge "v${version}" } } + stage('GitHubPush') { + steps { + sh "git push --force https://${GITHUB}@github.com/ikus060/cbc4j.git refs/remotes/origin/${BRANCH_NAME}:refs/heads/${BRANCH_NAME}" + sh "git push https://${GITHUB}@github.com/ikus060/cbc4j.git --tags" + } + } } } -- GitLab