CarryOn/Jenkinsfile

32 lines
815 B
Groovy

#!/usr/bin/env groovy
pipeline {
agent any
tools {
jdk "jdk-17.0.1"
}
stages {
stage('Clean') {
steps {
withCredentials([file(credentialsId: 'mod_build_secrets', variable: 'ORG_GRADLE_PROJECT_secretFile')]) {
echo 'Cleaning Project'
sh 'chmod +x gradlew'
sh './gradlew clean'
}
}
}
stage('Build') {
steps {
withCredentials([file(credentialsId: 'mod_build_secrets', variable: 'ORG_GRADLE_PROJECT_secretFile')]) {
echo 'Building'
sh './gradlew build'
}
}
}
}
post {
always {
archive 'build/libs/**.jar'
}
}
}