reveil/.drone.yml
Renovate Bot f8a7f057e7
All checks were successful
continuous-integration/drone/push Build is passing
chore(deps): update node.js to v22
2024-10-29 00:42:39 +00:00

117 lines
2.6 KiB
YAML

---
kind: pipeline
type: docker
name: build-arm
platform:
os: linux
arch: arm
workspace:
base: /go
path: src/git.nemunai.re/nemunaire/reveil
steps:
- name: build front
image: node:22
commands:
- mkdir deploy
- cd ui
- npm install --network-timeout=100000
- npm run build
- tar chjf ../deploy/static.tar.bz2 build
- name: build
image: golang:1-alpine
commands:
- apk --no-cache add alsa-lib-dev build-base git pkgconf
- go get -v -d
- go vet -v -tags pulse
- go build -tags pulse -ldflags '-w -X main.Version=${DRONE_BRANCH}-${DRONE_COMMIT} -X main.build=${DRONE_BUILD_NUMBER}' -o deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- ln deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} reveil
when:
event:
exclude:
- tag
- name: build armv7 tag
image: golang:1-alpine
commands:
- apk --no-cache add alsa-lib-dev build-base git pkgconf
- go get -v -d
- go vet -v -tags pulse
- go build -tags pulse -ldflags '-w -X main.Version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -o deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7
- ln deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7 reveil
when:
event:
- tag
- name: build armv6 tag
image: golang:1-alpine
commands:
- apk --no-cache add alsa-lib-dev build-base git pkgconf
- go build -tags pulse,netgo -ldflags '-w -X main.Version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -o deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}hf
environment:
CGO_ENABLED: 0
GOARM: 6
when:
event:
- tag
- name: gitea release
image: plugins/gitea-release:linux-arm
settings:
api_key:
from_secret: gitea_api_key
base_url: https://git.nemunai.re/
files:
- deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}hf
- deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7
when:
event:
- tag
- name: docker
image: plugins/docker:linux-arm
settings:
registry: registry.nemunai.re
repo: registry.nemunai.re/reveil
auto_tag: true
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
dockerfile: Dockerfile-norebuild
username:
from_secret: docker_username
password:
from_secret: docker_password
trigger:
event:
- cron
- push
- tag
---
kind: pipeline
name: docker-manifest
steps:
- name: publish on Docker Hub
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
spec: .drone-manifest.yml
username:
from_secret: docker_username
password:
from_secret: docker_password
trigger:
event:
- cron
- push
- tag
depends_on:
- build-arm