Skip to content

Commit

Permalink
chore: 去除代码中的chart与镜像版本信息,避免多版本合代码时的冲突 #1268
Browse files Browse the repository at this point in the history
使用占位符代替版本号
  • Loading branch information
jsonwan committed Sep 26, 2022
1 parent 39891b7 commit 91e412b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions support-files/kubernetes/charts/bk-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions support-files/kubernetes/charts/bk-job/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1243,7 +1243,7 @@ migration:
# 镜像拉取仓库组织与镜像名称
repository: "blueking/job-migration"
# 镜像标签
tag: 3.5.0-rc.25
tag: {{APP_VERSION}}
# 镜像拉取策略
pullPolicy: IfNotPresent

Expand Down
4 changes: 4 additions & 0 deletions support-files/kubernetes/charts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 91e412b

Please sign in to comment.