-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
198 additions
and
116 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,22 +8,50 @@ pipeline { | |
environment { | ||
GPG_SECRET = credentials('gpg_password') | ||
GITHUB = credentials('Github-Username-Pw') | ||
GITHUB_RELEASE_TOKEN = credentials('github_registry_release') | ||
GIT_ASKPASS='./.git-askpass' | ||
} | ||
stages { | ||
stage ('Set Git Information') { | ||
steps { | ||
sh 'git config user.email "[email protected]"' | ||
sh 'git config user.name "Simon Taddiken"' | ||
stage ('Ensure dev branch') { | ||
when { | ||
expression { | ||
return env.BRANCH_NAME != 'dev'; | ||
} | ||
} | ||
steps { | ||
error("Releasing is only possible from dev branch") | ||
} | ||
} | ||
stage ('Set Git Information') { | ||
steps { | ||
sh 'echo \'echo \$GITHUB_PSW\' > ./.git-askpass' | ||
sh 'chmod +x ./.git-askpass' | ||
sh 'git config url."https://[email protected]/".insteadOf "https://github.com/"' | ||
sh 'git config url."https://[email protected]/".insteadOf "ssh://[email protected]/"' | ||
sh 'git config url."https://[email protected]/".insteadOf "[email protected]:"' | ||
sh 'git config user.email "[email protected]"' | ||
sh 'git config user.name "Jenkins"' | ||
} | ||
} | ||
stage('Create release branch') { | ||
steps { | ||
sh 'mvn -B -Prelease gitflow:release-start' | ||
} | ||
} | ||
stage('Verify release') { | ||
steps { | ||
sh 'mvn -B -Prelease -Dgpg.passphrase=${GPG_SECRET} verify' | ||
} | ||
} | ||
stage('Prepare') { | ||
stage('Perform release') { | ||
steps { | ||
sh 'mvn -B release:prepare -Dpassword=${GITHUB_PSW} -Dusername=${GITHUB_USR}' | ||
sh "mvn -B gitflow:release-finish -DargLine=\"-Prelease -B -Dgpg.passphrase=${GPG_SECRET} -DskipTests\"" | ||
} | ||
} | ||
stage('Perform') { | ||
stage('Create GitHub release') { | ||
steps { | ||
sh 'mvn -B release:perform -Darguments="-Dgpg.passphrase=${GPG_SECRET} -Dpassword=${GITHUB_PSW} -Dusername=${GITHUB_USR}"' | ||
sh 'git checkout master' | ||
sh "mvn -B github-release:github-release -Dgithub.release-token=${GITHUB_RELEASE_TOKEN}" | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* #5: System locale might lead to illegal identifiers during lower/upper casing (Thx [@portlek](https://github.com/portlek)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.