mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 19:34:58 -05:00
52 lines
No EOL
1.5 KiB
Groovy
52 lines
No EOL
1.5 KiB
Groovy
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"
|
|
}
|
|
|
|
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:jar source:jar install -DskipTests',
|
|
deployerId: "maven-deployer",
|
|
resolverId: "maven-resolver"
|
|
)
|
|
rtPublishBuildInfo(
|
|
serverId: "opencollab-artifactory"
|
|
)
|
|
}
|
|
}
|
|
}
|
|
} |