Files
LinkPort/.drone.yml
T

63 lines
2.1 KiB
YAML

kind: pipeline
name: default
environment:
http_proxy: http://192.168.9.1:7893
https_proxy: http://192.168.9.1:7893
no_proxy: localhost,127.0.0.1,::1
HTTP_PROXY: http://192.168.9.1:7893
HTTPS_PROXY: http://192.168.9.1:7893
NO_PROXY: localhost,127.0.0.1,::1
clone:
disable: true
steps:
- name: clone
image: alpine:3.22
commands:
- apk add --no-cache git ca-certificates
- |
set -eu
set +x
: "$${DRONE_GIT_HTTP_URL:?}" "$${DRONE_COMMIT_SHA:?}"
if test -n "$${DRONE_NETRC_MACHINE:-}"; then
(umask 077; printf 'machine %s\nlogin %s\npassword %s\n' "$DRONE_NETRC_MACHINE" "$DRONE_NETRC_USERNAME" "$DRONE_NETRC_PASSWORD" > "$HOME/.netrc")
fi
git clone --no-checkout -- "$DRONE_GIT_HTTP_URL" .
if test -n "$${DRONE_COMMIT_REF:-}"; then
git fetch --no-tags origin "$DRONE_COMMIT_REF"
fi
git cat-file -e "$DRONE_COMMIT_SHA^{commit}" 2>/dev/null || git fetch --no-tags origin "$DRONE_COMMIT_SHA"
git checkout --detach "$DRONE_COMMIT_SHA"
test "$(git rev-parse HEAD)" = "$DRONE_COMMIT_SHA" || { echo 'Checked out commit does not match this build'; exit 1; }
- name: frontend-build
image: node:22.19.0-alpine
commands:
- npm --prefix web ci --no-audit --no-fund
- npm --prefix web run build
- name: build-binaries
image: golang:1.25.0-alpine
environment:
GOTOOLCHAIN: go1.25.0
CGO_ENABLED: "0"
BUILD_JOBS: "1"
GO_BUILD_PARALLELISM: "1"
commands:
- apk add --no-cache git
- sh scripts/build-ci-release.sh
- name: package
image: node:22.19.0-alpine
environment:
IPFS_API: https://ipfs.freeicu.top
IPFS_TOKEN: "674d69308edc52450a5fff0e64947703de3d47d723810b53833ec9d4e999f20e"
commands:
- apk add --no-cache libarchive-tools curl
- node --test scripts/build-ci-release.test.mjs scripts/ci-release.test.mjs
- node scripts/verify-package.mjs bin/build-cache/ci-release/linux-amd64/linkport
- node scripts/ci-release.mjs package
- node scripts/ci-release.mjs upload