From b51173ea97ab63a383ff6a9377da46ccdb72f74d Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Fri, 8 Jan 2021 13:13:13 -0500 Subject: [PATCH] Attempt to use Artifactory --- bootstrap/fabric/Jenkinsfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/bootstrap/fabric/Jenkinsfile b/bootstrap/fabric/Jenkinsfile index 0efa73dfb..4b6b1d315 100644 --- a/bootstrap/fabric/Jenkinsfile +++ b/bootstrap/fabric/Jenkinsfile @@ -18,6 +18,41 @@ pipeline { } } } + + stage ('Deploy') { + when { + branch "master" + } + + steps { + sh 'mvn javadoc:jar source:jar deploy -DskipTests' + rtGradleDeployer( + id: "GRADLE_DEPLOYER", + serverId: "opencollab-artifactory", + releaseRepo: "maven-releases", + snapshotRepo: "maven-snapshots" + ) + rtGradleResolver( + id: "GRADLE_RESOLVER", + serverId: "opencollab-artifactory", + releaseRepo: "release", + snapshotRepo: "snapshot" + ) + rtGradleRun ( + usesPlugin: true, + tool: GRADLE_TOOL, + rootDir: "/", + buildFile: 'build.gradle', + tasks: 'clean artifactoryPublish', + deployerId: "GRADLE_DEPLOYER", + resolverId: "GRADLE_RESOLVER" + ) + rtPublishBuildInfo( + serverId: "opencollab-artifactory" + ) + } + } + } } post {