2023-08-14 15:58:57 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
type: docker
|
|
|
|
|
|
|
|
#platform:
|
|
|
|
# os: linux
|
|
|
|
# arch: amd64
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: test
|
|
|
|
image: docker.io/bellsoft/liberica-openjdk-debian:17
|
|
|
|
commands:
|
|
|
|
- ./gradlew --quiet --no-daemon test
|
|
|
|
|
|
|
|
|
|
|
|
- name: build-deb
|
|
|
|
image: docker.io/debian:stable
|
|
|
|
environment:
|
|
|
|
AUTH_TOKEN: # Gitea access token ENV variable
|
|
|
|
from_secret: AUTH_TOKEN # Name of DroneCI secret exposed above
|
|
|
|
commands:
|
2023-08-14 16:04:49 +00:00
|
|
|
- apt-get update && apt-get install -y dpkg-dev unzip zip curl
|
2023-08-14 16:08:19 +00:00
|
|
|
- curl -s 'https://get.sdkman.io' | bash
|
|
|
|
- source $HOME/.sdkman/bin/sdkman-init.sh && sdk install java 17.0.8.fx-librca
|
|
|
|
- source $HOME/.sdkman/bin/sdkman-init.sh && ./gradlew --no-daemon clean build jpackage
|
2023-08-14 15:58:57 +00:00
|
|
|
- for file in build/jpackage/*.{rpm,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:8
|
|
|
|
environment:
|
|
|
|
AUTH_TOKEN: # Gitea access token ENV variable
|
|
|
|
from_secret: AUTH_TOKEN # Name of DroneCI secret exposed above
|
|
|
|
commands:
|
2023-08-14 16:08:19 +00:00
|
|
|
- dnf -y install unzip zip curl rpm-build
|
|
|
|
- curl -s 'https://get.sdkman.io' | bash
|
|
|
|
- source $HOME/.sdkman/bin/sdkman-init.sh && sdk install java 17.0.8.fx-librca
|
|
|
|
- source $HOME/.sdkman/bin/sdkman-init.sh && ./gradlew --no-daemon clean build jpackage
|
2023-08-14 15:58:57 +00:00
|
|
|
- for file in build/jpackage/*.{rpm,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
|