From 21cf3c330bb476bf4642f019874b5a386e4bc64a Mon Sep 17 00:00:00 2001 From: david Date: Sat, 11 May 2024 23:55:00 +0200 Subject: [PATCH] Feature: Adding first draft of .drone.yml. --- .drone.yml | 125 +++++++++++++++++++++++++++++++++++++++++++ dockerhub/Dockerfile | 27 ---------- dockerhub/README.md | 18 ------- 3 files changed, 125 insertions(+), 45 deletions(-) create mode 100644 .drone.yml delete mode 100644 dockerhub/Dockerfile delete mode 100644 dockerhub/README.md diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..708add0 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,125 @@ +# Variables +tag: &tag latest +repo: &repo phoenix.ipv64.de/kirbylink/warp4 +branch: &branch master +dry_run: &dry_run false +step_name: &step_name warp4 +pipeline_name: &pipeline_name warp4 build and push +notification_name: ¬ification_name Send Notification + +# Basic build options +x-step: &default_build_option + image: plugins/docker + settings: + dry_run: *dry_run + mirror: https://registry.phoenix.ipv64.de + repo: *repo + tags: + - *tag + +x-step: &default_notification_option + image: phoenix.ipv64.de/kirbylink/drone-gotify:latest + settings: + gotifytoken: + from_secret: plugin_gotifytoken + gotifyendpoint: + from_secret: plugin_gotifyendpoint + gotifytitle: *step_name + gotifypriority: 5 + +kind: pipeline +type: docker +platform: + os: linux + arch: arm64 +name: *pipeline_name + +steps: +- name: *step_name + <<: *default_build_option + settings: + dockerfile: Dockerfile + +- name: *notification_name + <<: *default_notification_option + settings: + message: > + {{#success build.status}} + Build of docker image on build {{build.number}} succeeded on {{repo.name}}. Build link: {{build.link}} + {{else}} + WARNING. Build of docker image on build {{build.number}} failed on {{repo.name}}. Build link: {{build.link}} + {{/success}} + when: + status: [ success, failure ] + +trigger: + branch: + - *branch + event: + - push + - custom + +--- + +# Variables +tag: &tag testing +repo: &repo phoenix.ipv64.de/kirbylink/warp4 +branch: &exclude_branch master +dry_run: &dry_run true +step_name: &step_name warp4 +pipeline_name: &pipeline_name warp4 build only (testing) +notification_name: ¬ification_name Send Notification + +# Basic build options +x-step: &default_build_option + image: plugins/docker + settings: + dry_run: *dry_run + mirror: https://registry.phoenix.ipv64.de + repo: *repo + tags: + - *tag + +x-step: &default_notification_option + image: phoenix.ipv64.de/kirbylink/drone-gotify:latest + settings: + gotifytoken: + from_secret: plugin_gotifytoken + gotifyendpoint: + from_secret: plugin_gotifyendpoint + gotifytitle: *step_name + gotifypriority: 5 + +kind: pipeline +type: docker +platform: + os: linux + arch: arm64 +name: *pipeline_name + +steps: +- name: *step_name + <<: *default_build_option + settings: + dockerfile: Dockerfile + +- name: *notification_name + <<: *default_notification_option + settings: + message: > + {{#success build.status}} + Test build of docker image on build {{build.number}} succeeded on {{repo.name}}. Build link: {{build.link}} + {{else}} + WARNING. Test build of docker image on build {{build.number}} failed on {{repo.name}}. Build link: {{build.link}} + {{/success}} + when: + status: [ success, failure ] + +trigger: + branch: + exclude: + - *exclude_branch + event: + - push + - custom + \ No newline at end of file diff --git a/dockerhub/Dockerfile b/dockerhub/Dockerfile deleted file mode 100644 index 11a726e..0000000 --- a/dockerhub/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM debian:stable-slim -RUN apt-get update && apt-get install -y \ - curl \ - file \ - unzip \ - zip \ - && rm -rf /var/lib/apt/lists/* -RUN curl -fsSL -o /tmp/warp-packer \ - https://github.com/dgiagio/warp/releases/download/v0.3.0/linux-x64.warp-packer \ - && install -D \ - --mode=755 \ - --owner=root \ - --group=root \ - /tmp/warp-packer \ - /usr/local/bin \ - && rm /tmp/warp-packer -RUN curl -fsSL -o /tmp/warp4j \ - https://raw.githubusercontent.com/guziks/warp4j/stable/warp4j \ - && install -D \ - --mode=755 \ - --owner=root \ - --group=root \ - /tmp/warp4j \ - /usr/local/bin \ - && rm /tmp/warp4j -WORKDIR /workdir -ENTRYPOINT [ "/usr/local/bin/warp4j" ] diff --git a/dockerhub/README.md b/dockerhub/README.md deleted file mode 100644 index 3d7b19c..0000000 --- a/dockerhub/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Warp4j - -Turn JAR (java archive) into self-contained executable in a single command. - -See project [page](https://github.com/guziks/warp4j) for more information. - -## Usage - -``` -$ docker run --rm -it \ - -e "WARP4J_CACHE=/cache" \ - --volume :/cache \ - --volume :/workdir \ - --user $(id -u):$(id -g) \ - guziks/warp4j:stable -``` - -Change according to your requirements, but volume with working directory is mandatory.