survey/.woodpecker.yml

60 lines
2 KiB
YAML
Raw Normal View History

2023-01-08 20:21:46 +05:30
pipeline:
backend:
image: rust
environment:
- DATABASE_URL=postgres://postgres:password@database:5432/postgres
- GIT_HASH=8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
- OPEN_API_DOCS=8e77345f1597e40c2e266cb4e6dee74888918a61
- COMPILED_DATE=2021-07-21
commands:
- apt-get update
2023-11-01 19:30:26 +05:30
- apt-get install -y ca-certificates curl gnupg tar wget libssl-dev
- mkdir -p /etc/apt/keyrings
- curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
- NODE_MAJOR=18 echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
- apt-get -y install nodejs npm
2023-01-08 20:21:46 +05:30
- npm install --global yarn
- rustup component add rustfmt
- rustup component add clippy
- make dev-env
- make migrate
- make frontend
- make test
build_docker_img:
image: plugins/docker
when:
event: [pull_request]
settings:
dry_run: true
repo: mcaptcha/survey
tags: latest
build_and_publish_docker_img:
image: plugins/docker
when:
event: [push, tag, deployment]
settings:
username: mcaptcha
password:
from_secret: DOCKER_TOKEN
repo: mcaptcha/survey
tags: latest
# publish_bins:
# image: rust
# when:
# event: [push, tag, deployment]
# commands:
# - apt update
# - apt-get -y --no-install-recommends install gpg tar curl wget
# - echo -n "$RELEASE_BOT_GPG_SIGNING_KEY" | gpg --batch --import --pinentry-mode loopback
# - scripts/bin-publish.sh publish master latest $DUMBSERVE_PASSWORD
# secrets: [RELEASE_BOT_GPG_SIGNING_KEY, DUMBSERVE_PASSWORD, GPG_PASSWORD]
services:
database:
image: postgres
environment:
- POSTGRES_PASSWORD=password