ci: build & deploy nightlies
ci/woodpecker/push/woodpecker Pipeline failed
Details
ci/woodpecker/push/woodpecker Pipeline failed
Details
parent
b9325fba20
commit
f5b87d31c0
|
@ -1,4 +1,6 @@
|
|||
/dist
|
||||
/*.AppImage
|
||||
/*.asc
|
||||
|
||||
/target
|
||||
**/*.rs.bk
|
||||
|
|
|
@ -7,12 +7,6 @@ pipeline:
|
|||
- task build:wasmlib
|
||||
# volumes:
|
||||
# - rust_registry:/usr/local/cargo
|
||||
when:
|
||||
path:
|
||||
- webui/**/*
|
||||
- /**/*.rs
|
||||
- /**/Cargo.lock
|
||||
- Taskfile.yml
|
||||
|
||||
build:backend:
|
||||
group: build
|
||||
|
@ -23,12 +17,6 @@ pipeline:
|
|||
- task build:backend
|
||||
# volumes:
|
||||
# - rust_registry:/usr/local/cargo
|
||||
when:
|
||||
path:
|
||||
- migrations/**/*
|
||||
- /**/*.rs
|
||||
- /**/Cargo.lock
|
||||
- Taskfile.yml
|
||||
|
||||
build:frontend:
|
||||
group: build
|
||||
|
@ -37,10 +25,6 @@ pipeline:
|
|||
commands:
|
||||
- node --version && npm --version
|
||||
- task build:frontend
|
||||
when:
|
||||
path:
|
||||
- webui/**/*
|
||||
- Taskfile.yml
|
||||
|
||||
lint:backend:
|
||||
group: lint
|
||||
|
@ -103,15 +87,9 @@ pipeline:
|
|||
- task test:backend
|
||||
# volumes:
|
||||
# - rust_registry:/usr/local/cargo
|
||||
when:
|
||||
path:
|
||||
- migrations/**/*
|
||||
- /**/*.rs
|
||||
- /**/Cargo.lock
|
||||
- Taskfile.yml
|
||||
|
||||
package:
|
||||
image: albedo.lan:5000/rust-upend:latest
|
||||
image: albedo.lan:5000/upend-deploy:latest
|
||||
pull: true
|
||||
commands:
|
||||
- cd ./.ci_tmp/
|
||||
|
@ -122,8 +100,20 @@ pipeline:
|
|||
- cd -
|
||||
- git status -vvv
|
||||
- task package
|
||||
when:
|
||||
event: [tag]
|
||||
|
||||
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
|
||||
|
@ -131,6 +121,7 @@ pipeline:
|
|||
base_url: https://git.thm.place
|
||||
files:
|
||||
- "*.AppImage"
|
||||
- "*.asc"
|
||||
- webext/web-ext-artifacts/*.zip
|
||||
checksum: sha512
|
||||
api_key:
|
||||
|
|
28
Taskfile.yml
28
Taskfile.yml
|
@ -13,13 +13,13 @@ tasks:
|
|||
cmds:
|
||||
- rm -fr dist
|
||||
- linuxdeploy-x86_64.AppImage --appdir dist
|
||||
- cp target/release/upend-cli dist/usr/bin/upend
|
||||
- cp -v target/release/upend-cli dist/usr/bin/upend
|
||||
- cp -r webui/dist dist/usr/bin/webui
|
||||
- cp assets/upend.png dist/usr/share/icons/upend.png
|
||||
- linuxdeploy-x86_64.AppImage --appdir dist -d upend.desktop --output appimage
|
||||
vars:
|
||||
VERSION:
|
||||
sh: grep '^version' Cargo.toml|grep -Eo '[0-9]+\.[0-9]+\.[0-9]+'
|
||||
- linuxdeploy-x86_64.AppImage --appdir dist -d build/upend.desktop --output appimage
|
||||
env:
|
||||
LINUXDEPLOY_OUTPUT_VERSION:
|
||||
sh: ./build/get_version.sh
|
||||
|
||||
lint:
|
||||
deps: [lint:frontend, lint:backend, lint:jslib, lint:webext]
|
||||
|
@ -144,6 +144,24 @@ tasks:
|
|||
cmds:
|
||||
- pnpm install --frozen-lockfile
|
||||
|
||||
build:docker:
|
||||
deps: [build:docker:node, build:docker:rust, build:docker:deploy]
|
||||
|
||||
build:docker:node:
|
||||
dir: build/upend-node
|
||||
cmds:
|
||||
- docker build -t upend-node -t localhost:5000/upend-node .
|
||||
|
||||
build:docker:rust:
|
||||
dir: build/upend-rust
|
||||
cmds:
|
||||
- docker build -t upend-rust -t localhost:5000/upend-rust .
|
||||
|
||||
build:docker:deploy:
|
||||
dir: build/upend-deploy
|
||||
cmds:
|
||||
- docker build -t upend-deploy -t localhost:5000/upend-deploy .
|
||||
|
||||
dev:update_tool_deps:
|
||||
cmds:
|
||||
- task: build:jslib
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
git_tag=$(git describe --tags --exact-match HEAD 2>/dev/null)
|
||||
|
||||
if [ -z "$git_tag" ]; then
|
||||
echo "dev_$(git rev-parse --short HEAD)"
|
||||
else
|
||||
echo "$git_tag" | sed -e 's/^v//g'
|
||||
fi
|
|
@ -0,0 +1,2 @@
|
|||
FROM alpine:latest
|
||||
RUN apk add --no-cache gnupg openssh-client
|
|
@ -1,5 +1,4 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Categories=Utility
|
||||
Terminal=false
|
Loading…
Reference in New Issue