debug: CI: switch to local env vars for passing DATABASE_URL
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
a0144bcf9b
commit
e1c475d05a
2 changed files with 10 additions and 5 deletions
|
@ -2,7 +2,7 @@ pipeline:
|
||||||
backend:
|
backend:
|
||||||
image: rust
|
image: rust
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL="postgres://postgres:password@database:5432/postgres"
|
- PG_DATABASE_URL=postgres://postgres:password@database:5432/postgres
|
||||||
commands:
|
commands:
|
||||||
- curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
|
- curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
|
||||||
- apt update && apt-get -y --no-install-recommends install nodejs
|
- apt update && apt-get -y --no-install-recommends install nodejs
|
||||||
|
@ -11,9 +11,10 @@ pipeline:
|
||||||
# rewrite conducotr configuration
|
# rewrite conducotr configuration
|
||||||
- sed -i 's%url = "http:\/\/localhost:5000"%url = "http:\/\/librepages-conductor:5000"%' config/default.toml
|
- sed -i 's%url = "http:\/\/localhost:5000"%url = "http:\/\/librepages-conductor:5000"%' config/default.toml
|
||||||
- make dev-env
|
- make dev-env
|
||||||
- make migrate
|
- make build
|
||||||
|
- DATABASE_URL=PG_DATABASE_URL make migrate
|
||||||
- make lint
|
- make lint
|
||||||
- make test
|
- DATABASE_URL=PG_DATABASE_URL make test
|
||||||
|
|
||||||
build_docker_img:
|
build_docker_img:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -7,6 +7,10 @@ default: ## Debug build
|
||||||
$(call cache_bust)
|
$(call cache_bust)
|
||||||
cargo run -- serve
|
cargo run -- serve
|
||||||
|
|
||||||
|
build: ## Debug build
|
||||||
|
$(call cache_bust)
|
||||||
|
cargo build
|
||||||
|
|
||||||
cache-bust: ## Run cache buster on static assets
|
cache-bust: ## Run cache buster on static assets
|
||||||
$(call cache_bust)
|
$(call cache_bust)
|
||||||
|
|
||||||
|
@ -23,7 +27,7 @@ coverage: ## Generate HTML code coverage
|
||||||
|
|
||||||
dev-env: ## Download development dependencies
|
dev-env: ## Download development dependencies
|
||||||
npm install
|
npm install
|
||||||
unset DATABASE_URL && cargo fetch
|
cargo fetch
|
||||||
|
|
||||||
doc: ## Prepare documentation
|
doc: ## Prepare documentation
|
||||||
cargo doc --no-deps --workspace --all-features
|
cargo doc --no-deps --workspace --all-features
|
||||||
|
@ -45,7 +49,7 @@ lint: ## Lint codebase
|
||||||
|
|
||||||
migrate: ## run migrations
|
migrate: ## run migrations
|
||||||
$(call cache_bust)
|
$(call cache_bust)
|
||||||
unset DATABASE_URL && echo ${DATABASE_URL} && cargo build
|
unset DATABASE_URL && cargo build
|
||||||
DATABASE_URL=${DATABASE_URL} cargo run -- migrate
|
DATABASE_URL=${DATABASE_URL} cargo run -- migrate
|
||||||
|
|
||||||
release: ## Release build
|
release: ## Release build
|
||||||
|
|
Loading…
Add table
Reference in a new issue