Test drone builds.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Mark Nellemann 2023-08-14 19:35:20 +02:00
parent 9c161d115e
commit 66c79fb289
2 changed files with 7 additions and 40 deletions

View file

@ -15,34 +15,15 @@ steps:
# commands:
# - ./gradlew --quiet --no-daemon test
- name: build-deb
- name: jpackage
image: docker.io/debian:stable
environment:
AUTH_TOKEN: # Gitea access token ENV variable
from_secret: AUTH_TOKEN # Name of DroneCI secret exposed above
commands:
- apt-get update && apt-get install -y dpkg-dev unzip zip curl openjdk-17-jdk
# - bash -c "curl -s 'https://get.sdkman.io' | bash"
# - bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && sdk install java 17.0.8.fx-librca"
# - bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && ./gradlew --no-daemon clean build jpackage"
- apt-get update && apt-get install -y dpkg-dev rpm unzip zip curl openjdk-17-jdk
- ./gradlew --no-daemon clean build jpackage
- for file in build/jpackage/*.deb ; do curl -s --user "$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done
when:
event:
- tag
- name: build-rpm
image: docker.io/almalinux:9
environment:
AUTH_TOKEN: # Gitea access token ENV variable
from_secret: AUTH_TOKEN # Name of DroneCI secret exposed above
commands:
- dnf -y install unzip zip rpm-build java-17-openjdk
# - bash -c "curl -s 'https://get.sdkman.io' | bash"
# - bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && sdk install java 17.0.8.fx-librca"
# - bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && ./gradlew --no-daemon clean build jpackage"
- ./gradlew --no-daemon clean build jpackage
- for file in build/jpackage/*.rpm ; do curl -s --user "$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done
- for file in build/jpackage/*.* ; do curl -s --user "$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done
when:
event:
- tag

View file

@ -105,28 +105,14 @@ jlink {
}
if(osdetector.os == 'linux') {
skipInstaller = false
installerOptions += [
'--linux-menu-group', 'Internet',
'--linux-shortcut',
//'--icon', 'src/main/resources/icon_256x256.png'
'--linux-deb-maintainer', 'mark.nellemann@gmail.com',
'--linux-rpm-license-type', 'APACHE-20',
'--icon', 'src/main/resources/icon.png',
]
if (osdetector.release.isLike('debian')) {
// Requires 'dpkg-dev' installed
installerType = 'deb'
skipInstaller = false
installerOptions += [
'--linux-deb-maintainer', 'mark.nellemann@gmail.com'
]
} else if (osdetector.release.isLike('centos') or osdetector.release.isLike('suse')) {
// Requires 'rpm-build' installed
installerType = 'rpm'
skipInstaller = false
installerOptions += [
'--linux-rpm-license-type', 'APACHE-20'
]
}
}
}