From cf201ce7f476d1729639fa29b181a531bd2b562b Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 7 Dec 2022 04:36:47 -0500 Subject: [PATCH] *Add apt packaging --- .woodpecker.yml | 41 ++++++++++++++++++++++++++++++++++++++ nfpm.yaml | 23 +++++++++++++++++++++ pkg/scripts/postinstall.sh | 3 +++ pkg/scripts/preremove.sh | 3 +++ 4 files changed, 70 insertions(+) create mode 100644 .woodpecker.yml create mode 100644 nfpm.yaml create mode 100644 pkg/scripts/postinstall.sh create mode 100644 pkg/scripts/preremove.sh diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..3baa472 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,41 @@ +pipeline: + build: + image: git.lumeweb.com/lumeweb/ci-node + commands: + - yarn + - yarn build + package: + image: ghcr.io/goreleaser/nfpm + commands: + - nfpm pkg --packager deb + publish_focal: + image: git.lumeweb.com/lumeweb/aptly-publisher + settings: + apt_username: + from_secret: apt_username + apt_password: + from_secret: apt_password + repo: apt.web3relay.io + folder: ubuntu + distro: focal + gpg_password: + from_secret: gpg_password + publish_jammy: + image: git.lumeweb.com/lumeweb/aptly-publisher + settings: + apt_username: + from_secret: apt_username + apt_password: + from_secret: apt_password + repo: apt.web3relay.io + folder: ubuntu + distro: jammy + gpg_password: + from_secret: gpg_password + purge_cdn: + image: git.lumeweb.com/lumeweb/do-cdn-purge + settings: + DIGITALOCEAN_ACCESS_TOKEN: + from_secret: DIGITALOCEAN_ACCESS_TOKEN + DIGITALOCEAN_CDN_ID: + from_secret: DIGITALOCEAN_CDN_ID diff --git a/nfpm.yaml b/nfpm.yaml new file mode 100644 index 0000000..7c02c5d --- /dev/null +++ b/nfpm.yaml @@ -0,0 +1,23 @@ +name: "lumeweb-relay-plugin-handshake" +arch: "amd64" +platform: "linux" +version: "v0.1.0" +section: "default" +priority: "extra" +maintainer: "Derrick Hammer contact@lumeweb.com" +description: Handshake plugin for lumeweb-relay +vendor: "Hammer Technologies LLC" +homepage: "https://lumeweb.com" +license: "MIT" +contents: +- src: ./build/Release/bcryto.node + dst: /etc/lumeweb/relay/plugins/build/Release/bcryto.node +- src: ./build/Release/goosig.node + dst: /etc/lumeweb/relay/plugins/build/Release/goosig.node +- src: ./build/Release/leveldown.node + dst: /etc/lumeweb/relay/plugins/build/Release/leveldown.node +- src: ./build/Release/mrmr.node + dst: /etc/lumeweb/relay/plugins/build/Release/mrmr.node +scripts: + postinstall: ./pkg/scripts/postinstall.sh + preremove: ./pkg/scripts/preremove.sh diff --git a/pkg/scripts/postinstall.sh b/pkg/scripts/postinstall.sh new file mode 100644 index 0000000..6d2dc9a --- /dev/null +++ b/pkg/scripts/postinstall.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +systemctl restart lumeweb-relay.service diff --git a/pkg/scripts/preremove.sh b/pkg/scripts/preremove.sh new file mode 100644 index 0000000..6d2dc9a --- /dev/null +++ b/pkg/scripts/preremove.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +systemctl restart lumeweb-relay.service