Skip to content

Commit 3b5979d

Browse files
authored
Compiling when cache is missing (#2688)
1 parent 9aa1f43 commit 3b5979d

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/jobs.yaml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,13 @@ jobs:
990990
VERSION=`git rev-parse HEAD`;
991991
echo $VERSION;
992992
echo "Create MinIO image";
993-
cp ../minio .
993+
if [ ! -f ../minio ]; then
994+
echo "minio binary not found!, so compiling..."
995+
make docker VERSION=$VERSION;
996+
else
997+
echo "Using binary from cache"
998+
cp ../minio .
999+
fi
9941000
docker build -q --no-cache -t minio/minio:$VERSION . -f Dockerfile
9951001
echo "Jumping back to console repository to run the integration test"
9961002
cd $GITHUB_WORKSPACE;
@@ -1076,7 +1082,13 @@ jobs:
10761082
VERSION=`git rev-parse HEAD`;
10771083
echo $VERSION;
10781084
echo "Create MinIO image";
1079-
cp ../minio .
1085+
if [ ! -f ../minio ]; then
1086+
echo "minio binary not found!, so compiling..."
1087+
make docker VERSION=$VERSION;
1088+
else
1089+
echo "Using binary from cache"
1090+
cp ../minio .
1091+
fi
10801092
docker build -q --no-cache -t minio/minio:$VERSION . -f Dockerfile
10811093
echo "Jumping back to console repository to run the integration test"
10821094
cd $GITHUB_WORKSPACE;
@@ -1150,7 +1162,13 @@ jobs:
11501162
VERSION=`git rev-parse HEAD`;
11511163
echo $VERSION;
11521164
echo "Create MinIO image";
1153-
cp ../minio .
1165+
if [ ! -f ../minio ]; then
1166+
echo "minio binary not found!, so compiling..."
1167+
make docker VERSION=$VERSION;
1168+
else
1169+
echo "Using binary from cache"
1170+
cp ../minio .
1171+
fi
11541172
docker build -q --no-cache -t minio/minio:$VERSION . -f Dockerfile
11551173
echo "Jumping back to console repository to run the integration test"
11561174
cd $GITHUB_WORKSPACE;

0 commit comments

Comments
 (0)