diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..f418b2e --- /dev/null +++ b/Jenkinsfile @@ -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() + } + } + + + } + } +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 2939928..86d698c 100644 --- a/build.gradle +++ b/build.gradle @@ -65,12 +65,13 @@ publishing { } repositories { maven { - url = "https://maven.zontreck.com/repository/zontreck" + url = "https://git.zontreck.com/api/packages/AriasCreations/maven" name = "ariascreations" + def ENV = System.getenv() if (project.findProperty(MAVEN_PASSWORD_PROPERTY) != null) { credentials { - username = "admin" - password = project.findProperty(MAVEN_PASSWORD_PROPERTY) + username = ENV.MVN_USER + password = ENV.ACMVN } } }