diff options
| author | DianQK <dianqk@dianqk.net> | 2024-04-09 21:44:50 +0800 |
|---|---|---|
| committer | DianQK <dianqk@dianqk.net> | 2024-04-09 21:44:52 +0800 |
| commit | 9ed6e608c92632389b5397744b32e75a24afb884 (patch) | |
| tree | efdbcd37b2e9cc1c9124740677c218101bf71362 | |
| parent | 2805aedf9f847039325ebf9d7d36d4f24476b13b (diff) | |
| download | rust-9ed6e608c92632389b5397744b32e75a24afb884.tar.gz rust-9ed6e608c92632389b5397744b32e75a24afb884.zip | |
Use `isCI` in `run.sh`
| -rwxr-xr-x | src/ci/docker/run.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh index 9d72fd8a55a..30c28a809be 100755 --- a/src/ci/docker/run.sh +++ b/src/ci/docker/run.sh @@ -46,7 +46,7 @@ source "$ci_dir/shared.sh" CACHE_DOMAIN="${CACHE_DOMAIN:-ci-caches.rust-lang.org}" if [ -f "$docker_dir/$image/Dockerfile" ]; then - if [ "$CI" != "" ]; then + if isCI; then hash_key=/tmp/.docker-hash-key.txt rm -f "${hash_key}" echo $image >> $hash_key @@ -102,7 +102,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then CACHE_IMAGE_TAG=${REGISTRY}/${REGISTRY_USERNAME}/rust-ci-cache:${cksum} # On non-CI jobs, we don't do any caching. - if [[ "$CI" == "" ]]; + if ! isCI; then retry docker build --rm -t rust-ci -f "$dockerfile" "$context" # On PR CI jobs, we don't have permissions to write to the registry cache, @@ -289,7 +289,7 @@ else command=(/checkout/src/ci/run.sh) fi -if [ "$CI" != "" ]; then +if isCI; then # Get some needed information for $BASE_COMMIT # # This command gets the last merge commit which we'll use as base to list |
