update Jenkins-und Gemfile
This commit is contained in:
163
Jenkinsfile
vendored
163
Jenkinsfile
vendored
@@ -3,9 +3,24 @@ pipeline {
|
||||
label 'puppet'
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
deleteDir() /* clean up our workspace */
|
||||
}
|
||||
success {
|
||||
updateGitlabCommitStatus state: 'success'
|
||||
echo 'Pipeline finished successfully!'
|
||||
}
|
||||
failure {
|
||||
updateGitlabCommitStatus state: 'failed'
|
||||
echo 'I failed :('
|
||||
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'support@confdroid.com', sendToIndividuals: true])
|
||||
}
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
stage('pulling master before adding files') {
|
||||
stage('pulling master') {
|
||||
steps {
|
||||
sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) {
|
||||
sh '''git config user.name "Jenkins Server"
|
||||
@@ -53,7 +68,7 @@ pipeline {
|
||||
|
||||
stage('compiler warnings') {
|
||||
steps {
|
||||
warnings canComputeNew: false, canResolveRelativePaths: false, consoleParsers: [[parserName: 'Puppet-Lint']], defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', unHealthy: ''
|
||||
scanForIssues tool: puppetLint()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,124 +85,7 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('create changelog') {
|
||||
steps{
|
||||
step([$class: 'GitChangelogRecorder', config: [configFile: 'git-changelog-settings.json', createFileTemplateContent: '''<h1> Git Changelog changelog </h1>
|
||||
|
||||
<p>
|
||||
Changelog of Git Changelog.
|
||||
</p>
|
||||
|
||||
{{#tags}}
|
||||
<h2> {{name}} </h2>
|
||||
{{#issues}}
|
||||
{{#hasIssue}}
|
||||
{{#hasLink}}
|
||||
<h2> {{name}} <a href="{{link}}">{{issue}}</a> {{title}} </h2>
|
||||
{{/hasLink}}
|
||||
{{^hasLink}}
|
||||
<h2> {{name}} {{issue}} {{title}} </h2>
|
||||
{{/hasLink}}
|
||||
{{/hasIssue}}
|
||||
{{^hasIssue}}
|
||||
<h2> {{name}} </h2>
|
||||
{{/hasIssue}}
|
||||
|
||||
{{#commits}}
|
||||
<a href="https://gitlab.confdroid.com/12WW1160/git-changelog-lib/commit/{{hash}}">{{hash}}</a> {{authorName}} <i>{{commitTime}}</i>
|
||||
<p>
|
||||
<h3>{{{messageTitle}}}</h3>
|
||||
|
||||
{{#messageBodyItems}}
|
||||
<li> {{.}}</li>
|
||||
{{/messageBodyItems}}
|
||||
</p>
|
||||
{{/commits}}
|
||||
|
||||
{{/issues}}
|
||||
{{/tags}}
|
||||
''', createFileTemplateFile: '', createFileUseTemplateContent: true, createFileUseTemplateFile: false, customIssues: [[link: '', name: '', pattern: '', title: ''], [link: '', name: '', pattern: '', title: '']], dateFormat: 'YYYY-MM-dd HH:mm:ss', file: 'CHANGELOG.md', fromReference: '', fromType: 'firstCommit', gitHubApi: '', gitHubApiTokenCredentialsId: '', gitHubIssuePattern: '#([0-9]+)', gitHubToken: '', gitLabApiTokenCredentialsId: '', gitLabProjectName: '', gitLabServer: '', gitLabToken: '', ignoreCommitsIfMessageMatches: '^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*', ignoreCommitsWithoutIssue: false, ignoreTagsIfNameMatches: '''__NOTOC__
|
||||
|
||||
= Git Changelog changelog =
|
||||
Changelog of Git Changelog.
|
||||
|
||||
{{#tags}}
|
||||
== {{name}} ==
|
||||
{{#issues}}
|
||||
{{#hasIssue}}
|
||||
{{#hasLink}}
|
||||
=== {{name}} [{{link}} {{issue}}] {{title}} ===
|
||||
{{/hasLink}}
|
||||
{{^hasLink}}
|
||||
=== {{name}} {{issue}} {{title}} ===
|
||||
{{/hasLink}}
|
||||
{{/hasIssue}}
|
||||
{{^hasIssue}}
|
||||
=== {{name}} ===
|
||||
{{/hasIssue}}
|
||||
|
||||
{{#commits}}
|
||||
[https://gitlab.confdroid.com/12WW1160/git-changelog-lib/commit/{{hash}} {{hash}}] {{authorName}} {{commitTime}}
|
||||
|
||||
\'\'\'{{{messageTitle}}}\'\'\'
|
||||
|
||||
{{#messageBodyItems}}
|
||||
* {{.}}
|
||||
{{/messageBodyItems}}
|
||||
|
||||
{{/commits}}
|
||||
|
||||
{{/issues}}
|
||||
{{/tags}}
|
||||
<h1> Git Changelog changelog </h1>
|
||||
|
||||
<p>
|
||||
Changelog of Git Changelog.
|
||||
</p>
|
||||
|
||||
{{#tags}}
|
||||
<h2> {{name}} </h2>
|
||||
{{#issues}}
|
||||
{{#hasIssue}}
|
||||
{{#hasLink}}
|
||||
<h2> {{name}} <a href="{{link}}">{{issue}}</a> {{title}} </h2>
|
||||
{{/hasLink}}
|
||||
{{^hasLink}}
|
||||
<h2> {{name}} {{issue}} {{title}} </h2>
|
||||
{{/hasLink}}
|
||||
{{/hasIssue}}
|
||||
{{^hasIssue}}
|
||||
<h2> {{name}} </h2>
|
||||
{{/hasIssue}}
|
||||
|
||||
|
||||
{{#commits}}
|
||||
<a href="https://gitlab.confdroid.com/12WW1160/git-changelog-lib/commit/{{hash}}">{{hash}}</a> {{authorName}} <i>{{commitTime}}</i>
|
||||
<p>
|
||||
<h3>{{{messageTitle}}}</h3>
|
||||
|
||||
{{#messageBodyItems}}
|
||||
<li> {{.}}</li>
|
||||
{{/messageBodyItems}}
|
||||
</p>
|
||||
|
||||
|
||||
{{/commits}}
|
||||
|
||||
{{/issues}}
|
||||
{{/tags}}
|
||||
''', showSummaryTemplateFile: '', showSummaryUseTemplateContent: false, showSummaryUseTemplateFile: false, subDirectory: '', timeZone: 'UTC', toReference: '', toType: 'master', untaggedName: 'Unreleased', useConfigFile: false, useFile: true, useIgnoreTagsIfNameMatches: false, useJira: false, , useReadableTagName: false, useSubDirectory: false]])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
stage('show diff') {
|
||||
steps {
|
||||
sh 'git diff'
|
||||
}
|
||||
}
|
||||
|
||||
stage('recommit changes to repo') {
|
||||
stage('update repo') {
|
||||
steps {
|
||||
sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) {
|
||||
sh '''git config user.name "Jenkins Server"
|
||||
@@ -198,29 +96,4 @@ Changelog of Git Changelog.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
deleteDir() /* clean up our workspace */
|
||||
}
|
||||
success {
|
||||
echo 'Pipeline finished successfully!'
|
||||
updateGitlabCommitStatus name: 'build', state: 'success'
|
||||
}
|
||||
unstable {
|
||||
echo 'I am unstable :/'
|
||||
}
|
||||
failure {
|
||||
echo 'I failed :('
|
||||
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'support@confdroid.com', sendToIndividuals: true])
|
||||
updateGitlabCommitStatus name: 'build', state: 'failed'
|
||||
}
|
||||
changed {
|
||||
echo 'Things were different before...'
|
||||
mail bcc: '', body: "Pipeline Job '${JOB_NAME}' has changed, please verify.", cc: '', from: '', replyTo: '', subject: "Pipeline Job '${JOB_NAME}' has changed", to: 'support@confdroid.com'
|
||||
}
|
||||
}
|
||||
options {
|
||||
gitLabConnection('Gitlab Confdroid')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user