Skip to content

Commit e4b6ba4

Browse files
committed
try without
1 parent 32e566c commit e4b6ba4

File tree

5 files changed

+24
-17
lines changed

5 files changed

+24
-17
lines changed

.env.tests

Lines changed: 0 additions & 7 deletions
This file was deleted.

NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
- unsure if the prefix mount should also be a docker volume, for performance.
1818
Not sure how often we actually have to look at the contents?
1919

20+
## TODO
21+
22+
- what is better, buildx cache mounts or just layer caching?
23+
2024
## docker image
2125

2226
for now, these are production images, changing files will not auto-reload /

docker-compose.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ x-healthcheck: &healthcheck-interval
6969
start_period: 10s
7070

7171
x-environment: &environment
72+
# FIXME: change to FOO: ${FOO:-default123 where these vars are just a
73+
# default that should be possible to override
7274
RUST_BACKTRACE: true
7375
DOCSRS_LOG: docs_rs=trace,tower_http=debug,rustwide=info,aws_smithy_http=trace,axum=debug
7476

@@ -86,6 +88,15 @@ x-environment: &environment
8688
AWS_ACCESS_KEY_ID: cratesfyi
8789
AWS_SECRET_ACCESS_KEY: secret_key
8890

91+
x-builder-environment: &builder-environment
92+
<<: *environment
93+
DOCSRS_RUSTWIDE_WORKSPACE: /opt/docsrs/rustwide
94+
DOCSRS_COMPILER_METRICS_PATH: /opt/docsrs/prefix/metrics
95+
DOCSRS_DOCKER: true
96+
DOCSRS_DOCKER_IMAGE: ghcr.io/rust-lang/crates-build-env/linux-micro
97+
DOCSRS_BUILD_CPU_LIMIT: 2
98+
DOCSRS_INCLUDE_DEFAULT_TARGETS: false
99+
89100
x-build: &build
90101
context: .
91102
<<: *docker-cache
@@ -107,13 +118,7 @@ x-builder: &builder
107118
- db
108119
- s3
109120
environment:
110-
<<: *environment
111-
DOCSRS_RUSTWIDE_WORKSPACE: /opt/docsrs/rustwide
112-
DOCSRS_COMPILER_METRICS_PATH: /opt/docsrs/prefix/metrics
113-
DOCSRS_DOCKER: true
114-
DOCSRS_DOCKER_IMAGE: ghcr.io/rust-lang/crates-build-env/linux-micro
115-
DOCSRS_BUILD_CPU_LIMIT: 2
116-
DOCSRS_INCLUDE_DEFAULT_TARGETS: false
121+
<<: *builder-environment
117122
env_file:
118123
- .docker.env
119124
healthcheck:

dockerfiles/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ CMD ["start-build-server", "0.0.0.0:3000"]
147147

148148
COPY --from=build /artifacts/cratesfyi /usr/local/bin
149149

150+
150151
############################
151152
# Registry watcher stage #
152153
############################

justfiles/testing.just

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,27 @@ run-tests: _ensure_db_and_s3_are_running _build-test-binaries
7777
#!/usr/bin/env bash
7878
set -euo pipefail
7979

80-
export $(grep -v '^#' .env.tests | xargs)
8180
export DOCSRS_INCLUDE_DEFAULT_TARGETS=false
8281
export DOCSRS_LOG=docs_rs=debug,rustwide=info
8382
export RUST_BACKTRACE=1
83+
export DOCSRS_PREFIX=ignored/cratesfyi-prefix
84+
export DOCSRS_DATABASE_URL=postgresql://cratesfyi:password@localhost:15432
85+
export AWS_ACCESS_KEY_ID=cratesfyi
86+
export AWS_SECRET_ACCESS_KEY=secret_key
87+
export S3_ENDPOINT=http://localhost:9000
8488

8589
cargo test --workspace --locked --no-fail-fast
8690

8791
[group('testing')]
8892
[group('builder')]
89-
run-builder-tests: _ensure_db_and_s3_are_running _build-test-binaries
93+
run-builder-tests: _ensure_db_and_s3_are_running
9094
#!/usr/bin/env bash
9195
set -euo pipefail
9296

93-
export $(grep -v '^#' .env.tests | xargs)
9497
export DOCSRS_INCLUDE_DEFAULT_TARGETS=true
9598
export DOCSRS_DOCKER_IMAGE=ghcr.io/rust-lang/crates-build-env/linux-micro
9699
export DOCSRS_LOG=docs_rs=debug,rustwide=info
97100
export RUST_BACKTRACE=1
101+
export DOCSRS_PREFIX=ignored/cratesfyi-prefix
98102

99103
cargo test --locked -- --ignored --test-threads=1

0 commit comments

Comments
 (0)