Maven and jenkins stuff (#2623)

* Add the jenkins build number

* Create Jenkinsfile

* no crashes when no private.properties

* Changed to setupCIWorkspace
This commit is contained in:
Jared authored and Vincent Lee committed 2018-06-18 19:27:57 -07:00
1 parent 5a148b01f3
commit ba245a1499
2 files changed
+51 -5

No files matched your search

Vendored
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env groovy
pipeline {
agent any
stages {
stage('Clean') {
steps {
echo 'Cleaning Project'
sh 'chmod +x gradlew'
sh './gradlew clean'
}
}
stage('Setup') {
steps {
echo 'Setting up Workspace'
sh './gradlew setupCIWorkspace'
}
}
stage('Build and Deploy') {
steps {
echo 'Building and Deploying to Maven'
sh './gradlew build sort uploadArchives'
}
}
}
post {
always {
archive 'build/libs/**.jar'
}
}
}
+20 -5
View File
@@ -43,6 +43,11 @@ version = "${config.version}-${config.build_number}"
group = "vazkii.botania" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = config.mod_name
if (System.getenv().BUILD_NUMBER != null) {
//adds the build number to the end of the version string if on a build server
version += ".${System.getenv().BUILD_NUMBER}"
}
minecraft {
version = "${config.mc_version}-${config.forge_version}"
runDir = "eclipse/assets"
@@ -156,6 +161,9 @@ task outputDeobf(type: Copy) {
}
task forgecraft(type: Copy) {
if(priv == null){
return;
}
dependsOn "outputDeobf"
from "${config.dir_output}/wtf"
into file(priv.dir_forgecraft)
@@ -213,11 +221,15 @@ def scp(String dir, Closure antFileset = {}) {
def parseConfig(File config) {
config.withReader {
def prop = new Properties()
prop.load(it)
return (new ConfigSlurper().parse(prop))
}
if(config.exists()){
config.withReader {
def prop = new Properties()
prop.load(it)
return (new ConfigSlurper().parse(prop))
}
} else {
return null;
}
}
jar {
@@ -230,6 +242,9 @@ jar {
}
curseforge {
if(priv == null){
return;
}
apiKey = priv.cfkey
project {
id = "225643"