Skip to content

Commit

Permalink
feat: add monitoring image (#192)
Browse files Browse the repository at this point in the history
as titile

---------

Signed-off-by: lijie <lijie@pingcap.com>
Co-authored-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
lijie and wuhuizuo authored Jan 4, 2024
1 parent 613ba06 commit 70728f5
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
41 changes: 41 additions & 0 deletions packages/packages.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,47 @@ components:
tiup:
description: TiDB controller suite
entrypoint: ctl
monitoring:
desc:
git:
url: https://github.com/pingcap/monitoring.git
ref: '{{ .Git.ref | default "master" }}'
sha: '{{ .Git.sha | default "" }}'
version: {{ .Release.version }} # segment version.
artifactory:
package_repo: hub.pingcap.net/pingcap/monitoring/package
tags:
{{- if .Git.sha }}
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }}
{{- end }}
- {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}
builders: # binary builder, also we need it when build for mac to get build tools versions and other informations.
- if: {{ semver.CheckConstraint ">= 7.4.0-0" .Release.version }}
image: ghcr.io/pingcap-qe/cd/builders/tidb:v20231115-e1c4b43-go1.21
- if: {{ semver.CheckConstraint ">= 7.0.0-0, < 7.4.0-0" .Release.version }}
image: ghcr.io/pingcap-qe/cd/builders/tidb:v20231115-e1c4b43-go1.20
- if: {{ semver.CheckConstraint ">= 6.1.0-0, < 7.0.0-0" .Release.version }}
image: ghcr.io/pingcap-qe/cd/builders/tidb:v20231115-e1c4b43-go1.19
- if: {{ semver.CheckConstraint "< 6.1.0-0" .Release.version }}
image: ghcr.io/pingcap-qe/cd/builders/tidb:v20231115-e1c4b43-go1.18
routers:
- description: For range [6.1.0, )
# ref: https://github.com/Masterminds/semver#checking-version-constraints
if: {{ semver.CheckConstraint ">= 6.1.0-0" .Release.version }}
os: [linux, darwin]
arch: [amd64, arm64]
profile: [release]
steps:
release:
- script: >-
go run ./cmd/monitoring.go --config=monitoring.yaml --tag={{ .Git.ref }}
artifacts:
- name: container image
type: image
artifactory:
repo: hub.pingcap.net/pingcap/monitoring/image
context: monitor-snapshot/{{ .Git.ref }}/operator/
dockerfile: Dockerfile
ng-monitoring:
desc: ng-monitoring component tarball
git:
Expand Down
6 changes: 3 additions & 3 deletions packages/scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail

function test_get_builder() {
local versions="v7.5.0 v7.1.0 v6.5.0"
local components="tidb tiflow tiflash tikv pd ctl"
local components="tidb tiflow tiflash tikv pd ctl monitoring"
local operating_systems="linux darwin"
local architectures="amd64 arm64"
local profile="release"
Expand Down Expand Up @@ -65,7 +65,7 @@ function test_get_builder() {

function test_gen_package_artifacts_script() {
local versions="v7.5.0 v7.1.0 v6.5.0"
local components="tidb tiflow tiflash tikv pd ctl"
local components="tidb tiflow tiflash tikv pd ctl monitoring"
local operating_systems="linux darwin"
local architectures="amd64 arm64"
local profile="release"
Expand Down Expand Up @@ -127,7 +127,7 @@ function test_gen_package_artifacts_script() {

function test_gen_package_images_script() {
local versions="v7.5.0 v7.1.0 v6.5.0"
local components="tidb tiflow tiflash tikv pd ctl"
local components="tidb tiflow tiflash tikv pd ctl monitoring"
local architectures="amd64 arm64"
local profile="release"
local script="./packages/scripts/gen-package-images-with-config.sh"
Expand Down

0 comments on commit 70728f5

Please sign in to comment.