Skip to content

Commit

Permalink
fix(packages): make tag ok for feature branches or ther tree style br…
Browse files Browse the repository at this point in the history
…anches (#162)

Signed-off-by: wuhuizuo <wuhuizuo@126.com>

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
wuhuizuo authored Dec 15, 2023
1 parent 7f5dc6b commit f4a8245
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 39 deletions.
76 changes: 38 additions & 38 deletions packages/packages.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ components:
repo: hub.pingcap.net/tikv/pd/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
release:
- script: make build
Expand Down Expand Up @@ -83,9 +83,9 @@ components:
repo: hub.pingcap.net/tikv/pd/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
fips:
- script: ENABLE_FIPS=1 make build
Expand Down Expand Up @@ -125,9 +125,9 @@ components:
repo: hub.pingcap.net/tikv/tikv/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
release:
- os: linux
Expand Down Expand Up @@ -186,9 +186,9 @@ components:
repo: hub.pingcap.net/tikv/tikv/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
fips:
- script: ENABLE_FIPS=1 ROCKSDB_SYS_STATIC=1 make fail_release
Expand Down Expand Up @@ -225,9 +225,9 @@ components:
repo: hub.pingcap.net/pingcap/tiflow/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
release:
- os: darwin
Expand Down Expand Up @@ -346,9 +346,9 @@ components:
repo: hub.pingcap.net/pingcap/tiflow/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
fips:
- script: |
Expand Down Expand Up @@ -383,9 +383,9 @@ components:
repo: hub.pingcap.net/pingcap/tiflow-operator/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
release:
- script: go build -o manager
Expand Down Expand Up @@ -421,9 +421,9 @@ components:
repo: hub.pingcap.net/pingcap/tidb/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
release:
- script: |
Expand Down Expand Up @@ -528,9 +528,9 @@ components:
repo: hub.pingcap.net/pingcap/tidb/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
fips:
- script: ENABLE_FIPS=1 make server build_tools build_dumpling
Expand Down Expand Up @@ -573,9 +573,9 @@ components:
repo: hub.pingcap.net/pingcap/tidb-tools/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
release:
- script: make build
Expand Down Expand Up @@ -613,9 +613,9 @@ components:
repo: hub.pingcap.net/pingcap/tiflash/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
release:
- os: darwin
Expand Down Expand Up @@ -691,9 +691,9 @@ components:
repo: hub.pingcap.net/pingcap/tidb-ctl/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
release:
- script: go build
Expand Down Expand Up @@ -723,9 +723,9 @@ components:
repo: hub.pingcap.net/pingcap/tidb-binlog/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
release:
- script: make build
Expand Down Expand Up @@ -796,9 +796,9 @@ components:
repo: hub.pingcap.net/pingcap/tidb-opreator/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
release:
- script: make build
Expand Down Expand Up @@ -845,9 +845,9 @@ components:
repo: hub.pingcap.net/pingcap/tidb-opreator/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
fips:
- script: ENABLE_FIPS=1 make build
Expand Down Expand Up @@ -901,9 +901,9 @@ components:
repo: hub.pingcap.net/pingcap/ng-monitoring/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
release:
- script: make default
Expand Down Expand Up @@ -931,9 +931,9 @@ components:
repo: hub.pingcap.net/pingcap/ng-monitoring/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
steps:
fips:
- script: ENABLE_FIPS=1 make default
Expand Down Expand Up @@ -964,9 +964,9 @@ components:
artifactory:
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
artifacts:
- name: container image
type: image
Expand All @@ -990,9 +990,9 @@ components:
repo: hub.pingcap.net/pingcap/ctl/package
tags:
{{- if .Git.sha }}
- "{{ .Git.ref }}-{{ strings.Trunc 7 .Git.sha }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- "{{ .Git.ref }}"
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
artifacts:
- name: "ctl-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}.tar.gz"
files:
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/build-package-artifacts.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function archive() {
{{- end }}
}

{{- if has .artifactory "repo" }}
{{ if has .artifactory "repo" -}}
function push_files() {
local release_ws="$1"

Expand Down

0 comments on commit f4a8245

Please sign in to comment.