Browse Source

simply withMaven publishers

Signed-off-by: olivier lamy <olamy@apache.org>
pull/50/head
olivier lamy 5 years ago
parent
commit
b10c3a7110
1 changed files with 12 additions and 19 deletions
  1. 12
    19
      Jenkinsfile

+ 12
- 19
Jenkinsfile View File

buildMvn = 'Maven 3.5.2' buildMvn = 'Maven 3.5.2'
deploySettings = 'archiva-uid-jenkins' deploySettings = 'archiva-uid-jenkins'
localRepository = "../.archiva-master-repository" localRepository = "../.archiva-master-repository"
mavenOpts = '-Xms1g -Xmx2g -Djava.awt.headless=true'


INTEGRATION_PIPELINE = "Archiva-IntegrationTests-Gitbox" INTEGRATION_PIPELINE = "Archiva-IntegrationTests-Gitbox"


withMaven(maven: buildMvn, jdk: buildJdk, withMaven(maven: buildMvn, jdk: buildJdk,
mavenSettingsConfig: deploySettings, mavenSettingsConfig: deploySettings,
mavenLocalRepo: localRepository, mavenLocalRepo: localRepository,
options: [concordionPublisher(disabled: true), dependenciesFingerprintPublisher(disabled: true),
findbugsPublisher(disabled: true), artifactsPublisher(disabled: true),
invokerPublisher(disabled: true), jgivenPublisher(disabled: true),
publisherStrategy: 'EXPLICIT',
mavenOpts: mavenOpts,
options: [artifactsPublisher(disabled: false),
junitPublisher(disabled: false, ignoreAttachments: false), junitPublisher(disabled: false, ignoreAttachments: false),
openTasksPublisher(disabled: true), pipelineGraphPublisher(disabled: true)]
pipelineGraphPublisher(disabled: false)]
) )
{ {
sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh" sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh"
post { post {
always { always {
sh "rm -f /tmp/archiva-master-jdk-8-${env.JOB_NAME}.xml" sh "rm -f /tmp/archiva-master-jdk-8-${env.JOB_NAME}.xml"
junit testResults: '**/target/surefire-reports/TEST-*.xml'
}
success {
archiveArtifacts '**/target/*.war,**/target/*-bin.zip'
} }
failure { failure {
notifyBuild("Failure in BuildAndDeploy stage") notifyBuild("Failure in BuildAndDeploy stage")
checkout scm checkout scm
timeout(120) { timeout(120) {
withMaven(maven: buildMvn, jdk: buildJdk9, withMaven(maven: buildMvn, jdk: buildJdk9,
mavenSettingsConfig: deploySettings,
publisherStrategy: 'EXPLICIT',
mavenOpts: mavenOpts,
mavenSettingsConfig: deploySettings,
mavenLocalRepo: ".repository", mavenLocalRepo: ".repository",
options: [concordionPublisher(disabled: true), dependenciesFingerprintPublisher(disabled: true),
findbugsPublisher(disabled: true), artifactsPublisher(disabled: true),
invokerPublisher(disabled: true), jgivenPublisher(disabled: true),
junitPublisher(disabled: true, ignoreAttachments: false),
openTasksPublisher(disabled: true), pipelineGraphPublisher(disabled: true)]
options: [junitPublisher(disabled: false, ignoreAttachments: false)]
) )
{ {
sh "mvn clean install -U -B -e -fae -Dmaven.compiler.fork=true -Pci-build" sh "mvn clean install -U -B -e -fae -Dmaven.compiler.fork=true -Pci-build"
withMaven(maven: buildMvn, jdk: buildJdk10, withMaven(maven: buildMvn, jdk: buildJdk10,
mavenSettingsConfig: deploySettings, mavenSettingsConfig: deploySettings,
mavenLocalRepo: ".repository", mavenLocalRepo: ".repository",
options: [concordionPublisher(disabled: true), dependenciesFingerprintPublisher(disabled: true),
findbugsPublisher(disabled: true), artifactsPublisher(disabled: true),
invokerPublisher(disabled: true), jgivenPublisher(disabled: true),
junitPublisher(disabled: true, ignoreAttachments: false),
openTasksPublisher(disabled: true), pipelineGraphPublisher(disabled: true)]
publisherStrategy: 'EXPLICIT',
mavenOpts: mavenOpts,
options: [junitPublisher(disabled: false, ignoreAttachments: false)]
) )
{ {
sh "mvn clean install -U -B -e -fae -Dmaven.compiler.fork=true -Pci-build" sh "mvn clean install -U -B -e -fae -Dmaven.compiler.fork=true -Pci-build"

Loading…
Cancel
Save