This repository has been archived on 2024-10-31. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
LibZontreck/Jenkinsfile

51 lines
1,000 B
Groovy

pipeline {
agent any
options {
buildDiscarder(
logRotator(
numToKeepStr: '5'
)
)
}
stages {
stage("Build on Linux") {
agent {
label 'linux'
}
tools {
jdk "jdk17"
}
steps {
script {
sh '''
#!/bin/bash
git clean -xfd
git reset --hard
git fetch
export JAVA_OPTS=-Dfile.encoding=UTF-8
java -version
chmod +x gradlew
./gradlew -Dorg.gradle.java.home="$JAVA_HOME" build publish
'''
}
}
post {
always {
archiveArtifacts artifacts: "build/libs/*.jar"
deleteDir()
}
}
}
}
}