Skip to content

Commit

Permalink
fix(monitoring): fix job step on fetch (#2752)
Browse files Browse the repository at this point in the history
Signed-off-by: wuhuizuo <[email protected]>

Signed-off-by: wuhuizuo <[email protected]>
  • Loading branch information
wuhuizuo committed Jan 17, 2024
1 parent 3f8a625 commit 280e321
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions prow-jobs/pingcap-monitoring-periodics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ periodics:
containers:
- name: check
image: golang:1.21.6
command: [bash, -ce]
env:
- name: TARGET
value: master
Expand All @@ -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
Expand All @@ -57,6 +57,7 @@ periodics:
git checkout -b "$head_branch"
commit_msg="chore(monitor-snapshot/master): update files from upstreams"
git commit -m "$commit_msg"
git remote add origin https://github.com/pingcap/monitoring.git
git remote -v
git push --set-upstream origin "$head_branch"
Expand Down

0 comments on commit 280e321

Please sign in to comment.