Skip to content

Commit

Permalink
Restore k8s based bumper (#12183)
Browse files Browse the repository at this point in the history
* Update the bumper to use k8s package

* Setup exisitng bumpers to use new autobumper

* Fix bumper

* Fix configuring git
  • Loading branch information
KacperMalachowski authored Oct 22, 2024
1 parent f829823 commit db7fb7b
Show file tree
Hide file tree
Showing 5 changed files with 325 additions and 175 deletions.
2 changes: 1 addition & 1 deletion cmd/image-autobumper/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ LABEL io.kyma-project.source=github.com/kyma-project/test-infra/cmd/image-autobu
# Copy the built Go app from the builder stage
COPY --from=builder /app/cmd/image-autobumper/main /image-autobumper

RUN apk add --no-cache ca-certificates && \
RUN apk add --no-cache ca-certificates git && \
chmod +x /image-autobumper
ENTRYPOINT ["/image-autobumper"]
4 changes: 2 additions & 2 deletions cmd/image-autobumper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ func (c *client) Changes() []func(context.Context) (string, []string, error) {
}

// PRTitleBody returns the body of the PR, this function runs after each commit
func (c *client) PRTitleBody() (string, string, error) {
func (c *client) PRTitleBody() (string, string) {
body := generatePRBody(c.images, c.o.Prefixes)
if c.o.AdditionalPRBody != "" {
body += c.o.AdditionalPRBody + "\n"
}
return makeCommitSummary(c.o.Prefixes, c.versions), body, nil
return makeCommitSummary(c.o.Prefixes, c.versions), body
}

var rootCmd = &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions cmd/image-detector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ func (c *client) Changes() []func(context.Context) (string, []string, error) {
}

// PRTitleBody returns the body of the PR, this function runs after each commit
func (c *client) PRTitleBody() (string, string, error) {
return "Update sec-scanners-config.yaml", "", nil
func (c *client) PRTitleBody() (string, string) {
return "Update sec-scanners-config.yaml", ""
}

// options is the options for autobumper operations.
Expand Down
4 changes: 2 additions & 2 deletions cmd/markdown-index/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func (c *client) Changes() []func(context.Context) (string, []string, error) {
}

// PRTitleBody returns the body of the PR, this function runs after each commit
func (c *client) PRTitleBody() (string, string, error) {
return "Update index.md", "", nil
func (c *client) PRTitleBody() (string, string) {
return "Update index.md", ""
}

// options is the options for autobumper operations.
Expand Down
Loading

0 comments on commit db7fb7b

Please sign in to comment.