diff options
author | LexManos <LexManos@gmail.com> | 2018-11-02 12:42:26 -0700 |
---|---|---|
committer | LexManos <LexManos@gmail.com> | 2018-11-02 12:42:26 -0700 |
commit | b480d66d92400d4c1802d9d420a5d93b9eb9eb17 (patch) | |
tree | d92362e3cee13cc1218b9a216d959855d7377a76 /Jenkinsfile | |
parent | a2fe1761eade11c81a2bcc52ff8e930556dd9050 (diff) | |
download | Artifactural-b480d66d92400d4c1802d9d420a5d93b9eb9eb17.tar.gz Artifactural-b480d66d92400d4c1802d9d420a5d93b9eb9eb17.tar.bz2 Artifactural-b480d66d92400d4c1802d9d420a5d93b9eb9eb17.zip |
Jenkinsfile, license headers, publish under net.minecraftforge group and tag based version.
Diffstat (limited to 'Jenkinsfile')
-rw-r--r-- | Jenkinsfile | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..591de7d --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,55 @@ +//@Library('forge-shared-library')_ + +pipeline { + agent { + docker { + image 'gradlewrapper:latest' + args '-v gradlecache:/gradlecache' + } + } + environment { + GRADLE_ARGS = '-Dorg.gradle.daemon.idletimeout=5000' + } + + stages { + stage('fetch') { + steps { + checkout scm + } + } + stage('buildandtest') { + steps { + sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue build test' + script { + env.MYVERSION = sh(returnStdout: true, script: './gradlew properties -q | grep "version:" | awk \'{print $2}\'').trim() + } + } + /* + post { + success { + writeChangelog(currentBuild, 'build/changelog.txt') + archiveArtifacts artifacts: 'build/changelog.txt', fingerprint: false + } + } + */ + } + stage('publish') { + when { + not { + changeRequest() + } + } + environment { + FORGE_MAVEN = credentials('forge-maven-forge-user') + } + steps { + sh './gradlew ${GRADLE_ARGS} publish -PforgeMavenUser=${FORGE_MAVEN_USR} -PforgeMavenPassword=${FORGE_MAVEN_PSW}' + } + } + } + post { + always { + archiveArtifacts artifacts: 'build/libs/**/*.jar', fingerprint: true + } + } +}
\ No newline at end of file |