Skip to content

Commit

Permalink
Skip project upgrade for packages on release branches
Browse files Browse the repository at this point in the history
  • Loading branch information
sp1999 committed Jul 22, 2024
1 parent 9150898 commit f0c4b2f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/version-tracker/pkg/commands/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ func Run(upgradeOptions *types.UpgradeOptions) error {
}
client := gogithub.NewTokenClient(context.Background(), githubToken)

// Skip project upgrade if it is in the packages list and branch is not main
if branchName != constants.MainBranchName && slices.Contains(constants.UpstreamPackagesProjects, projectName) {
logger.Info(fmt.Sprintf("Skipping upgrade for project %s on %s branch", projectName, branchName))
return nil
}

cwd, err := os.Getwd()
if err != nil {
return fmt.Errorf("retrieving current working directory: %v", err)
Expand Down
17 changes: 17 additions & 0 deletions tools/version-tracker/pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,4 +307,21 @@ var (
CiliumImageDirectories = []string{"cilium", "operator-generic", "cilium-chart"}

ProjectsSupportingPrereleaseTags = []string{"kubernetes-sigs/cluster-api-provider-cloudstack"}

// These projects will be upgraded only on main and won't be triggered on release branches.
UpstreamPackagesProjects = []string{
"aquasecurity/harbor-scanner-trivy",
"aquasecurity/trivy",
"aws-containers/hello-eks-anywhere",
"aws-observability/aws-otel-collector",
"distribution/distribution",
"emissary-ingress/emissary",
"goharbor/harbor",
"kubernetes/autoscaler",
"kubernetes-sigs/metrics-server",
"metallb/metallb",
"prometheus/node_exporter",
"prometheus/prometheus",
"redis/redis",
}
)

0 comments on commit f0c4b2f

Please sign in to comment.