bitque/.builds/client.yml
2021-01-07 09:13:13 +01:00

39 lines
1.1 KiB
YAML

image: archlinux
packages:
- nodejs
- rustup
- yarn
sources:
- https://git.sr.ht/~tsumanu/jirs
environment:
deploy: adrian.wozniak@ita-prog.pl
DEBUG: false
JIRS_CLIENT_PORT: 80
JIRS_CLIENT_BIND: jirs.ita-prog.pl
JIRS_SERVER_PORT: 80
JIRS_SERVER_BIND: jirs.ita-prog.pl
CI: true
secrets:
- 7ebab768-e5e4-4c9d-ba57-ec41a72c5665
- 46f739e5-4538-45dd-a79f-bf173b7a2ed9
tasks:
- setup: |
rustup toolchain install nightly
rustup default nightly
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sudo sh
- test: |
cd ~/jirs/jirs-client
export NODE_ENV=development
wasm-pack test --node
- build: |
cd ~/jirs/jirs-client
export NODE_ENV=production
./scripts/prod.sh
export TAR_NAME=$(date -u +"%Y%m%d%H%M%s")
tar -cJvf ~/${TAR_NAME}.tar.xz ./build
cp ~/${TAR_NAME}.tar.xz ~/latest.tar.xz
scp ~/latest.tar.xz rpi.ita-prog.pl:/www/http/static/jirs-client-{TAR_NAME}.tar.xz
scp ~/latest.tar.xz rpi.ita-prog.pl:/www/http/static/jirs-client-latest.tar.xz
artifacts:
- latest.tar.gz