MCProtocolLib/Jenkinsfile

78 lines
2.2 KiB
Text
Raw Normal View History

2021-11-13 14:52:39 -05:00
pipeline {
agent any
tools {
maven 'Maven 3'
jdk 'Java 8'
}
options {
buildDiscarder(logRotator(artifactNumToKeepStr: '20'))
}
stages {
stage ('Build') {
steps {
sh 'mvn clean package'
}
post {
success {
archiveArtifacts artifacts: 'target/*.jar', excludes: 'target/*-sources.jar', fingerprint: true
}
}
}
stage ('Deploy') {
when {
branch "master"
}
2023-03-09 16:38:07 -05:00
pipeline {
agent any
tools {
maven 'Maven 3'
jdk 'Java 8'
}
options {
buildDiscarder(logRotator(artifactNumToKeepStr: '20'))
}
stages {
stage ('Build') {
steps {
sh 'mvn clean package'
}
post {
success {
archiveArtifacts artifacts: 'target/*.jar', excludes: 'target/*-sources.jar', fingerprint: true
}
}
}
stage ('Deploy') {
when {
branch "master"
}
2021-11-13 14:52:39 -05:00
steps {
rtMavenDeployer(
id: "maven-deployer",
serverId: "opencollab-artifactory",
releaseRepo: "maven-releases",
snapshotRepo: "maven-snapshots"
)
rtMavenResolver(
id: "maven-resolver",
serverId: "opencollab-artifactory",
releaseRepo: "maven-deploy-release",
snapshotRepo: "maven-deploy-snapshot"
)
rtMavenRun(
pom: 'pom.xml',
goals: 'javadoc:javadoc javadoc:jar source:jar install -DskipTests',
2021-11-13 14:52:39 -05:00
deployerId: "maven-deployer",
resolverId: "maven-resolver"
)
rtPublishBuildInfo(
serverId: "opencollab-artifactory"
)
step([$class: 'JavadocArchiver', javadocDir: 'target/site/apidocs', keepAll: false])
2021-11-13 14:52:39 -05:00
}
}
}
}