Deep checks skip explicit tags
This commit is contained in:
parent
f753d17b19
commit
68b1aacced
|
@ -14,11 +14,13 @@ jobs:
|
||||||
env:
|
env:
|
||||||
only_proxy: ".m.daocloud.io"
|
only_proxy: ".m.daocloud.io"
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/wzshiming/bridge/releases/download/v0.7.10/bridge_linux_amd64 -O /usr/local/bin/bridge && chmod +x /usr/local/bin/bridge
|
wget https://github.com/wzshiming/bridge/releases/download/v0.7.11/bridge_linux_amd64 -O /usr/local/bin/bridge && chmod +x /usr/local/bin/bridge
|
||||||
nohup /usr/local/bin/bridge -b :8080 -p - ${{ secrets.PROTOCOL }} 2>/dev/null &
|
nohup /usr/local/bin/bridge -b :8080 -p - ${{ secrets.PROTOCOL }} 2>/dev/null &
|
||||||
- name: Check
|
- name: Check
|
||||||
env:
|
env:
|
||||||
INCREMENTAL: "true"
|
INCREMENTAL: "true"
|
||||||
|
QUICKLY: "true"
|
||||||
|
QUICKLY_PATTERN: '[0-9]+(\.[0-9]+){2}'
|
||||||
PARALLET: "10"
|
PARALLET: "10"
|
||||||
http_proxy: socks5://127.0.0.1:8080
|
http_proxy: socks5://127.0.0.1:8080
|
||||||
https_proxy: socks5://127.0.0.1:8080
|
https_proxy: socks5://127.0.0.1:8080
|
||||||
|
|
|
@ -16,11 +16,13 @@ jobs:
|
||||||
env:
|
env:
|
||||||
only_proxy: ".m.daocloud.io"
|
only_proxy: ".m.daocloud.io"
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/wzshiming/bridge/releases/download/v0.7.10/bridge_linux_amd64 -O /usr/local/bin/bridge && chmod +x /usr/local/bin/bridge
|
wget https://github.com/wzshiming/bridge/releases/download/v0.7.11/bridge_linux_amd64 -O /usr/local/bin/bridge && chmod +x /usr/local/bin/bridge
|
||||||
nohup /usr/local/bin/bridge -b :8080 -p - ${{ secrets.PROTOCOL }} 2>/dev/null &
|
nohup /usr/local/bin/bridge -b :8080 -p - ${{ secrets.PROTOCOL }} 2>/dev/null &
|
||||||
- name: Sync Images
|
- name: Sync Images
|
||||||
env:
|
env:
|
||||||
INCREMENTAL: "true"
|
INCREMENTAL: "true"
|
||||||
|
QUICKLY: "true"
|
||||||
|
QUICKLY_PATTERN: '[0-9]+(\.[0-9]+){2}'
|
||||||
SYNC: "true"
|
SYNC: "true"
|
||||||
PARALLET: "5"
|
PARALLET: "5"
|
||||||
http_proxy: socks5://127.0.0.1:8080
|
http_proxy: socks5://127.0.0.1:8080
|
||||||
|
|
|
@ -19,6 +19,9 @@ INCREMENTAL="${INCREMENTAL:-}"
|
||||||
# Compare only tags that are in both images
|
# Compare only tags that are in both images
|
||||||
QUICKLY="${QUICKLY:-}"
|
QUICKLY="${QUICKLY:-}"
|
||||||
|
|
||||||
|
# If set, will compare the image tag patterns
|
||||||
|
QUICKLY_PATTERN="${QUICKLY_PATTERN:-}"
|
||||||
|
|
||||||
# Regexp that matches the tags
|
# Regexp that matches the tags
|
||||||
FOCUS="${FOCUS:-}"
|
FOCUS="${FOCUS:-}"
|
||||||
|
|
||||||
|
@ -37,18 +40,19 @@ RETRY="${RETRY:-5}"
|
||||||
SELF="$(basename "${BASH_SOURCE[0]}")"
|
SELF="$(basename "${BASH_SOURCE[0]}")"
|
||||||
|
|
||||||
if [[ "${DEBUG}" == "true" ]]; then
|
if [[ "${DEBUG}" == "true" ]]; then
|
||||||
echo "DEBUG: ${DEBUG}"
|
echo "DEBUG: ${DEBUG}"
|
||||||
echo "IMAGE1: ${IMAGE1}"
|
echo "IMAGE1: ${IMAGE1}"
|
||||||
echo "IMAGE2: ${IMAGE2}"
|
echo "IMAGE2: ${IMAGE2}"
|
||||||
echo "SKOPEO: ${SKOPEO}"
|
echo "SKOPEO: ${SKOPEO}"
|
||||||
echo "JQ: ${JQ}"
|
echo "JQ: ${JQ}"
|
||||||
echo "INCREMENTAL: ${INCREMENTAL}"
|
echo "INCREMENTAL: ${INCREMENTAL}"
|
||||||
echo "QUICKLY: ${QUICKLY}"
|
echo "QUICKLY: ${QUICKLY}"
|
||||||
echo "FOCUS: ${FOCUS}"
|
echo "QUICKLY_PATTERN: ${QUICKLY_PATTERN}"
|
||||||
echo "SKIP: ${SKIP}"
|
echo "FOCUS: ${FOCUS}"
|
||||||
echo "PARALLET: ${PARALLET}"
|
echo "SKIP: ${SKIP}"
|
||||||
echo "SYNC: ${SYNC}"
|
echo "PARALLET: ${PARALLET}"
|
||||||
echo "RETRY: ${RETRY}"
|
echo "SYNC: ${SYNC}"
|
||||||
|
echo "RETRY: ${RETRY}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function check() {
|
function check() {
|
||||||
|
@ -62,14 +66,15 @@ function check() {
|
||||||
echo " ${SELF}: <image1> <image2>"
|
echo " ${SELF}: <image1> <image2>"
|
||||||
echo " ${SELF}: <image1:tag> <image2:tag>"
|
echo " ${SELF}: <image1:tag> <image2:tag>"
|
||||||
echo "Env:"
|
echo "Env:"
|
||||||
echo " DEBUG=true # Output more information that is out of synchronize"
|
echo " DEBUG=true # Output more information that is out of synchronize"
|
||||||
echo " INCREMENTAL=true # Allow image2 to have more tags than image1"
|
echo " INCREMENTAL=true # Allow image2 to have more tags than image1"
|
||||||
echo " QUICKLY=true # Compare only tags that are in both images"
|
echo " QUICKLY=true # Compare only tags that are in both images"
|
||||||
echo " FOCUS=<pattern> # Regexp that matches the tags"
|
echo " QUICKLY_PATTERN=<pattern> # Regexp that matches the tags"
|
||||||
echo " SKIP=<pattern> # Regexp that matches the tags that needs to be skipped"
|
echo " FOCUS=<pattern> # Regexp that matches the tags"
|
||||||
echo " PARALLET=<size> # Compare the number of tags in parallel"
|
echo " SKIP=<pattern> # Regexp that matches the tags that needs to be skipped"
|
||||||
echo " SYNC=true # Synchronize images from source to destination"
|
echo " PARALLET=<size> # Compare the number of tags in parallel"
|
||||||
echo " RETRY=<times> # Retry times"
|
echo " SYNC=true # Synchronize images from source to destination"
|
||||||
|
echo " RETRY=<times> # Retry times"
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -192,8 +197,11 @@ function diff-image-with-tag() {
|
||||||
echo "${SELF}: NOT-SYNCHRONIZED: ${image1} and ${image2} are not in synchronized" >&2
|
echo "${SELF}: NOT-SYNCHRONIZED: ${image1} and ${image2} are not in synchronized" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo "${SELF}: SYNCHRONIZED: ${image1} and ${image2} are in synchronized" >&2
|
|
||||||
return 0
|
if [[ "${QUICKLY_PATTERN}" == "" || ("${QUICKLY_PATTERN}" != "" && "${tag1}" =~ ${QUICKLY_PATTERN}) ]]; then
|
||||||
|
echo "${SELF}: SYNCHRONIZED: ${image1} and ${image2} are in synchronized" >&2
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local inspect2="$(inspect ${image2})"
|
local inspect2="$(inspect ${image2})"
|
||||||
|
|
Loading…
Reference in New Issue