reveil/.drone.yml

117 lines
2.6 KiB
YAML
Raw Normal View History

2022-10-15 12:27:26 +00:00
---
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
2024-10-29 00:42:39 +00:00
image: node:22
2022-10-15 12:27:26 +00:00
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
2024-06-18 16:34:54 +00:00
- 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}
2022-10-15 12:27:26 +00:00
- ln deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} reveil
when:
event:
exclude:
- tag
2023-10-22 09:20:09 +00:00
- name: build armv7 tag
2022-10-15 12:27:26 +00:00
image: golang:1-alpine
commands:
- apk --no-cache add alsa-lib-dev build-base git pkgconf
- go get -v -d
2024-06-18 16:34:54 +00:00
- 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
2023-10-17 18:56:39 +00:00
- ln deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7 reveil
2022-10-15 12:27:26 +00:00
when:
event:
- tag
2023-10-22 09:20:09 +00:00
- 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
2023-10-22 09:20:09 +00:00
environment:
CGO_ENABLED: 0
GOARM: 6
when:
event:
- tag
2022-12-06 15:41:49 +00:00
- name: gitea release
2023-02-12 09:20:44 +00:00
image: plugins/gitea-release:linux-arm
2022-12-06 15:41:49 +00:00
settings:
api_key:
from_secret: gitea_api_key
base_url: https://git.nemunai.re/
2023-10-17 18:56:39 +00:00
files:
- deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}hf
- deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7
2022-12-06 15:41:49 +00:00
when:
event:
- tag
2022-10-15 12:27:26 +00:00
- name: docker
2023-02-12 09:20:44 +00:00
image: plugins/docker:linux-arm
2022-10-15 12:27:26 +00:00
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