From 127c19fecda0cb83e6ea16e0c4218f381e527258 Mon Sep 17 00:00:00 2001 From: Sean OMeara Date: Sat, 14 May 2022 10:08:22 +0200 Subject: [PATCH] betterized rpm spec and ci scripts --- .drone.jsonnet | 68 + .drone.yml | 2844 +++++++++++++++++++++++--- Makefile | 4 + ci/Dockerfile.deb | 10 + ci/Dockerfile.el6 | 36 + ci/Dockerfile.rpm | 9 + ci/Dockerfile.sid | 7 - ci/scripts/build.sh | 121 +- ci/scripts/munge_debian_changelog.sh | 37 + ci/scripts/munge_rpm_spec.sh | 36 + make-linux.mk | 40 +- zerotier-one.spec | 181 +- 12 files changed, 3028 insertions(+), 365 deletions(-) create mode 100644 .drone.jsonnet create mode 100644 ci/Dockerfile.deb create mode 100644 ci/Dockerfile.el6 create mode 100644 ci/Dockerfile.rpm delete mode 100644 ci/Dockerfile.sid create mode 100755 ci/scripts/munge_debian_changelog.sh create mode 100755 ci/scripts/munge_rpm_spec.sh diff --git a/.drone.jsonnet b/.drone.jsonnet new file mode 100644 index 000000000..338d79b63 --- /dev/null +++ b/.drone.jsonnet @@ -0,0 +1,68 @@ + +local targets = [ + // + // Render these into .drone.yaml by running "make drone" + // + { "os": "linux", "name": "el9", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] }, + { "os": "linux", "name": "el8", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] }, + { "os": "linux", "name": "el7", "isas": [ "amd64", "ppc64le"], "events": [ "tag" ] }, + { "os": "linux", "name": "el6", "isas": [ "amd64" ], "events": [ "tag" ] }, + { "os": "linux", "name": "amzn2", "isas": [ "amd64", "arm64" ], "events": [ "tag" ] }, + { "os": "linux", "name": "fc37", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] }, + { "os": "linux", "name": "fc36", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] }, + { "os": "linux", "name": "fc35", "isas": [ "amd64", "arm64", "ppc64le", "s390x" ], "events": [ "tag" ] }, + { "os": "linux", "name": "jammy", "isas": [ "amd64", "arm64", "armv7", "riscv64", "ppc64le", "s390x" ], "events": [ "tag" ] }, + { "os": "linux", "name": "focal", "isas": [ "amd64", "arm64", "armv7", "riscv64", "ppc64le" ], "events": [ "tag" ] }, + { "os": "linux", "name": "bionic", "isas": [ "amd64", "arm64", "386", "ppc64le", "s390x" ], "events": ["tag" ] }, + { "os": "linux", "name": "xenial", "isas": [ "amd64", "arm64", "386" ], "events": [ "tag" ] }, + { "os": "linux", "name": "sid", "isas": [ "386", "amd64", "arm64", "armv7", "riscv64", "mips64le", "ppc64le", "s390x" ], "events": [ "push", "tag" ] }, + { "os": "linux", "name": "bookworm", "isas": [ "amd64", "arm64", "armv7", "386", "mips64le", "ppc64le", "s390x" ], "events": [ "tag" ] }, + { "os": "linux", "name": "bullseye", "isas": [ "amd64", "arm64", "armv7", "386", "mips64le", "ppc64le", "s390x" ], "events": [ "tag" ] }, + { "os": "linux", "name": "buster", "isas": [ "amd64", "arm64", "armv7", "386", "mips64le", "ppc64le", "s390x" ], "events": [ "tag" ] }, + { "os": "linux", "name": "stretch", "isas": [ "amd64", "arm64", "386" ], "events": [ "tag" ] }, + // { "os": "windows", "name": "win2k19", "isas": [ "amd64" ], "events": ["push", "tag" ] } +]; + +local Build(platform, os, isa, events) = { + "kind": "pipeline", + "type": "docker", + "pull": "always", + "name": platform + " " + isa + " " + "build", + "clone": { "depth": 1 }, + "steps": [ + { + "name": "build", + "image": "registry.sean.farm/honda-builder", + "commands": [ "./ci/scripts/build.sh " + platform + " " + isa + " " + "100.0.0+${DRONE_COMMIT_SHA:0:8}" + " " + "${DRONE_BUILD_EVENT}" ] + }, + { + "name": "list", + "image": "registry.sean.farm/honda-builder", + "commands": [ "ls -la " + platform ] + }, + { + "name": "notify-mattermost", + "image": "registry.sean.farm/mattermost-notify", + "environment": { + "token": { "from_secret": "mattermost-token" }, + "host": { "from_secret": "mattermost-host" }, + "channel": { "from_secret": "mattermost-channel" }, + "maxRetry": 3, + }, + "when": { "status": [ "failure" ] } + } + ], + "image_pull_secrets": [ "dockerconfigjson" ], + [ if isa == "arm64" || isa == "armv7" then "platform" ]: { os: os, arch: "arm64" }, + "trigger": { "event": events } +}; + +// puttin on the bits + +std.flattenArrays([ + [ + Build(p.name, p.os, isa, p.events) + for isa in p.isas + ] + for p in targets +]) diff --git a/.drone.yml b/.drone.yml index 955fbbdea..54587abf4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,267 +1,2655 @@ --- -kind: pipeline -type: docker -name: build 386 - clone: depth: 1 - -steps: - - name: build 386 - image: registry.sean.farm/honda-builder - commands: - - ./ci/scripts/build.sh linux 386 $${DRONE_COMMIT_SHA} - - name: notify-mattermost - pull: always - image: registry.sean.farm/mattermost-notify - environment: - token: - from_secret: mattermost-token - host: - from_secret: mattermost-host - channel: - from_secret: mattermost-channel - maxRetry: 3 - when: - status: - - failure - - success - image_pull_secrets: - - dockerconfigjson - ---- +- dockerconfigjson kind: pipeline +name: el9 amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh el9 amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la el9 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag type: docker -name: build amd64 - +--- clone: depth: 1 - -steps: - - name: build amd64 - image: registry.sean.farm/honda-builder - commands: - - ./ci/scripts/build.sh linux amd64 $${DRONE_COMMIT_SHA} - - name: notify-mattermost - pull: always - image: registry.sean.farm/mattermost-notify - environment: - token: - from_secret: mattermost-token - host: - from_secret: mattermost-host - channel: - from_secret: mattermost-channel - maxRetry: 3 - when: - status: - - failure - - success - image_pull_secrets: - - dockerconfigjson - ---- +- dockerconfigjson kind: pipeline -type: docker -name: build arm64 - -clone: - depth: 1 - -steps: - - name: build arm64 - image: registry.sean.farm/honda-builder - commands: - - ./ci/scripts/build.sh linux arm64 $${DRONE_COMMIT_SHA} - - name: notify-mattermost - pull: always - image: registry.sean.farm/mattermost-notify - environment: - token: - from_secret: mattermost-token - host: - from_secret: mattermost-host - channel: - from_secret: mattermost-channel - maxRetry: 3 - when: - status: - - failure - - success - +name: el9 arm64 build platform: - os: linux arch: arm64 - -image_pull_secrets: - - dockerconfigjson - ---- -kind: pipeline + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh el9 arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la el9 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag type: docker -name: build armv7 - +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: el9 ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh el9 ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la el9 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: el9 s390x build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh el9 s390x 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la el9 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: el8 amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh el8 amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la el8 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: el8 arm64 build platform: - os: linux arch: arm64 - + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh el8 arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la el8 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- clone: depth: 1 - +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: el8 ppc64le build +pull: always steps: - - name: build armv7 - image: registry.sean.farm/honda-builder - commands: - - ./ci/scripts/build.sh linux armv7 $${DRONE_COMMIT_SHA} - - name: notify-mattermost - pull: always - image: registry.sean.farm/mattermost-notify - environment: - token: - from_secret: mattermost-token - host: - from_secret: mattermost-host - channel: - from_secret: mattermost-channel - maxRetry: 3 - when: - status: - - failure - - success - +- commands: + - ./ci/scripts/build.sh el8 ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la el8 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: el8 s390x build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh el8 s390x 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la el8 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: el7 amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh el7 amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la el7 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: el7 ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh el7 ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la el7 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: el6 amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh el6 amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la el6 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: amzn2 amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh amzn2 amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la amzn2 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: amzn2 arm64 build platform: - os: linux arch: arm64 - -image_pull_secrets: - - dockerconfigjson - ---- -kind: pipeline + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh amzn2 arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la amzn2 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag type: docker -name: build riscv64 - +--- clone: depth: 1 - -steps: - - name: build riscv64 - image: registry.sean.farm/honda-builder - commands: - - ./ci/scripts/build.sh linux riscv64 $${DRONE_COMMIT_SHA} - - name: notify-mattermost - pull: always - image: registry.sean.farm/mattermost-notify - environment: - token: - from_secret: mattermost-token - host: - from_secret: mattermost-host - channel: - from_secret: mattermost-channel - maxRetry: 3 - when: - status: - - failure - - success - image_pull_secrets: - - dockerconfigjson - ---- +- dockerconfigjson kind: pipeline +name: fc37 amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc37 amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc37 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag type: docker -name: build mips64le - +--- clone: depth: 1 - -steps: - - name: build mips64le - image: registry.sean.farm/honda-builder - commands: - - ./ci/scripts/build.sh linux mips64le $${DRONE_COMMIT_SHA} - - name: notify-mattermost - pull: always - image: registry.sean.farm/mattermost-notify - environment: - token: - from_secret: mattermost-token - host: - from_secret: mattermost-host - channel: - from_secret: mattermost-channel - maxRetry: 3 - when: - status: - - failure - - success - image_pull_secrets: - - dockerconfigjson - ---- +- dockerconfigjson kind: pipeline +name: fc37 arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc37 arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc37 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag type: docker -name: build ppc64le - +--- clone: depth: 1 - -steps: - - name: build ppc64le - image: registry.sean.farm/honda-builder - commands: - - ./ci/scripts/build.sh linux ppc64le $${DRONE_COMMIT_SHA} - - name: notify-mattermost - pull: always - image: registry.sean.farm/mattermost-notify - environment: - token: - from_secret: mattermost-token - host: - from_secret: mattermost-host - channel: - from_secret: mattermost-channel - maxRetry: 3 - when: - status: - - failure - - success - image_pull_secrets: - - dockerconfigjson - ---- +- dockerconfigjson kind: pipeline +name: fc37 ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc37 ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc37 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag type: docker -name: build s390x - +--- clone: depth: 1 - -steps: - - name: build s390x - image: registry.sean.farm/honda-builder - commands: - - ./ci/scripts/build.sh linux s390x $${DRONE_COMMIT_SHA} - - name: notify-mattermost - pull: always - image: registry.sean.farm/mattermost-notify - environment: - token: - from_secret: mattermost-token - host: - from_secret: mattermost-host - channel: - from_secret: mattermost-channel - maxRetry: 3 - when: - status: - - failure - - success - image_pull_secrets: - - dockerconfigjson +- dockerconfigjson +kind: pipeline +name: fc37 s390x build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc37 s390x 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc37 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: fc36 amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc36 amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc36 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: fc36 arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc36 arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc36 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: fc36 ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc36 ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc36 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: fc36 s390x build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc36 s390x 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc36 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: fc35 amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc35 amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc35 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: fc35 arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc35 arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc35 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: fc35 ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc35 ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc35 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: fc35 s390x build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh fc35 s390x 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la fc35 + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: jammy amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh jammy amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la jammy + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: jammy arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh jammy arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la jammy + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: jammy armv7 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh jammy armv7 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la jammy + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: jammy riscv64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh jammy riscv64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la jammy + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: jammy ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh jammy ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la jammy + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: jammy s390x build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh jammy s390x 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la jammy + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: focal amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh focal amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la focal + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: focal arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh focal arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la focal + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: focal armv7 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh focal armv7 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la focal + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: focal riscv64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh focal riscv64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la focal + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: focal ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh focal ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la focal + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bionic amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bionic amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bionic + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bionic arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bionic arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bionic + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bionic 386 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bionic 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bionic + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bionic ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bionic ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bionic + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bionic s390x build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bionic s390x 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bionic + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: xenial amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh xenial amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la xenial + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: xenial arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh xenial arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la xenial + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: xenial 386 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh xenial 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la xenial + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: sid 386 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh sid 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la sid + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - push + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: sid amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh sid amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la sid + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - push + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: sid arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh sid arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la sid + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - push + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: sid armv7 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh sid armv7 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la sid + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - push + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: sid riscv64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh sid riscv64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la sid + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - push + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: sid mips64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh sid mips64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la sid + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - push + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: sid ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh sid ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la sid + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - push + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: sid s390x build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh sid s390x 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la sid + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - push + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bookworm amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bookworm amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bookworm + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bookworm arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bookworm arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bookworm + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bookworm armv7 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bookworm armv7 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bookworm + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bookworm 386 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bookworm 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bookworm + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bookworm mips64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bookworm mips64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bookworm + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bookworm ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bookworm ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bookworm + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bookworm s390x build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bookworm s390x 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bookworm + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bullseye amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bullseye amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bullseye + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bullseye arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bullseye arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bullseye + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bullseye armv7 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bullseye armv7 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bullseye + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bullseye 386 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bullseye 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bullseye + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bullseye mips64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bullseye mips64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bullseye + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bullseye ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bullseye ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bullseye + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: bullseye s390x build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh bullseye s390x 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la bullseye + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: buster amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh buster amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la buster + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: buster arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh buster arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la buster + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: buster armv7 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh buster armv7 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la buster + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: buster 386 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh buster 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la buster + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: buster mips64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh buster mips64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la buster + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: buster ppc64le build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh buster ppc64le 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la buster + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: buster s390x build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh buster s390x 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la buster + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: stretch amd64 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh stretch amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la stretch + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: stretch arm64 build +platform: + arch: arm64 + os: linux +pull: always +steps: +- commands: + - ./ci/scripts/build.sh stretch arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la stretch + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker +--- +clone: + depth: 1 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: stretch 386 build +pull: always +steps: +- commands: + - ./ci/scripts/build.sh stretch 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT} + image: registry.sean.farm/honda-builder + name: build +- commands: + - ls -la stretch + image: registry.sean.farm/honda-builder + name: list +- environment: + channel: + from_secret: mattermost-channel + host: + from_secret: mattermost-host + maxRetry: 3 + token: + from_secret: mattermost-token + image: registry.sean.farm/mattermost-notify + name: notify-mattermost + when: + status: + - failure +trigger: + event: + - tag +type: docker diff --git a/Makefile b/Makefile index 39dabafdd..0440f89a8 100644 --- a/Makefile +++ b/Makefile @@ -26,3 +26,7 @@ endif ifeq ($(OSTYPE),NetBSD) include make-netbsd.mk endif + +drone: + @echo "rendering .drone.yaml from .drone.jsonnet" + drone jsonnet --format --stream diff --git a/ci/Dockerfile.deb b/ci/Dockerfile.deb new file mode 100644 index 000000000..91b383a6a --- /dev/null +++ b/ci/Dockerfile.deb @@ -0,0 +1,10 @@ +ARG PLATFORM +FROM registry.sean.farm/${PLATFORM}-builder as stage +WORKDIR /work/build +COPY . . +RUN make debian +RUN ls -ls /work + +FROM scratch AS export +ARG PLATFORM +COPY --from=stage /work/*.deb ./${PLATFORM}/ diff --git a/ci/Dockerfile.el6 b/ci/Dockerfile.el6 new file mode 100644 index 000000000..46ba13c42 --- /dev/null +++ b/ci/Dockerfile.el6 @@ -0,0 +1,36 @@ +ARG DOCKER_ARCH +FROM --platform=linux/${DOCKER_ARCH} alpine:edge AS builder + +RUN apk update +RUN apk add curl +RUN apk add bash +RUN apk add file +RUN apk add rust +RUN apk add cargo +RUN apk add make +RUN apk add cmake +RUN apk add clang +RUN apk add openssl-dev +RUN apk add linux-headers +RUN apk add build-base +RUN apk add openssl-libs-static + +COPY . . +RUN ZT_STATIC=1 make one +RUN ls -la + +ARG DOCKER_ARCH +FROM --platform=linux/${DOCKER_ARCH} centos:6 AS stage +WORKDIR /root/rpmbuild/BUILD +COPY . . +COPY --from=builder zerotier-one ./ +RUN curl https://gist.githubusercontent.com/someara/b363002ba6e57b3c474dd027d4daef85/raw/4ac5534139752fc92fbe1a53599a390214f69615/el6%2520vault --output /etc/yum.repos.d/CentOS-Base.repo +RUN uname -a +RUN yum -y install make gcc rpm-build +RUN pwd +RUN ls -la +RUN make redhat + +FROM scratch AS export +ARG PLATFORM +COPY --from=stage /root/rpmbuild/RPMS/*/*.rpm ./${PLATFORM}/ diff --git a/ci/Dockerfile.rpm b/ci/Dockerfile.rpm new file mode 100644 index 000000000..9969be05e --- /dev/null +++ b/ci/Dockerfile.rpm @@ -0,0 +1,9 @@ +ARG PLATFORM +FROM registry.sean.farm/${PLATFORM}-builder as stage +WORKDIR /root/rpmbuild/BUILD +COPY . . +RUN make redhat + +FROM scratch AS export +ARG PLATFORM +COPY --from=stage /root/rpmbuild/RPMS/*/*.rpm ./${PLATFORM}/ diff --git a/ci/Dockerfile.sid b/ci/Dockerfile.sid deleted file mode 100644 index 4af604aac..000000000 --- a/ci/Dockerfile.sid +++ /dev/null @@ -1,7 +0,0 @@ -FROM registry.sean.farm/sid-builder as stage -COPY . . -RUN /usr/bin/make -j 8 - -FROM scratch AS export -COPY --from=stage /zerotier-one . -COPY --from=stage /zerotier-cli . diff --git a/ci/scripts/build.sh b/ci/scripts/build.sh index eb33e80fe..e6aee6bc6 100755 --- a/ci/scripts/build.sh +++ b/ci/scripts/build.sh @@ -2,28 +2,115 @@ set -euo pipefail IFS=$'\n\t' -export GOOS=$1 -export GOARCH=$2 +export PLATFORM=$1 +export ZT_ISA=$2 export VERSION=$3 -export DOCKER_BUILDKIT=1 +export EVENT=$4 -echo "nproc: $(nproc)" - -case $GOARCH in - armv5) - export ARCH=arm/v5 - ;; - armv7) - export ARCH=arm/v7 - ;; - arm64) - export ARCH=arm64/v8 +case $PLATFORM in + el*|fc*|amzn*) + export PKGFMT=rpm ;; *) - export ARCH=$GOARCH + export PKGFMT=deb +esac + +# OSX +# x86_64-apple-darwin +# aarch64-apple-darwin + +# Windows +# x86_64-pc-windows-msvc +# i686-pc-windows-msvc +# aarch64-pc-windows-msvc + +# Linux +# i686-unknown-linux-gnu +# x86_64-unknown-linux-gnu +# arm-unknown-linux-gnueabi ? +# arm-unknown-linux-gnueabihf ? +# armv7-unknown-linux-gnueabihf +# + +case $ZT_ISA in + 386) + export DOCKER_ARCH=386 + export RUST_TRIPLET=i686-unknown-linux-gnu + ;; + amd64) + export DOCKER_ARCH=amd64 + export RUST_TRIPLET=x86_64-unknown-linux-gnu + ;; + armv6) + export DOCKER_ARCH=arm/v6 + export RUST_TRIPLET=arm-unknown-linux-gnueabi + ;; + armv7) + export DOCKER_ARCH=arm/v7 + export RUST_TRIPLET=arm-unknown-linux-gnueabihf + ;; + arm64) + export DOCKER_ARCH=arm64/v8 + export RUST_TRIPLET=aarch64-unknown-linux-gnu + ;; + riscv64) + export DOCKER_ARCH=riscv64 + export RUST_TRIPLET=riscv64gc-unknown-linux-gnu + ;; + ppc64le) + export DOCKER_ARCH=ppc64le + export RUST_TRIPLET=powerpc64le-unknown-linux-gnu + ;; + mips64le) + export DOCKER_ARCH=mips64le + export RUST_TRIPLET=mips64el-unknown-linux-gnuabi64 + ;; + s390x) + export DOCKER_ARCH=s390x + export RUST_TRIPLET=s390x-unknown-linux-gnu + ;; + *) + echo "ERROR: could not determine architecture settings. PLEASE FIX ME" + exit 1 ;; esac +if [ -f "ci/Dockerfile.${PLATFORM}" ]; then + export DOCKERFILE="ci/Dockerfile.${PLATFORM}" +else + export DOCKERFILE="ci/Dockerfile.${PKGFMT}" +fi + +echo "#~~~~~~~~~~~~~~~~~~~~" +echo "$0 variables:" +echo "nproc: $(nproc)" +echo "ZT_ISA: ${ZT_ISA}" +echo "DOCKER_ARCH: ${DOCKER_ARCH}" +echo "RUST_TRIPLET: ${RUST_TRIPLET}" +echo "VERSION: ${VERSION}" +echo "EVENT: ${EVENT}" +echo "PKGFMT: ${PKGFMT}" +echo "PWD: ${PWD}" +echo "DOCKERFILE: ${DOCKERFILE}" +echo "#~~~~~~~~~~~~~~~~~~~~" + +if [ ${EVENT} == "push" ]; then +make munge_rpm zerotier-one.spec VERSION=${VERSION} +make munge_deb debian/changelog VERSION=${VERSION} +fi + +export DOCKER_BUILDKIT=1 docker run --privileged --rm tonistiigi/binfmt --install all -docker pull registry.sean.farm/sid-builder -docker buildx build --platform ${GOOS}/${ARCH} -f ci/Dockerfile.sid --target export -t test . --output out/${GOOS}/${GOARCH} + +# docker pull --platform linux/${DOCKER_ARCH} registry.sean.farm/${PLATFORM}-builder + +docker buildx build \ + --build-arg PLATFORM="${PLATFORM}" \ + --build-arg RUST_TRIPLET="${RUST_TRIPLET}" \ + --build-arg DOCKER_ARCH="${DOCKER_ARCH}" \ + --platform linux/${DOCKER_ARCH} \ + -f ${DOCKERFILE} \ + -t build \ + . \ + --output type=local,dest=. \ + --target export diff --git a/ci/scripts/munge_debian_changelog.sh b/ci/scripts/munge_debian_changelog.sh new file mode 100755 index 000000000..86cedf72c --- /dev/null +++ b/ci/scripts/munge_debian_changelog.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +export FILE=$1 +export VERSION=$2 +export NAME=$3 +export MESSAGE=$4 +export DATE=$(date "+%a, %d %b %Y %T %z") +# export DATE=$(date "+%a %b %d %Y") + +set +e +grep --version | grep BSD &> /dev/null +if [ $? == 0 ]; then BSDGREP=true ; else BSDGREP=false ; fi +set -e + +# echo "#~~~~~~~~~~~~~~~~~~~~" +# echo "$0 variables:" +# echo "VERSION: ${VERSION}" +# echo "NAME: ${NAME}" +# echo "MESSAGE: ${MESSAGE}" +# echo "DATE: ${DATE}" +# echo "BSDGREP: ${BSDGREP}" +# echo "#~~~~~~~~~~~~~~~~~~~~" +# echo + +if $BSDGREP ; then + sed -i '' s/^Version:.*/"Version: ${VERSION}"/ ${FILE} +else + sed -i s/^Version:.*/"Version: ${VERSION}"/ ${FILE} +fi + +awk -v version=${VERSION} -v date=${DATE} -v name=${NAME} -v message=${MESSAGE} \ + 'BEGIN{print "zerotier-one (" version ") unstable; urgency=medium\n\n * " message "\n\n -- " name " " date "\n" }{ print }' \ + ${FILE} > ${FILE}.new + +mv ${FILE}.new ${FILE} diff --git a/ci/scripts/munge_rpm_spec.sh b/ci/scripts/munge_rpm_spec.sh new file mode 100755 index 000000000..289df1ed4 --- /dev/null +++ b/ci/scripts/munge_rpm_spec.sh @@ -0,0 +1,36 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +export FILE=$1 +export VERSION=$2 +export NAME=$3 +export MESSAGE=$4 +export DATE=$(date "+%a %b %d %Y") + +set +e +grep --version | grep BSD &> /dev/null +if [ $? == 0 ]; then BSDGREP=true ; else BSDGREP=false ; fi +set -e + +# echo "#~~~~~~~~~~~~~~~~~~~~" +# echo "$0 variables:" +# echo "VERSION: ${VERSION}" +# echo "NAME: ${NAME}" +# echo "MESSAGE: ${MESSAGE}" +# echo "DATE: ${DATE}" +# echo "BSDGREP: ${BSDGREP}" +# echo "#~~~~~~~~~~~~~~~~~~~~" +# echo + +if $BSDGREP ; then + sed -i '' s/^Version:.*/"Version: ${VERSION}"/ ${FILE} +else + sed -i s/^Version:.*/"Version: ${VERSION}"/ ${FILE} +fi + +awk -v version=${VERSION} -v date=${DATE} -v name=${NAME} -v message=${MESSAGE} \ + 'FNR==NR{ if (/%changelog/) p=NR; next} 1; FNR==p{ print "* " date " " name " - " version "\n- " message "\n" }' \ + ${FILE} ${FILE} > ${FILE}.new + +mv ${FILE}.new ${FILE} diff --git a/make-linux.mk b/make-linux.mk index 1caf3acc1..8425eaee1 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -31,7 +31,7 @@ ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1) override DEFS+=-DZT_USE_SYSTEM_MINIUPNPC LDLIBS+=-lminiupnpc else - override DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR + override DEFS+=-DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_STRING="\"Linux\"" -DMINIUPNPC_VERSION_STRING="\"2.0\"" -DUPNP_VERSION_STRING="\"UPnP/1.1\"" -DENABLE_STRNATPMPERR ONE_OBJS+=ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o endif ifeq ($(wildcard /usr/include/natpmp.h),) @@ -66,9 +66,9 @@ ifeq ($(ZT_DEBUG),1) # C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box! node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS) else - CFLAGS?=-O3 -fstack-protector -fPIE + CFLAGS?=-O3 -fstack-protector override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS) - CXXFLAGS?=-O3 -fstack-protector -fPIE + CXXFLAGS?=-O3 -fstack-protector override CXXFLAGS+=-Wall -Wno-deprecated -std=c++11 -pthread $(INCLUDES) -DNDEBUG $(DEFS) LDFLAGS=-pie -Wl,-z,relro,-z,now RUSTFLAGS=--release @@ -84,8 +84,6 @@ ifeq ($(ZT_UBIQUITI), 1) endif ifeq ($(ZT_SYNOLOGY), 1) - override CFLAGS+=-fPIC - override CXXFLAGS+=-fPIC override DEFS+=-D__SYNOLOGY__ ZT_EMBEDDED=1 endif @@ -336,12 +334,20 @@ ifeq ($(ZT_USE_ARM32_NEON_ASM_CRYPTO),1) override CORE_OBJS+=ext/arm32-neon-salsa2012-asm/salsa2012.o endif +# Position Independence +override CFLAGS+=-fPIC -fPIE +override CXXFLAGS+=-fPIC -fPIE + .PHONY: all all: one .PHONY: one one: zerotier-one zerotier-idtool zerotier-cli +from_builder: + ln -sf zerotier-one zerotier-idtool + ln -sf zerotier-one zerotier-cli + zerotier-one: $(CORE_OBJS) $(ONE_OBJS) one.o $(CXX) $(CXXFLAGS) $(LDFLAGS) -o zerotier-one $(CORE_OBJS) $(ONE_OBJS) one.o $(LDLIBS) @@ -452,6 +458,20 @@ uninstall: FORCE # These are just for convenience for building Linux packages +echo_flags: + @echo "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~" + @echo "echo_flags :: CC=$(CC)" + @echo "echo_flags :: CXX=$(CXX)" + @echo "echo_flags :: CFLAGS=$(CFLAGS)" + @echo "echo_flags :: CXXFLAGS=$(CXXFLAGS)" + @echo "echo_flags :: LDFLAGS=$(LDFLAGS)" + @echo "echo_flags :: RUSTFLAGS=$(RUSTFLAGS)" + @echo "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~" + +# debian: echo_flags +# @echo "building deb package" +# debuild --no-lintian -b -uc -us + debian: FORCE debuild --no-lintian -I -i -us -uc -nc -b @@ -496,4 +516,14 @@ synology-pkg: FORCE synology-docker: FORCE cd synology/dsm7-docker/; ./build.sh build +munge_rpm: + @:$(call check_defined, VERSION) + @echo "Updating rpm spec to $(VERSION)" + ci/scripts/munge_rpm_spec.sh zerotier-one.spec $(VERSION) "Adam Ierymenko " "see https://github.com/zerotier/ZeroTierOne for release notes" + +munge_deb: + @:$(call check_defined, VERSION) + @echo "Updating debian/changelog to $(VERSION)" + ci/scripts/munge_debian_changelog.sh debian/changelog $(VERSION) "Adam Ierymenko " "see https://github.com/zerotier/ZeroTierOne for release notes" + FORCE: diff --git a/zerotier-one.spec b/zerotier-one.spec index 80396f003..77f2d89c0 100644 --- a/zerotier-one.spec +++ b/zerotier-one.spec @@ -6,28 +6,56 @@ Summary: ZeroTier network virtualization service License: ZeroTier BSL 1.1 URL: https://www.zerotier.com -%if 0%{?rhel} >= 7 -BuildRequires: systemd -%endif +# Fedora -%if 0%{?fedora} >= 21 -BuildRequires: systemd -%endif - -Requires: iproute libstdc++ openssl -AutoReqProv: no - -%if 0%{?rhel} >= 7 -Requires: systemd +%if "%{?dist}" == ".fc35" +BuildRequires: systemd clang openssl openssl-devel +Requires: systemd openssl Requires(pre): /usr/sbin/useradd, /usr/bin/getent %endif -%if 0%{?rhel} <= 6 -Requires: chkconfig +%if "%{?dist}" == ".fc36" +BuildRequires: systemd clang openssl1.1 openssl1.1-devel +Requires: systemd openssl1.1 +Requires(pre): /usr/sbin/useradd, /usr/bin/getent %endif -%if 0%{?fedora} >= 21 -Requires: systemd +%if "%{?dist}" == ".fc37" +BuildRequires: systemd clang openssl1.1 openssl1.1-devel +Requires: systemd openssl1.1 +Requires(pre): /usr/sbin/useradd, /usr/bin/getent +%endif + +# RHEL + +%if "%{?dist}" == ".el6" +Requires: chkconfig +Requires(pre): /usr/sbin/useradd, /usr/bin/getent +%endif + +%if "%{?dist}" == ".el7" +BuildRequires: systemd openssl11-devel +Requires: systemd openssl11 +Requires(pre): /usr/sbin/useradd, /usr/bin/getent +%endif + +%if "%{?dist}" == ".el8" +BuildRequires: systemd openssl-devel +Requires: systemd openssl +Requires(pre): /usr/sbin/useradd, /usr/bin/getent +%endif + +%if "%{?dist}" == ".el9" +BuildRequires: systemd openssl-devel +Requires: systemd openssl +Requires(pre): /usr/sbin/useradd, /usr/bin/getent +%endif + +# Amazon + +%if "%{?dist}" == ".amzn2" +BuildRequires: systemd openssl-devel +Requires: systemd openssl Requires(pre): /usr/sbin/useradd, /usr/bin/getent %endif @@ -44,123 +72,60 @@ like conventional VPNs or VLANs. It can run on native systems, VMs, or containers (Docker, OpenVZ, etc.). %prep -%if 0%{?rhel} >= 7 -rm -rf * -ln -s %{getenv:PWD} %{name}-%{version} -tar --exclude=%{name}-%{version}/.git --exclude=%{name}-%{version}/%{name}-%{version} -czf %{_sourcedir}/%{name}-%{version}.tar.gz %{name}-%{version}/* -rm -f %{name}-%{version} -cp -a %{getenv:PWD}/* . -%endif +# ls -la +# %if 0%{?rhel} && 0%{?rhel} >= 7 +# rm -rf * +# ln -s %{getenv:PWD} %{name}-%{version} +# tar --exclude=%{name}-%{version}/.git --exclude=%{name}-%{version}/%{name}-%{version} -czf %{_sourcedir}/%{name}-%{version}.tar.gz %{name}-%{version}/* +# rm -f %{name}-%{version} +# cp -a %{getenv:PWD}/* . +# %endif %build -#%if 0%{?rhel} <= 7 -#make CFLAGS="`echo %{optflags} | sed s/stack-protector-strong/stack-protector/`" CXXFLAGS="`echo %{optflags} | sed s/stack-protector-strong/stack-protector/`" ZT_USE_MINIUPNPC=1 %{?_smp_mflags} one manpages selftest -#%else -%if 0%{?rhel} >= 7 -make ZT_USE_MINIUPNPC=1 %{?_smp_mflags} one +%if "%{?dist}" == ".el6" +make RUST_BACKTRACE=full ZT_USE_MINIUPNPC=1 %{?_smp_mflags} from_builder +%else +make RUST_BACKTRACE=full ZT_USE_MINIUPNPC=1 %{?_smp_mflags} one %endif %pre -%if 0%{?rhel} >= 7 /usr/bin/getent passwd zerotier-one || /usr/sbin/useradd -r -d /var/lib/zerotier-one -s /sbin/nologin zerotier-one -%endif -%if 0%{?fedora} >= 21 -/usr/bin/getent passwd zerotier-one || /usr/sbin/useradd -r -d /var/lib/zerotier-one -s /sbin/nologin zerotier-one -%endif %install -rm -rf $RPM_BUILD_ROOT -%if 0%{?rhel} < 7 -pushd %{getenv:PWD} -%endif +# rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -%if 0%{?rhel} < 7 -popd -%endif -%if 0%{?rhel} >= 7 mkdir -p $RPM_BUILD_ROOT%{_unitdir} cp %{getenv:PWD}/debian/zerotier-one.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service -%endif -%if 0%{?fedora} >= 21 -mkdir -p $RPM_BUILD_ROOT%{_unitdir} -cp ${getenv:PWD}/debian/zerotier-one.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service -%endif -%if 0%{?rhel} <= 6 -mkdir -p $RPM_BUILD_ROOT/etc/init.d + +%if 0%{?rhel} && 0%{?rhel} <= 6 +mkdir -p $RPM_BUILD_ROOT/etc/init.d/ cp %{getenv:PWD}/ext/installfiles/linux/zerotier-one.init.rhel6 $RPM_BUILD_ROOT/etc/init.d/zerotier-one -chmod 0755 $RPM_BUILD_ROOT/etc/init.d/zerotier-one +chmod 700 $RPM_BUILD_ROOT/etc/init.d/${name} %endif %files %{_sbindir}/* %{_mandir}/* %{_localstatedir}/* -%if 0%{?rhel} >= 7 -%{_unitdir}/%{name}.service -%endif -%if 0%{?fedora} >= 21 -%{_unitdir}/%{name}.service -%endif -%if 0%{?rhel} <= 6 + +%if 0%{?rhel} && 0%{?rhel} <= 6 /etc/init.d/zerotier-one +%else +%{_unitdir}/%{name}.service %endif %post -%if 0%{?rhel} >= 7 +%if ! 0%{?rhel} && 0%{?rhel} <= 6 %systemd_post zerotier-one.service %endif -%if 0%{?fedora} >= 21 -%systemd_post zerotier-one.service -%endif -%if 0%{?rhel} <= 6 -case "$1" in - 1) - chkconfig --add zerotier-one - ;; - 2) - chkconfig --del zerotier-one - chkconfig --add zerotier-one - ;; -esac -if [ -x /usr/bin/checkmodule -a -x /usr/bin/semodule_package -a -x /usr/sbin/semodule ]; then - rm -f /var/lib/zerotier-one/zerotier-one.mod - /usr/bin/checkmodule -M -m -o /var/lib/zerotier-one/zerotier-one.mod /var/lib/zerotier-one/zerotier-one.te - if [ -f /var/lib/zerotier-one/zerotier-one.pp ]; then - rm -f /var/lib/zerotier-one/zerotier-one.pp - /usr/bin/semodule_package -o /var/lib/zerotier-one/zerotier-one.pp -m /var/lib/zerotier-one/zerotier-one.mod - /usr/sbin/semodule -u /var/lib/zerotier-one/zerotier-one.pp - else - /usr/bin/semodule_package -o /var/lib/zerotier-one/zerotier-one.pp -m /var/lib/zerotier-one/zerotier-one.mod - /usr/sbin/semodule -i /var/lib/zerotier-one/zerotier-one.pp - fi -fi -%endif %preun -%if 0%{?rhel} >= 7 +%if ! 0%{?rhel} && 0%{?rhel} <= 6 %systemd_preun zerotier-one.service %endif -%if 0%{?fedora} >= 21 -%systemd_preun zerotier-one.service -%endif -%if 0%{?rhel} <= 6 -case "$1" in - 0) - service zerotier-one stop - chkconfig --del zerotier-one - ;; - 1) - # This is an upgrade. - : - ;; -esac -%endif %postun -%if 0%{?rhel} >= 7 -%systemd_postun_with_restart zerotier-one.service -%endif -%if 0%{?fedora} >= 21 +%if ! 0%{?rhel} && 0%{?rhel} <= 6 %systemd_postun_with_restart zerotier-one.service %endif @@ -168,16 +133,16 @@ esac * Tue May 10 2022 Adam Ierymenko - 1.8.10 - see https://github.com/zerotier/ZeroTierOne for release notes -* Fri Apr 25 2022 Adam Ierymenko - 1.8.9 +* Mon Apr 25 2022 Adam Ierymenko - 1.8.9 - see https://github.com/zerotier/ZeroTierOne for release notes -* Fri Apr 11 2022 Adam Ierymenko - 1.8.8 +* Mon Apr 11 2022 Adam Ierymenko - 1.8.8 - see https://github.com/zerotier/ZeroTierOne for release notes -* Fri Mar 21 2022 Adam Ierymenko - 1.8.7 +* Mon Mar 21 2022 Adam Ierymenko - 1.8.7 - see https://github.com/zerotier/ZeroTierOne for release notes -* Fri Mar 07 2022 Adam Ierymenko - 1.8.6 +* Mon Mar 07 2022 Adam Ierymenko - 1.8.6 - see https://github.com/zerotier/ZeroTierOne for release notes * Fri Dec 17 2021 Adam Ierymenko - 1.8.5 @@ -195,7 +160,7 @@ esac * Wed Oct 20 2021 Adam Ierymenko - 1.8.1 - see https://github.com/zerotier/ZeroTierOne for release notes -* Tue Sep 15 2021 Adam Ierymenko - 1.8.0 +* Wed Sep 15 2021 Adam Ierymenko - 1.8.0 - see https://github.com/zerotier/ZeroTierOne for release notes * Tue Apr 13 2021 Adam Ierymenko - 1.6.5