Skip to content

Commit

Permalink
chore: add support for release periodic job
Browse files Browse the repository at this point in the history
Signed-off-by: Jing Qi <[email protected]>
  • Loading branch information
jinqi7 committed Jan 23, 2025
1 parent 8221e59 commit 90eba85
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,16 @@ func (CI) parseJobSpec() error {
func (ci CI) init() error {
var err error

if jobType == "periodic" || strings.Contains(jobName, "rehearse") {
if (jobType == "periodic" && !strings.Contains(jobName, "release-service-catalog")) || strings.Contains(jobName, "rehearse") {
return nil
}

if strings.Contains(jobName, "release-service-catalog") && strings.Contains(jobName, "periodic") {
rctx.JobName = jobName
klog.Info("setting rctx.JobName: %s", rctx.JobName)

Check failure on line 102 in magefiles/magefile.go

View workflow job for this annotation

GitHub Actions / lint

printf: k8s.io/klog/v2.Info call has possible Printf formatting directive %s (govet)

Check failure on line 102 in magefiles/magefile.go

View workflow job for this annotation

GitHub Actions / Unit tests

k8s.io/klog/v2.Info call has possible Printf formatting directive %s
// return nil
}

if err = ci.parseJobSpec(); err != nil {
return err
}
Expand Down Expand Up @@ -135,7 +141,7 @@ func (ci CI) init() error {
}

func (ci CI) PrepareE2EBranch() error {
if jobType == "periodic" || strings.Contains(jobName, "rehearse") {
if (jobType == "periodic" && !strings.Contains(jobName, "release-service-catalog")) || strings.Contains(jobName, "rehearse") {
return nil
}

Expand Down Expand Up @@ -359,6 +365,11 @@ func RunE2ETests() error {
case "infra-deployments":
return engine.MageEngine.RunRules(rctx, "tests", "infra-deployments")
default:
klog.Info("for debugging......rctx.JobName: %s", rctx.JobName)
if strings.Contains(rctx.JobName, "release-service-catalog") {

Check failure on line 369 in magefiles/magefile.go

View workflow job for this annotation

GitHub Actions / lint

printf: k8s.io/klog/v2.Info call has possible Printf formatting directive %s (govet)

Check failure on line 369 in magefiles/magefile.go

View workflow job for this annotation

GitHub Actions / Unit tests

k8s.io/klog/v2.Info call has possible Printf formatting directive %s
labelFilter := utils.GetEnv("E2E_TEST_SUITE_LABEL", "release-pipelines")
return runTests(labelFilter, "e2e-report.xml")
}
labelFilter := utils.GetEnv("E2E_TEST_SUITE_LABEL", "!upgrade-create && !upgrade-verify && !upgrade-cleanup && !release-pipelines")
return runTests(labelFilter, "e2e-report.xml")
}
Expand Down

0 comments on commit 90eba85

Please sign in to comment.