测是dev镜像

This commit is contained in:
iouAkira
2020-12-11 15:34:22 +08:00
parent 113cab880b
commit 39102a5fae
3 changed files with 10 additions and 8 deletions

View File

@ -25,9 +25,9 @@ function version_gt() {
#######################################通知用户更新镜像-start#####################################################################
echo "检查docker镜像更新更新..."
if type jq >/dev/null 2>&1; then
updateContext=$(getDockerImageLabel jq .UPDATE_CONTEXT)
export NOTIFY_CONTEXT=$updateContext
version=$(getDockerImageLabel jq .VERSION)
labels=$(getDockerImageLabel)
export NOTIFY_CONTENT=$(echo $labels | jq .UPDATE_CONTENT)
version=$(echo $labels | jq .VERSION)
else
# 第一版通知逻辑无法包含在上面判断里面,镜像构建好直接开启通知
export NOTIFY_CONTEXT="更新内容较多重新阅读仓库Readme(),更新镜像并更新配置后使用。"

View File

@ -37,12 +37,12 @@ function version_gt() {
echo "check docker images update..."
echo "检查docker镜像更新更新..."
if type jq >/dev/null 2>&1; then
updateContext=$(getDockerImageLabel jq .UPDATE_CONTEXT)
export NOTIFY_CONTEXT=$updateContext
version=$(getDockerImageLabel jq .VERSION)
labels=$(getDockerImageLabel)
export NOTIFY_CONTENT=$(echo $labels | jq .UPDATE_CONTENT)
version=$(echo $labels | jq .VERSION)
else
#第一版通知逻辑无法包含在上面判断里面,镜像构建好直接开启通知
export NOTIFY_CONTEXT="更新内容较多重新阅读仓库Readme(),更新镜像并更新配置后使用。"
export NOTIFY_CONTENT="更新内容较多重新阅读仓库Readme(),更新镜像并更新配置后使用。"
cd /scripts/docker
node notify_docker_user.js
fi

View File

@ -1,7 +1,9 @@
const notify = require('../sendNotify');
function image_update_notify() {
notify.sendNotify("⚠Docker镜像版本更新通知⚠", process.env.NOTIFY_CONTEXT)
if (process.env.NOTIFY_CONTENT) {
notify.sendNotify("⚠Docker镜像版本更新通知⚠", process.env.NOTIFY_CONTENT)
}
}
image_update_notify();