Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Go-native tool #17

Open
Tracked by #254
cardil opened this issue Oct 10, 2023 · 3 comments
Open
Tracked by #254

Release Go-native tool #17

cardil opened this issue Oct 10, 2023 · 3 comments
Labels
kind/enhancement triage/accepted Issues which should be fixed (post-triage)

Comments

@cardil
Copy link
Contributor

cardil commented Oct 10, 2023

Rewrite release.sh script (https://github.com/knative/hack/blob/main/README.md#using-the-releasesh-helper-script) into a Golang tool knative.dev/toolbox/releaser.

Invent new Go-native extension interface, for example:

# will look for Go files with `release` build constraints, that register build configuration
go run knative.dev/toolbox/releaser@latest ./ \
  --dot-release \
  --release-gcs knative-releases/kn-plugin-event \
  --release-gcr gcr.io/knative-releases \
  --github-token /etc/hub-token/token \
  --apple-codesign-key /etc/notary/cert.p12 \
  --apple-notary-api-key /etc/notary/key.json \
  --apple-codesign-password-file /etc/notary/password \
  --branch release-1.9

The release configuration might look like:

//go:build release
package serving

import (
  "fmt"
  "os"

  // Implemented with `github.com/bitfield/script` or similar
  "knative.dev/pkg/kscript/ko"
  "knative.dev/toolbox/releaser/pkg/config"
)

init {
  config.Configure(function(ctx config.Context) {
    f := must[*os.File](ko.Resolve("config").AsFile("release.yaml"))
    ctx.AddAsArtifact(f)
  })
}

func must[T any](ret T, err error) T {
  if err != nil {
    panic(err)
  }
  return ret
}
@cardil cardil changed the title release tool Release Go-native tool Oct 10, 2023
@cardil cardil transferred this issue from knative/hack Oct 10, 2023
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 25, 2024
@cardil
Copy link
Contributor Author

cardil commented Apr 5, 2024

/reopen
/remove-lifecycle stale
/triage accepted

@knative-prow knative-prow bot reopened this Apr 5, 2024
@knative-prow knative-prow bot added the triage/accepted Issues which should be fixed (post-triage) label Apr 5, 2024
Copy link

knative-prow bot commented Apr 5, 2024

@cardil: Reopened this issue.

In response to this:

/reopen
/remove-lifecycle stale
/triage accepted

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow knative-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
Development

No branches or pull requests

1 participant