From 6d5472be44dd33f46030da7006849818471db6f1 Mon Sep 17 00:00:00 2001 From: fromschen Date: Mon, 17 May 2021 16:16:14 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=83=A8=E7=BD=B2=E4=BD=93=E9=AA=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20Tencent#4193?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ci集群初始化脚本. --- scripts/bk-ci-init-bkce.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 scripts/bk-ci-init-bkce.sh diff --git a/scripts/bk-ci-init-bkce.sh b/scripts/bk-ci-init-bkce.sh new file mode 100755 index 00000000000..87ea0b31e70 --- /dev/null +++ b/scripts/bk-ci-init-bkce.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# ci启动后的初始化操作. +# 目前仅适配了蓝鲸社区版的批量脚本. +set -eu +trap "on_ERR;" ERR +on_ERR (){ + local fn=$0 ret=$? lineno=${BASH_LINENO:-$LINENO} + echo >&2 "ERROR $fn exit with $ret at line $lineno: $(sed -n ${lineno}p $0)." +} + +# 注册ci-auth的回调. +echo "reg ci-auth callback." +iam_callback="support-files/ms-init/auth/iam-callback-resource-registere.conf" +./pcmd.sh -H "$BK_CI_AUTH_IP0" curl -vsX POST "http://localhost:$BK_CI_AUTH_API_PORT/api/op/auth/iam/callback/" -H "Content-Type:application/json" -d @${BK_PKG_SRC_PATH:-/data/src}/ci/support-files/ms-init/auth/iam-callback-resource-registere.conf +echo "" +echo "reg store image for bkci." +# 注册初始镜像到研发商店. +./pcmd.sh -H "$BK_CI_STORE_IP0" curl -vsX POST "http://127.0.0.1:${BK_CI_STORE_API_PORT:-21918}/api/op/market/image/init" +echo "" +