Add a jenkinsfile and publish to new location

This commit is contained in:
zontreck 2024-09-06 02:56:22 -07:00
parent 47e6a466f2
commit 710294de8f
2 changed files with 48 additions and 3 deletions

44
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,44 @@
pipeline {
agent any
options {
buildDiscarder(
logRotator(
numToKeepStr: '5'
)
)
}
tools {
jdk 'jdk8'
}
stages {
stage("Build on Linux") {
agent {
label 'linux'
}
steps {
script {
sh '''
#!/bin/bash
chmod +x gradlew
./gradlew build publish
'''
}
}
post {
always {
archiveArtifacts artifacts: "build/libs/*.jar"
deleteDir()
}
}
}
}
}

View file

@ -65,12 +65,13 @@ publishing {
} }
repositories { repositories {
maven { maven {
url = "https://maven.zontreck.com/repository/zontreck" url = "https://git.zontreck.com/api/packages/AriasCreations/maven"
name = "ariascreations" name = "ariascreations"
def ENV = System.getenv()
if (project.findProperty(MAVEN_PASSWORD_PROPERTY) != null) { if (project.findProperty(MAVEN_PASSWORD_PROPERTY) != null) {
credentials { credentials {
username = "admin" username = ENV.MVN_USER
password = project.findProperty(MAVEN_PASSWORD_PROPERTY) password = ENV.ACMVN
} }
} }
} }