From 35d0cab4c3be36589032f837655446d833ec7bb5 Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Wed, 17 Jan 2024 15:22:46 +0800 Subject: [PATCH] fix(monitoring): fix job step on fetch (#2752) Signed-off-by: wuhuizuo Signed-off-by: wuhuizuo --- prow-jobs/pingcap-monitoring-periodics.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prow-jobs/pingcap-monitoring-periodics.yaml b/prow-jobs/pingcap-monitoring-periodics.yaml index be15ecfcf8..7064aea9a3 100644 --- a/prow-jobs/pingcap-monitoring-periodics.yaml +++ b/prow-jobs/pingcap-monitoring-periodics.yaml @@ -14,7 +14,6 @@ periodics: containers: - name: check image: golang:1.21.6 - command: [bash, -ce] env: - name: TARGET value: master @@ -25,13 +24,14 @@ periodics: volumeMounts: - name: github-token mountPath: /etc/github - readOnly: true + readOnly: true + command: [bash, -ceo, pipefail] args: &args - | printenv - go run ./cmd/monitoring.go --tag=$TARGET --config monitoring.yaml + go run ./cmd/monitoring.go --tag $TARGET --config monitoring.yaml --token $(cat /etc/github/token) git add monitor-snapshot/$TARGET - if git diff --exit-code --name-status; then + if git diff --cached --exit-code --name-status; then echo "🤷 No changes happened." exit 0 fi