diff --git a/support-files/kubernetes/charts/bk-job/Chart.yaml b/support-files/kubernetes/charts/bk-job/Chart.yaml index 8015d05166..82ec0a3e57 100644 --- a/support-files/kubernetes/charts/bk-job/Chart.yaml +++ b/support-files/kubernetes/charts/bk-job/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: "bk-job" description: The BK-JOB is a ops script management and execution system with the capability of dealing with multiple tasks simultaneously. type: application -version: 0.2.5-rc.25 -appVersion: "3.5.0-rc.25" +version: {{CHART_VERSION}} +appVersion: "{{APP_VERSION}}" dependencies: - name: common diff --git a/support-files/kubernetes/charts/bk-job/values.yaml b/support-files/kubernetes/charts/bk-job/values.yaml index 67e32297dd..c23ee0e46d 100644 --- a/support-files/kubernetes/charts/bk-job/values.yaml +++ b/support-files/kubernetes/charts/bk-job/values.yaml @@ -647,7 +647,7 @@ gatewayConfig: image: registry: hub.bktencent.com repository: blueking/job-gateway - tag: 3.5.0-rc.25 + tag: {{APP_VERSION}} pullPolicy: IfNotPresent pullSecrets: [] replicaCount: 1 @@ -735,7 +735,7 @@ manageConfig: image: registry: hub.bktencent.com repository: blueking/job-manage - tag: 3.5.0-rc.25 + tag: {{APP_VERSION}} pullPolicy: IfNotPresent pullSecrets: [] replicaCount: 1 @@ -793,7 +793,7 @@ executeConfig: image: registry: hub.bktencent.com repository: blueking/job-execute - tag: 3.5.0-rc.25 + tag: {{APP_VERSION}} pullPolicy: IfNotPresent pullSecrets: [] replicaCount: 1 @@ -844,7 +844,7 @@ crontabConfig: image: registry: hub.bktencent.com repository: blueking/job-crontab - tag: 3.5.0-rc.25 + tag: {{APP_VERSION}} pullPolicy: IfNotPresent pullSecrets: [] replicaCount: 1 @@ -904,7 +904,7 @@ logsvrConfig: image: registry: hub.bktencent.com repository: blueking/job-logsvr - tag: 3.5.0-rc.25 + tag: {{APP_VERSION}} pullPolicy: IfNotPresent pullSecrets: [] replicaCount: 1 @@ -959,7 +959,7 @@ backupConfig: image: registry: hub.bktencent.com repository: blueking/job-backup - tag: 3.5.0-rc.25 + tag: {{APP_VERSION}} pullPolicy: IfNotPresent pullSecrets: [] replicaCount: 1 @@ -1009,7 +1009,7 @@ analysisConfig: image: registry: hub.bktencent.com repository: blueking/job-analysis - tag: 3.5.0-rc.25 + tag: {{APP_VERSION}} pullPolicy: IfNotPresent pullSecrets: [] replicaCount: 1 @@ -1059,7 +1059,7 @@ fileGatewayConfig: image: registry: hub.bktencent.com repository: blueking/job-file-gateway - tag: 3.5.0-rc.25 + tag: {{APP_VERSION}} pullPolicy: IfNotPresent pullSecrets: [] replicaCount: 1 @@ -1109,7 +1109,7 @@ fileWorkerConfig: image: registry: hub.bktencent.com repository: blueking/job-file-worker - tag: 3.5.0-rc.25 + tag: {{APP_VERSION}} pullPolicy: IfNotPresent pullSecrets: [] replicaCount: 1 @@ -1182,7 +1182,7 @@ frontendConfig: image: registry: hub.bktencent.com repository: blueking/job-frontend - tag: 3.5.0-rc.25 + tag: {{APP_VERSION}} pullPolicy: IfNotPresent pullSecrets: [] replicaCount: 1 @@ -1243,7 +1243,7 @@ migration: # 镜像拉取仓库组织与镜像名称 repository: "blueking/job-migration" # 镜像标签 - tag: 3.5.0-rc.25 + tag: {{APP_VERSION}} # 镜像拉取策略 pullPolicy: IfNotPresent diff --git a/support-files/kubernetes/charts/build.sh b/support-files/kubernetes/charts/build.sh index fe6085b9dd..b1b8a432f1 100755 --- a/support-files/kubernetes/charts/build.sh +++ b/support-files/kubernetes/charts/build.sh @@ -90,6 +90,10 @@ while (( $# > 0 )); do esac shift done +# 替换Chart.yaml与values.yaml中的版本号 +sed -i "s/{{CHART_VERSION}}/${VERSION}/g" "${WORKING_DIR}/bk-job/Chart.yaml" +sed -i "s/{{APP_VERSION}}/${APP_VERSION}/g" "${WORKING_DIR}/bk-job/Chart.yaml" +sed -i "s/{{APP_VERSION}}/${APP_VERSION}/g" "${WORKING_DIR}/bk-job/values.yaml" helm package bkjob --version $VERSION --app-version $APP_VERSION if [[ $PUSH -eq 1 ]] ; then