woodpecker

This commit is contained in:
Ell 2023-07-11 11:14:13 +02:00
parent 6ab4634bfa
commit 2ed4e45d38
3 changed files with 20 additions and 38 deletions

17
.woodpecker/main.yml Normal file
View file

@ -0,0 +1,17 @@
steps:
build:
image: eclipse-temurin:17-jdk
commands:
- chmod +x ./gradlew
- ./gradlew build --no-daemon
maven-publish:
image: eclipse-temurin:17-jdk
when:
branch: main
commands:
- chmod +x ./gradlew
- ./gradlew publish --no-daemon
environment:
- LOCAL_MAVEN=/var/www/maven
volumes:
- /var/www/maven:/var/www/maven

35
Jenkinsfile vendored
View file

@ -1,35 +0,0 @@
pipeline {
agent any
stages {
stage('Clean') {
steps {
sh './gradlew clean --no-daemon'
}
}
stage('Build') {
steps {
sh './gradlew build --no-daemon'
}
}
stage('Upload Artifacts') {
steps {
archiveArtifacts 'build/libs/**.jar'
}
}
stage('Publish') {
when {
branch 'main'
}
steps {
sh './gradlew publish --no-daemon'
}
}
}
environment {
local_maven = '/var/www/maven'
}
}

View file

@ -6,8 +6,8 @@ plugins {
}
version = mod_version
if (System.getenv('BUILD_NUMBER') != null) {
version += "." + System.getenv('BUILD_NUMBER')
if (System.getenv('CI_PIPELINE_NUMBER') != null) {
version += "." + System.getenv('CI_PIPELINE_NUMBER')
}
group = mod_group_id
@ -226,7 +226,7 @@ publishing {
}
repositories {
maven {
url "file://" + System.getenv("local_maven")
url "file://" + System.getenv("LOCAL_MAVEN")
}
}
}