Skip to content

Commit

Permalink
feat(pingcap/monitoring): support build for tag creating triggers (#262)
Browse files Browse the repository at this point in the history
For example:
run: "./packages/scripts/gen-package-artifacts-with-config.sh monitoring
darwin amd64 v7.1.1 release v8.0.0 ''"
output:
```bash
function build() {
    export TARGET=release-8.0
    export TARGET_OS=darwin TARGET_ARCH=amd64
    make grafana_without_pull
    make default -C ng-monitoring
    make output/prometheus
    echo "building finished."
}
```

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

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
wuhuizuo authored Mar 4, 2024
1 parent a26fbda commit 4ff2b60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/packages.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ components:
profile: [release]
steps:
release:
- script: |-
export TARGET={{ .Git.ref }}
- script: |-
export TARGET={{ if strings.HasPrefix "v" .Git.ref }}{{ printf "release-%d.%d" (semver.Semver .Git.ref).Major (semver.Semver .Git.ref).Minor }}{{ else }}{{ .Git.ref }}{{ end }}
export TARGET_OS={{ .Release.os }} TARGET_ARCH={{ .Release.arch }}
make grafana_without_pull
make default -C ng-monitoring
Expand Down Expand Up @@ -188,7 +188,7 @@ components:
steps:
release:
- script: |-
export TARGET={{ .Git.ref }}
export TARGET={{ if strings.HasPrefix "v" .Git.ref }}{{ printf "release-%d.%d" (semver.Semver .Git.ref).Major (semver.Semver .Git.ref).Minor }}{{ else }}{{ .Git.ref }}{{ end }}
export TARGET_OS={{ .Release.os }} TARGET_ARCH={{ .Release.arch }}
go run ./cmd/monitoring.go --config=monitoring.yaml --tag={{ .Git.ref }}
make default -C ng-monitoring
Expand All @@ -213,7 +213,7 @@ components:
steps:
release:
- script: |-
export TARGET={{ .Git.ref }}
export TARGET={{ if strings.HasPrefix "v" .Git.ref }}{{ printf "release-%d.%d" (semver.Semver .Git.ref).Major (semver.Semver .Git.ref).Minor }}{{ else }}{{ .Git.ref }}{{ end }}
export TARGET_OS={{ .Release.os }} TARGET_ARCH={{ .Release.arch }}
go run ./cmd/monitoring.go --config=monitoring.yaml --tag={{ .Git.ref }}
make output/prometheus
Expand Down

0 comments on commit 4ff2b60

Please sign in to comment.