Deep checks skip explicit tags

This commit is contained in:
Shiming Zhang 2021-12-09 19:26:51 +08:00
parent f753d17b19
commit 68b1aacced
3 changed files with 36 additions and 24 deletions

View File

@ -14,11 +14,13 @@ jobs:
env:
only_proxy: ".m.daocloud.io"
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 &
- name: Check
env:
INCREMENTAL: "true"
QUICKLY: "true"
QUICKLY_PATTERN: '[0-9]+(\.[0-9]+){2}'
PARALLET: "10"
http_proxy: socks5://127.0.0.1:8080
https_proxy: socks5://127.0.0.1:8080

View File

@ -16,11 +16,13 @@ jobs:
env:
only_proxy: ".m.daocloud.io"
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 &
- name: Sync Images
env:
INCREMENTAL: "true"
QUICKLY: "true"
QUICKLY_PATTERN: '[0-9]+(\.[0-9]+){2}'
SYNC: "true"
PARALLET: "5"
http_proxy: socks5://127.0.0.1:8080

View File

@ -19,6 +19,9 @@ INCREMENTAL="${INCREMENTAL:-}"
# Compare only tags that are in both images
QUICKLY="${QUICKLY:-}"
# If set, will compare the image tag patterns
QUICKLY_PATTERN="${QUICKLY_PATTERN:-}"
# Regexp that matches the tags
FOCUS="${FOCUS:-}"
@ -44,6 +47,7 @@ if [[ "${DEBUG}" == "true" ]]; then
echo "JQ: ${JQ}"
echo "INCREMENTAL: ${INCREMENTAL}"
echo "QUICKLY: ${QUICKLY}"
echo "QUICKLY_PATTERN: ${QUICKLY_PATTERN}"
echo "FOCUS: ${FOCUS}"
echo "SKIP: ${SKIP}"
echo "PARALLET: ${PARALLET}"
@ -65,6 +69,7 @@ function check() {
echo " DEBUG=true # Output more information that is out of synchronize"
echo " INCREMENTAL=true # Allow image2 to have more tags than image1"
echo " QUICKLY=true # Compare only tags that are in both images"
echo " QUICKLY_PATTERN=<pattern> # Regexp that matches the tags"
echo " FOCUS=<pattern> # Regexp that matches the tags"
echo " SKIP=<pattern> # Regexp that matches the tags that needs to be skipped"
echo " PARALLET=<size> # Compare the number of tags in parallel"
@ -192,9 +197,12 @@ function diff-image-with-tag() {
echo "${SELF}: NOT-SYNCHRONIZED: ${image1} and ${image2} are not in synchronized" >&2
return 1
fi
if [[ "${QUICKLY_PATTERN}" == "" || ("${QUICKLY_PATTERN}" != "" && "${tag1}" =~ ${QUICKLY_PATTERN}) ]]; then
echo "${SELF}: SYNCHRONIZED: ${image1} and ${image2} are in synchronized" >&2
return 0
fi
fi
local inspect2="$(inspect ${image2})"
if [[ "${inspect2}" == "" ]]; then