
templates.devops.jte.JenkinsfileBuild.groovy.vm Maven / Gradle / Ivy
/*
* NOTE: This file is intended for use with the SDP Jenkins Templating Engine v2.0+
* which supports fetching the job template and configuration from an SCM location.
*
* Originally generated from: ${templateName}
*/
def gitId = 'github'
def gitRepo = '${projectGitUrl}'
def gitBranch = params.get("branch")
gitBranch = gitBranch ? gitBranch : "dev"
withGit url: gitRepo, cred: gitId, branch: gitBranch, {
try {
/* The config block uses the default maven-global-settings settings.xml configuration in the aiops-jenkins docker container */
configFileProvider(
[configFile(fileId: 'maven-global-settings', variable: 'MAVEN_GLOBAL_SETTINGS')]) {
maven.run([profiles: ['ci']], ["clean", "deploy", "-U", "-Dhabushu.force.clean", "-s $MAVEN_GLOBAL_SETTINGS"])
}
slackSend color: "good",
message: "${artifactId} built successfully"
} catch (err) {
slackSend color: "danger",
message: "${artifactId} failed to build successfully"
throw err
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy