Attempt 1 at Maven repo!

This commit is contained in:
Andrew Steinborn 2018-08-21 23:35:09 -04:00
parent bc48fcb9a8
commit fd65887f1f
3 changed files with 23 additions and 7 deletions

2
Jenkinsfile vendored
View File

@ -20,7 +20,7 @@ pipeline {
}
stage('Deploy Artifacts') {
steps {
sh './gradlew publish'
sh 'export MAVEN_DEPLOYMENT=true; ./gradlew publish'
}
}
}

View File

@ -58,11 +58,16 @@ publishing {
}
}
// TODO: Set up a Maven repository on Velocity's infrastructure, preferably something lightweight.
/*repositories {
maven {
name = 'myRepo'
url = "file://${buildDir}/repo"
if (System.getenv("MAVEN_DEPLOYMENT") != null && project.ext.getCurrentBranchName() == "master") {
repositories {
maven {
name = 'myRepo'
if (project.version.toString().endsWith("-SNAPSHOT")) {
url = "file:///maven-repo/snapshots"
} else {
url = "file:///maven-repo/releases"
}
}
}
}*/
}
}

View File

@ -16,6 +16,17 @@ allprojects {
log4jVersion = '2.11.0'
nettyVersion = '4.1.28.Final'
guavaVersion = '25.1-jre'
getCurrentBranchName = {
new ByteArrayOutputStream().withStream { os ->
exec {
executable = "git"
args = ["rev-parse", "--abbrev-ref", "HEAD"]
standardOutput = os
}
return os.toString()
}
}
}
repositories {