added woodpecker workflow

This commit is contained in:
Ell 2023-07-10 18:07:20 +02:00
parent 6050e5ad94
commit 4c55b4a677
3 changed files with 18 additions and 36 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 'chmod +x ./gradlew'
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

@ -230,7 +230,7 @@ publishing {
} }
repositories { repositories {
maven { maven {
url "file://" + System.getenv("local_maven") url "file://" + System.getenv("LOCAL_MAVEN")
} }
} }
} }