mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-23 05:59:28 -06:00
archive go/bin content and push it as cache
fix cache source
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#
|
||||
# $1 - root path where .bingo resides
|
||||
# $2 - name of the cache item
|
||||
#
|
||||
|
||||
ROOT_PATH="$1"
|
||||
@@ -13,7 +14,7 @@ BINGO_DIR="$ROOT_PATH/.bingo"
|
||||
# generate hash of a .bingo folder
|
||||
BINGO_HASH=$(cat "$BINGO_DIR"/* | sha256sum | cut -d ' ' -f 1)
|
||||
|
||||
URL="$CACHE_ENDPOINT/$CACHE_BUCKET/ocis/go-bin/$BINGO_HASH/bin/golangci-lint"
|
||||
URL="$CACHE_ENDPOINT/$CACHE_BUCKET/ocis/go-bin/$BINGO_HASH/$2"
|
||||
if curl --output /dev/null --silent --head --fail "$URL"; then
|
||||
echo "[INFO] Go bin cache with has '$BINGO_HASH' exists."
|
||||
# https://discourse.drone.io/t/how-to-exit-a-pipeline-early-without-failing/3951
|
||||
|
||||
Reference in New Issue
Block a user