debug: CI: switch to local env vars for passing DATABASE_URL
ci/woodpecker/push/woodpecker Pipeline failed Details

This commit is contained in:
Aravinth Manivannan 2022-12-19 12:19:58 +05:30
parent a0144bcf9b
commit e1c475d05a
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
2 changed files with 10 additions and 5 deletions

View File

@ -2,7 +2,7 @@ pipeline:
backend:
image: rust
environment:
- DATABASE_URL="postgres://postgres:password@database:5432/postgres"
- PG_DATABASE_URL=postgres://postgres:password@database:5432/postgres
commands:
- curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
- apt update && apt-get -y --no-install-recommends install nodejs
@ -11,9 +11,10 @@ pipeline:
# rewrite conducotr configuration
- sed -i 's%url = "http:\/\/localhost:5000"%url = "http:\/\/librepages-conductor:5000"%' config/default.toml
- make dev-env
- make migrate
- make build
- DATABASE_URL=PG_DATABASE_URL make migrate
- make lint
- make test
- DATABASE_URL=PG_DATABASE_URL make test
build_docker_img:
image: plugins/docker

View File

@ -7,6 +7,10 @@ default: ## Debug build
$(call cache_bust)
cargo run -- serve
build: ## Debug build
$(call cache_bust)
cargo build
cache-bust: ## Run cache buster on static assets
$(call cache_bust)
@ -23,7 +27,7 @@ coverage: ## Generate HTML code coverage
dev-env: ## Download development dependencies
npm install
unset DATABASE_URL && cargo fetch
cargo fetch
doc: ## Prepare documentation
cargo doc --no-deps --workspace --all-features
@ -45,7 +49,7 @@ lint: ## Lint codebase
migrate: ## run migrations
$(call cache_bust)
unset DATABASE_URL && echo ${DATABASE_URL} && cargo build
unset DATABASE_URL && cargo build
DATABASE_URL=${DATABASE_URL} cargo run -- migrate
release: ## Release build