mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-04-25 11:02:12 +00:00
For pull-requests coming from forks, we don't have access to the secrets. This is currently failing CI for all PRs from forks as docker cannot write the cache after running the tests. Pull-Request: #4604.
19 lines
685 B
Bash
Executable File
19 lines
685 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This uses the same S3 cache as all test-plans images. Because we use `cargo-chef` in the Dockerfile, we have a layer available with all dependencies built.
|
|
|
|
CACHE_TO=""
|
|
|
|
# If we have credentials, write to cache
|
|
if [[ -n "${AWS_SECRET_ACCESS_KEY}" ]]; then
|
|
CACHE_TO="--cache-to type=s3,mode=max,bucket=libp2p-by-tf-aws-bootstrap,region=us-east-1,prefix=buildCache,name=${FLAVOUR}-rust-libp2p-head"
|
|
fi
|
|
|
|
docker buildx build \
|
|
--load \
|
|
$CACHE_TO \
|
|
--cache-from type=s3,mode=max,bucket=libp2p-by-tf-aws-bootstrap,region=us-east-1,prefix=buildCache,name=${FLAVOUR}-rust-libp2p-head \
|
|
-t ${FLAVOUR}-rust-libp2p-head \
|
|
. \
|
|
-f interop-tests/Dockerfile.${FLAVOUR}
|