141 lines
3.1 KiB
YAML
141 lines
3.1 KiB
YAML
---
|
|
kind: pipeline
|
|
name: coopcloud.tech/abra
|
|
steps:
|
|
- name: make check
|
|
image: golang:1.24
|
|
commands:
|
|
- make check
|
|
|
|
- name: xgettext-go
|
|
image: git.coopcloud.tech/toolshed/drone-xgettext-go:latest
|
|
settings:
|
|
keyword: i18n.G
|
|
out: pkg/i18n/locales/abra.pot
|
|
comments_tag: translators
|
|
depends_on:
|
|
- make check
|
|
|
|
- name: xgettext-go status
|
|
image: golang:1.24-alpine3.22
|
|
commands:
|
|
- apk add patchutils git make
|
|
- cd /drone/src
|
|
- sed -i "s/charset=CHARSET/charset=UTF-8/g" pkg/i18n/locales/*.pot
|
|
- git diff pkg/i18n/locales/abra.pot | grepdiff --output-matching=hunk POT-Creation-Date | git apply --reverse --allow-empty
|
|
- git diff
|
|
- git diff-files --exit-code
|
|
depends_on:
|
|
- xgettext-go
|
|
|
|
- name: make test
|
|
image: golang:1.24
|
|
environment:
|
|
ABRA_DIR: $HOME/.abra
|
|
CATL_URL: https://git.coopcloud.tech/toolshed/recipes-catalogue-json.git
|
|
commands:
|
|
- mkdir -p $HOME/.abra
|
|
- git clone $CATL_URL $HOME/.abra/catalogue
|
|
- make test
|
|
depends_on:
|
|
- make check
|
|
|
|
- name: fetch
|
|
image: docker:git
|
|
commands:
|
|
- git fetch --tags
|
|
depends_on:
|
|
- make check
|
|
- make test
|
|
when:
|
|
event: tag
|
|
|
|
- name: release
|
|
image: goreleaser/goreleaser:v2.5.1
|
|
environment:
|
|
GITEA_TOKEN:
|
|
from_secret: goreleaser_gitea_token
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- goreleaser release
|
|
depends_on:
|
|
- fetch
|
|
when:
|
|
event: tag
|
|
|
|
- name: publish image
|
|
image: plugins/docker
|
|
settings:
|
|
auto_tag: true
|
|
username: abra-bot
|
|
password:
|
|
from_secret: git_coopcloud_tech_token_abra_bot
|
|
repo: git.coopcloud.tech/toolshed/abra
|
|
tags: dev
|
|
registry: git.coopcloud.tech
|
|
when:
|
|
branch:
|
|
- main
|
|
depends_on:
|
|
- make check
|
|
- make test
|
|
|
|
- name: on-demand integration test
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host:
|
|
- int.coopcloud.tech
|
|
username: abra
|
|
key:
|
|
from_secret: abra_int_private_key
|
|
port: 22
|
|
command_timeout: 60m
|
|
script_stop: true
|
|
request_pty: true
|
|
script:
|
|
- |
|
|
wget https://git.coopcloud.tech/toolshed/abra/raw/branch/main/scripts/tests/run-ci-int -O run-ci-int
|
|
chmod +x run-ci-int
|
|
sh run-ci-int
|
|
when:
|
|
ref:
|
|
- refs/heads/int-*
|
|
depends_on:
|
|
- make check
|
|
- make test
|
|
|
|
- name: nightly integration test
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host:
|
|
- int.coopcloud.tech
|
|
username: abra
|
|
key:
|
|
from_secret: abra_int_private_key
|
|
port: 22
|
|
command_timeout: 60m
|
|
script_stop: true
|
|
request_pty: true
|
|
script:
|
|
- |
|
|
wget https://git.coopcloud.tech/toolshed/abra/raw/branch/main/scripts/tests/run-ci-int -O run-ci-int
|
|
chmod +x run-ci-int
|
|
sh run-ci-int
|
|
when:
|
|
event:
|
|
- cron:
|
|
cron:
|
|
# @daily https://docs.drone.io/cron/
|
|
- integration
|
|
|
|
volumes:
|
|
- name: deps
|
|
temp: {}
|
|
|
|
trigger:
|
|
action:
|
|
exclude:
|
|
- synchronized
|