wip: remote woodpecker CI config for the time being

Tomáš Mládek 2023-08-19 18:55:03 +02:00
parent 53e775b85d
commit 27f7941020
1 changed files with 0 additions and 213 deletions

View File

@ -1,213 +0,0 @@
pipeline:
cache:get:
image: meltwater/drone-cache:v1
pull: true
settings:
restore: true
endpoint:
from_secret: S3_ENDPOINT
access-key:
from_secret: S3_ACCESS_KEY
secret-key:
from_secret: S3_SECRET_KEY
bucket: "upend-ci-cache"
cache_key: "{{ .Commit.Branch }}"
path-style: true
region: anabasis
mount:
- ".cargo"
- "target"
- ".pnpm"
secrets: [S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY]
when:
event: push
prepare:cache:frontend:
group: init
image: albedo.lan:5000/upend-node:latest
pull: true
commands:
- pnpm config --location project set store-dir $CI_WORKSPACE/.pnpm
- mkdir -p $CI_WORKSPACE/.pnpm
prepare:cache:backend:
group: init
image: albedo.lan:5000/upend-rust:latest
pull: true
commands:
- export CARGO_HOME=$CI_WORKSPACE/.cargo
- test -d $CARGO_HOME || cp -vr /usr/local/cargo $CARGO_HOME
prepare:build:wasmlib:
image: albedo.lan:5000/upend-rust:latest
pull: true
commands:
- export CARGO_HOME=$CI_WORKSPACE/.cargo
- rustc --version && cargo --version
- task build:wasmlib
# volumes:
# - rust_registry:/usr/local/cargo
build:backend:
group: build
image: albedo.lan:5000/upend-rust:latest
pull: true
commands:
- export CARGO_HOME=$CI_WORKSPACE/.cargo
- rustc --version && cargo --version
- task build:backend
# volumes:
# - rust_registry:/usr/local/cargo
build:frontend:
group: build
image: albedo.lan:5000/upend-node:latest
pull: true
commands:
- node --version && npm --version
- task build:frontend
lint:backend:
group: lint
image: albedo.lan:5000/upend-rust:latest
pull: true
commands:
- export CARGO_HOME=$CI_WORKSPACE/.cargo
- 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
image: albedo.lan:5000/upend-node:latest
pull: true
commands:
- node --version && npm --version
- task lint:frontend
when:
path:
- webui/**/*
- Taskfile.yml
lint:jslib:
group: lint
image: albedo.lan:5000/upend-node:latest
pull: true
commands:
- node --version && npm --version
- task lint:jslib
when:
path:
- tools/upend_js/**/*
- Taskfile.yml
lint:webext:
group: lint
image: albedo.lan:5000/upend-node:latest
pull: true
commands:
- node --version && npm --version
- task lint:webext
when:
path:
- webext/**/*
- Taskfile.yml
test:backend:
group: test
image: albedo.lan:5000/upend-rust:latest
pull: true
commands:
- export CARGO_HOME=$CI_WORKSPACE/.cargo
- task test:backend
# volumes:
# - rust_registry:/usr/local/cargo
cache:push:
image: meltwater/drone-cache:v1
pull: true
settings:
rebuild: true
endpoint:
from_secret: S3_ENDPOINT
access-key:
from_secret: S3_ACCESS_KEY
secret-key:
from_secret: S3_SECRET_KEY
bucket: "upend-ci-cache"
cache_key: "{{ .Commit.Branch }}"
path-style: true
region: anabasis
mount:
- ".cargo"
- "target"
- ".pnpm"
secrets: [S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY]
when:
event: push
package:
image: albedo.lan:5000/upend-deploy:latest
pull: true
commands:
- git status -vvv
- task package
when:
event: [push, tag]
package:push:
image: woodpeckerci/plugin-s3
settings:
endpoint:
from_secret: S3_ENDPOINT
access_key:
from_secret: S3_ACCESS_KEY
secret_key:
from_secret: S3_SECRET_KEY
bucket: upend-ci-packages
path_style: true
region: anabasis
source: "*.AppImage"
target: /packages
secrets: [S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY]
publish:nightly:
image: albedo.lan:5000/upend-deploy:latest
pull: true
commands:
- echo "$GPG_SIGN_KEY" | gpg --import
- mkdir -p $HOME/.ssh
- echo "$SSH_CONFIG" > $HOME/.ssh/config
- echo "$SSH_UPLOAD_KEY" > $HOME/.ssh/id_rsa
- echo "$SSH_KNOWN_HOSTS" > $HOME/.ssh/known_hosts
- chmod 600 $HOME/.ssh/*
- gpg --clear-sign *.AppImage
- scp -v *.AppImage *.asc mainsite:releases/nightly
secrets: [gpg_sign_key, ssh_config, ssh_upload_key, ssh_known_hosts]
when:
event: push
branch: main
publish:release:
image: woodpeckerci/plugin-gitea-release
settings:
base_url: https://git.thm.place
files:
- "*.AppImage"
- "*.asc"
- webext/web-ext-artifacts/*.zip
checksum: sha512
api_key:
from_secret: woodpecker_api_key
target: main
when:
event: [tag]