Skip to content

Commit

Permalink
Skip to report the status when the phase was done (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen authored Jun 9, 2022
1 parent 90a51c5 commit ceb9dc4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
Expand Down
5 changes: 5 additions & 0 deletions controllers/status_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ func (c *StatusController) Reconcile(ctx context.Context, req ctrl.Request) (res
return
}

// do not report the status when the phase was done
if releaser.Spec.Phase == devopsv1alpha1.PhaseDone {
return
}

// only take care of those have errors
failedConditions := getFailedConditions(releaser.Status.Conditions)
if len(failedConditions) == 0 {
Expand Down

0 comments on commit ceb9dc4

Please sign in to comment.