Skip to content

Commit

Permalink
Add Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Jan 18, 2023
1 parent 8d2182e commit 61d3bcb
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .jenkins/Jenkinsfile
@@ -0,0 +1,49 @@
pipeline {
agent any
tools {
jdk "jdk-17.0.1"
}

environment {
ORG_GRADLE_PROJECT_curseforge_apikey = credentials('jei-curseforge-key')
ORG_GRADLE_PROJECT_BUILD_NUMBER = "${env.BUILD_NUMBER}"
}
stages {
stage('Checkout') {
steps {
checkout scm
sh "rm -rf build/libs"
}
}

stage('Test') {
steps {
sh "./gradlew test --no-daemon"
}
}

stage('Build') {
steps {
sh "./gradlew build --no-daemon"
}
}

stage('Archive') {
steps {
junit allowEmptyResults: true, testResults: 'build/test-results/**/*.xml'
}
}

stage('Publish Maven') {
steps {
sh "./gradlew publish -PDEPLOY_DIR=${env.MAVEN_DEPLOY_DIR} --no-daemon"
}
}

stage('Publish CurseForge') {
steps {
sh "./gradlew curseforge --no-daemon"
}
}
}
}

0 comments on commit 61d3bcb

Please sign in to comment.