110 lines
3.9 KiB
Groovy
110 lines
3.9 KiB
Groovy
<<<<<<< HEAD
|
|
<<<<<<< HEAD
|
|
<<<<<<< HEAD
|
|
<<<<<<< HEAD
|
|
<<<<<<< HEAD
|
|
=======
|
|
>>>>>>> Change Gradle build
|
|
=======
|
|
>>>>>>> add integration of Jenkins and Nexus
|
|
=======
|
|
>>>>>>> Imported documentation from repository scriptorium
|
|
properties([
|
|
gitLabConnection('IBTP'),
|
|
])
|
|
|
|
<<<<<<< HEAD
|
|
node {
|
|
stage("Checkout") {
|
|
checkout scm
|
|
<<<<<<< HEAD
|
|
=======
|
|
=======
|
|
// Build and test project generations with documentation
|
|
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '5', artifactNumToKeepStr: '5', daysToKeepStr: '5', numToKeepStr: '5'))])
|
|
=======
|
|
>>>>>>> Change Gradle build
|
|
node {
|
|
stage("Checkout") {
|
|
checkout scm
|
|
<<<<<<< HEAD
|
|
>>>>>>> Import sources
|
|
withCredentials([usernamePassword(credentialsId: '201ea374-bda3-4a38-a18a-ccc9c39fb3ff', passwordVariable: 'ORG_GRADLE_PROJECT_nexusPassword', usernameVariable: 'ORG_GRADLE_PROJECT_nexusUsername')]) {
|
|
=======
|
|
}
|
|
gitlabBuilds(builds: ["build", "publish"]) {
|
|
stage("Build") {
|
|
gitlabCommitStatus("build") {
|
|
>>>>>>> Change Gradle build
|
|
sh "chmod +x gradlew"
|
|
sh "./gradlew clean build"
|
|
}
|
|
}
|
|
stage("Publish Build Results") {
|
|
gitlabCommitStatus("publish") {
|
|
archiveArtifacts allowEmptyArchive: true, artifacts: "build/asciidoc/pdf/*.pdf"
|
|
scanForIssues sourceCodeEncoding: 'UTF-8', tool: taskScanner(highTags: 'FIXME', ignoreCase: true, includePattern: 'src/**/*.adoc', normalTags: 'TODO')
|
|
}
|
|
}
|
|
<<<<<<< HEAD
|
|
>>>>>>> Replaced Slack notificatino with Telegram notification
|
|
}
|
|
gitlabBuilds(builds: ["build", "publish"]) {
|
|
stage("Build") {
|
|
gitlabCommitStatus("build") {
|
|
sh "chmod +x gradlew"
|
|
sh "./gradlew build"
|
|
}
|
|
}
|
|
stage("Publish Build Results") {
|
|
gitlabCommitStatus("publish") {
|
|
archiveArtifacts allowEmptyArchive: true, artifacts: "build/asciidoc/pdf/*.pdf"
|
|
scanForIssues sourceCodeEncoding: 'UTF-8', tool: taskScanner(highTags: 'FIXME', ignoreCase: true, includePattern: 'src/**/*.adoc', normalTags: 'TODO')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
=======
|
|
gradleBuild {}
|
|
>>>>>>> add integration of Jenkins and Nexus
|
|
<<<<<<< HEAD
|
|
<<<<<<< HEAD
|
|
=======
|
|
}
|
|
}
|
|
>>>>>>> Import sources
|
|
=======
|
|
>>>>>>> add integration of Jenkins and Nexus
|
|
=======
|
|
=======
|
|
// Build and test project generations with documentation
|
|
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '5', artifactNumToKeepStr: '5', daysToKeepStr: '5', numToKeepStr: '5'))])
|
|
node {
|
|
stage("Build") {
|
|
deleteDir()
|
|
checkout scm
|
|
withCredentials([usernamePassword(credentialsId: '201ea374-bda3-4a38-a18a-ccc9c39fb3ff', passwordVariable: 'ORG_GRADLE_PROJECT_nexusPassword', usernameVariable: 'ORG_GRADLE_PROJECT_nexusUsername')]) {
|
|
sh "chmod +x gradlew"
|
|
sh "./gradlew clean build asciidoctor -PnexusUrl=https://nexus.ingenieurbuero-peetz.de"
|
|
}
|
|
slackSend channel: '#devops', color: 'good', message: 'Build generations finished successfully', tokenCredentialId: 'slack-ibtpdev'
|
|
|
|
}
|
|
stage("Publish Build Results") {
|
|
junit allowEmptyResults: true, testResults: '**/build/test-results/**/*.xml'
|
|
openTasks canComputeNew: false, defaultEncoding: 'UTF-8', excludePattern: '', healthy: '', high: '', ignoreCase: true, low: '', normal: '', pattern: '*.gradle,**/*.java,**/*.adoc', unHealthy: ''
|
|
archiveArtifacts allowEmptyArchive: true, artifacts: "build/asciidoc/pdf/generations.pdf"
|
|
}
|
|
stage("Publish HTML") {
|
|
publishHTML(target: [
|
|
allowMissing: true,
|
|
alwaysLinkToLastBuild: true,
|
|
keepAll: false, reportDir: 'build/asciidoc/html5',
|
|
reportFiles: "generations.html",
|
|
reportName: "generations"
|
|
])
|
|
}
|
|
}
|
|
>>>>>>> Imported documentation from repository scriptorium
|
|
>>>>>>> Imported documentation from repository scriptorium
|