Skip to content

Commit

Permalink
update cleaning old hashreleases
Browse files Browse the repository at this point in the history
  • Loading branch information
radTuti committed Nov 1, 2024
1 parent ac5aeab commit 2782112
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions release/build/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"gopkg.in/natefinch/lumberjack.v2"

"github.com/projectcalico/calico/release/internal/config"
"github.com/projectcalico/calico/release/internal/hashreleaseserver"
"github.com/projectcalico/calico/release/internal/outputs"
"github.com/projectcalico/calico/release/internal/pinnedversion"
"github.com/projectcalico/calico/release/internal/registry"
Expand Down Expand Up @@ -336,8 +337,7 @@ func hashreleaseSubCommands(cfg *config.Config) []*cli.Command {
Aliases: []string{"gc"},
Action: func(c *cli.Context) error {
configureLogging("hashrelease-garbage-collect.log")
tasks.HashreleaseCleanRemote(cfg)
return nil
return hashreleaseserver.CleanOldHashreleases(&cfg.HashreleaseServerConfig)
},
},
}
Expand Down
8 changes: 0 additions & 8 deletions release/pkg/tasks/hashrelease.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,6 @@ func HashreleasePush(cfg *config.Config, path string, setLatest bool) {
}).Info("Published hashrelease")
}

// HashreleaseCleanRemote cleans up old hashreleases on the docs host
func HashreleaseCleanRemote(cfg *config.Config) {
logrus.Info("Cleaning up old hashreleases")
if err := hashreleaseserver.CleanOldHashreleases(&cfg.HashreleaseServerConfig); err != nil {
logrus.WithError(err).Fatal("Failed to delete old hashreleases")
}
}

// ReformatHashrelease modifies the generated release output to match
// the "legacy" format our CI tooling expects. This should be temporary until
// we can update the tooling to expect the new format.
Expand Down

0 comments on commit 2782112

Please sign in to comment.