mdns-explorer/.drone.yml

49 lines
1.9 KiB
YAML
Raw Normal View History

2023-08-14 15:58:57 +00:00
---
kind: pipeline
name: default
type: docker
#platform:
# os: linux
# arch: amd64
steps:
2023-08-14 16:25:58 +00:00
# - name: test
# image: docker.io/bellsoft/liberica-openjdk-debian:17
# commands:
# - ./gradlew --quiet --no-daemon test
2023-08-14 15:58:57 +00:00
- 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:25:58 +00:00
- 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"
- ./gradlew --no-daemon clean build jpackage
2023-08-14 16:15:41 +00:00
- 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
2023-08-14 15:58:57 +00:00
when:
event:
- tag
- name: build-rpm
2023-08-14 17:19:36 +00:00
image: docker.io/almalinux:9
2023-08-14 15:58:57 +00:00
environment:
AUTH_TOKEN: # Gitea access token ENV variable
from_secret: AUTH_TOKEN # Name of DroneCI secret exposed above
commands:
2023-08-14 17:25:41 +00:00
- dnf -y install unzip zip rpm-build java-17-openjdk
2023-08-14 16:25:58 +00:00
# - 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
2023-08-14 16:15:41 +00:00
- 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
2023-08-14 15:58:57 +00:00
when:
event:
- tag