From 3b5979d78324f1532c014df947bb343f9441fe23 Mon Sep 17 00:00:00 2001 From: Cesar Celis Hernandez Date: Fri, 3 Mar 2023 11:11:00 -0600 Subject: [PATCH] Compiling when cache is missing (#2688) --- .github/workflows/jobs.yaml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/jobs.yaml b/.github/workflows/jobs.yaml index 9d48a68c9..5099deada 100644 --- a/.github/workflows/jobs.yaml +++ b/.github/workflows/jobs.yaml @@ -990,7 +990,13 @@ jobs: VERSION=`git rev-parse HEAD`; echo $VERSION; echo "Create MinIO image"; - cp ../minio . + if [ ! -f ../minio ]; then + echo "minio binary not found!, so compiling..." + make docker VERSION=$VERSION; + else + echo "Using binary from cache" + cp ../minio . + fi docker build -q --no-cache -t minio/minio:$VERSION . -f Dockerfile echo "Jumping back to console repository to run the integration test" cd $GITHUB_WORKSPACE; @@ -1076,7 +1082,13 @@ jobs: VERSION=`git rev-parse HEAD`; echo $VERSION; echo "Create MinIO image"; - cp ../minio . + if [ ! -f ../minio ]; then + echo "minio binary not found!, so compiling..." + make docker VERSION=$VERSION; + else + echo "Using binary from cache" + cp ../minio . + fi docker build -q --no-cache -t minio/minio:$VERSION . -f Dockerfile echo "Jumping back to console repository to run the integration test" cd $GITHUB_WORKSPACE; @@ -1150,7 +1162,13 @@ jobs: VERSION=`git rev-parse HEAD`; echo $VERSION; echo "Create MinIO image"; - cp ../minio . + if [ ! -f ../minio ]; then + echo "minio binary not found!, so compiling..." + make docker VERSION=$VERSION; + else + echo "Using binary from cache" + cp ../minio . + fi docker build -q --no-cache -t minio/minio:$VERSION . -f Dockerfile echo "Jumping back to console repository to run the integration test" cd $GITHUB_WORKSPACE;