upend/.woodpecker.yml

150 lines
3.4 KiB
YAML
Raw Normal View History

pipeline:
2023-08-12 12:08:52 +02:00
prepare:cache:frontend:
group: init
image: albedo.lan:5000/node-upend:latest
pull: true
commands:
- pnpm config set store-dir $PWD/.pnpm
prepare:cache:backend:
group: init
image: albedo.lan:5000/rust-upend:latest
pull: true
environment:
CARGO_HOME: ${CI_WORKSPACE}/.cargo
2023-08-12 12:08:52 +02:00
commands:
- cp -vr /usr/local/cargo $CARGO_HOME
prepare:build:wasmlib:
2023-07-12 12:12:47 +02:00
image: albedo.lan:5000/rust-upend:latest
pull: true
2023-08-12 12:08:52 +02:00
environment:
CARGO_HOME: ${CI_WORKSPACE}/.cargo
2023-07-12 12:12:47 +02:00
commands:
- rustc --version && cargo --version
- task build:wasmlib
# volumes:
# - rust_registry:/usr/local/cargo
build:backend:
group: build
2023-07-11 20:55:28 +02:00
image: albedo.lan:5000/rust-upend:latest
pull: true
2023-08-12 12:08:52 +02:00
environment:
CARGO_HOME: ${CI_WORKSPACE}/.cargo
commands:
- rustc --version && cargo --version
- task build:backend
# volumes:
# - rust_registry:/usr/local/cargo
build:frontend:
group: build
2023-07-11 21:07:50 +02:00
image: albedo.lan:5000/node-upend:latest
pull: true
commands:
- node --version && npm --version
- task build:frontend
lint:backend:
group: lint
2023-07-11 20:55:28 +02:00
image: albedo.lan:5000/rust-upend:latest
pull: true
2023-08-12 12:08:52 +02:00
environment:
CARGO_HOME: ${CI_WORKSPACE}/.cargo
commands:
- rustup component add clippy
- task lint:backend
- git status -vvv
# volumes:
# - rust_registry:/usr/local/cargo
when:
path:
- migrations/**/*
- /**/*.rs
- /**/Cargo.lock
- Taskfile.yml
lint:frontend:
group: lint
2023-07-11 21:07:50 +02:00
image: albedo.lan:5000/node-upend:latest
pull: true
commands:
- node --version && npm --version
- task lint:frontend
2023-06-03 12:09:50 +02:00
when:
path:
- webui/**/*
- Taskfile.yml
lint:jslib:
group: lint
2023-07-11 21:07:50 +02:00
image: albedo.lan:5000/node-upend:latest
pull: true
commands:
- node --version && npm --version
- task lint:jslib
2023-06-03 12:09:50 +02:00
when:
path:
- tools/upend_js/**/*
- Taskfile.yml
lint:webext:
group: lint
2023-07-11 21:07:50 +02:00
image: albedo.lan:5000/node-upend:latest
pull: true
commands:
- node --version && npm --version
- task lint:webext
2023-06-03 12:09:50 +02:00
when:
path:
- webext/**/*
- Taskfile.yml
test:backend:
group: test
2023-07-11 20:55:28 +02:00
image: albedo.lan:5000/rust-upend:latest
pull: true
2023-08-12 12:08:52 +02:00
environment:
CARGO_HOME: ${CI_WORKSPACE}/.cargo
commands:
- task test:backend
# volumes:
# - rust_registry:/usr/local/cargo
package:
2023-08-11 18:31:08 +02:00
image: albedo.lan:5000/upend-deploy:latest
pull: true
commands:
- git status -vvv
- task package
2023-08-11 18:31:08 +02:00
publish-nightly:
image: albedo.lan:5000/upend-deploy:latest
pull: true
commands:
- echo -e "$GPG_SIGN_KEY" | gpg --import
- gpg --clear-sign "*.AppImage"
- mkdir -p $HOME/.ssh
- echo -e "$SSH_CONFIG" > $HOME/.ssh/config
- echo -e "$SSH_UPLOAD_KEY" > $HOME/.ssh/id_rsa
- echo -e "$SSH_KNOWN_HOSTS" > $HOME/.ssh/known_hosts
- chmod 600 $HOME/.ssh/*
- scp "*.AppImage" "*.asc" mainsite:releases
secrets: [gpg_sign_key, ssh_config, ssh_upload_key, ssh_known_hosts]
publish:
image: woodpeckerci/plugin-gitea-release
settings:
base_url: https://git.thm.place
files:
- "*.AppImage"
2023-08-11 18:31:08 +02:00
- "*.asc"
- webext/web-ext-artifacts/*.zip
checksum: sha512
api_key:
2023-06-03 16:31:50 +02:00
from_secret: woodpecker_api_key
target: main
when:
event: [tag]