-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Start go build and release tooling #8935
base: master
Are you sure you want to change the base?
Conversation
+ minor cleanups
@@ -0,0 +1,44 @@ | |||
module github.com/projectcalico/fixham |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we probably want to use the same go.mod / go.sum as the root of the project here? Is there a reason you have in mind not to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixham is a separate module that can be use on its own similar to api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe since we're narrowing in on release logic, we don't need to treat fixham as a library to be imported, rather it's a CLI tool that will orchestrate the release. So with that in mind, I think it will be better to use the existing go.mod / go.sum from the repository root.
40970c2
to
ea3550f
Compare
TODO: fix test
26a358c
to
cb7b9aa
Compare
return types.ContainerExecInspect{}, err | ||
} | ||
|
||
logrus.WithField("cmd", cmd).Print("printing output...\n", string(output), "\n...end of output") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably want to use logrus.WithField().Infof
tasks map[string]*goyek.DefinedTask | ||
} | ||
|
||
// NewBuilder returns a new Component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a type Component
anywhere - this comment is probably wrong.
@@ -22,6 +22,8 @@ UBI_VERSION=8.10 | |||
# Configuration for Semaphore integration. | |||
ORGANIZATION = projectcalico | |||
|
|||
export REPO_ROOT := $(shell git rev-parse --show-toplevel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't need this. The fixham
Makefile should just import both lib.Makefile
and metadata.mk
and then export the variables that it needs itself.
Same for the GO_BUILD_VER above.
api/build/update-client-gen.sh
Outdated
@@ -1,44 +0,0 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is removing this related to fixham at all? Is this just unused code?
@@ -1,3 +1,4 @@ | |||
NAME = projectcalico |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "NAME"?
This seems more like "ORGANIZATION", which is already defined in metadata.mk
.PHONY: default | ||
default: fixham | ||
|
||
.PHONY: bin/fixham |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bin/fixham isn't a PHONY target. PHONY should only be used on targets that don't actually produce a file, whereas bin/fixham does produce the file bin/fixham
.
fixham: bin/fixham | ||
@bin/fixham $(ARGS) | ||
|
||
.PHONY: % |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unnecessary to me
@@ -0,0 +1,22 @@ | |||
include ../metadata.mk | |||
|
|||
export NAME = fixham |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These shouldn't be exported. If you want to use them in a target, you should pass them as environment variables to the commands in that target.
Organization string `envconfig:"ORGANIZATION"` | ||
// GoBuildImageName is the name of the go-build image | ||
// if wanting to override calico/go-build | ||
GoBuildImageName string `envconfig:"GO_BUILD_IMAGE" default:"calico/go-build"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nit, but these should have newlines before any commends for readability. e.g.,
Name string `envconfig:"NAME"`
PackageName string `envconfig:"PACKAGE_NAME" required:"true"`
Organization string `envconfig:"ORGANIZATION"`
// GoBuildImageName is the name of the go-build image
// if wanting to override calico/go-build
GoBuildImageName string `envconfig:"GO_BUILD_IMAGE" default:"calico/go-build"`
// GoBuildVersion is the version of the go-build image
GoBuildVersion string `envconfig:"GO_BUILD_VER" required:"true"`
@@ -0,0 +1,44 @@ | |||
module github.com/projectcalico/fixham |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe since we're narrowing in on release logic, we don't need to treat fixham as a library to be imported, rather it's a CLI tool that will orchestrate the release. So with that in mind, I think it will be better to use the existing go.mod / go.sum from the repository root.
Description
This is the core base of the go release tooling that will replace useage of Makefile and hack/release for a more cohesive process. It tries to adhere to standard go project layout
The borrows from the town in Bob the Builder: Ready Steady Build
Related issues/PRs
N/A
Todos
Release Note
I'm going to go with not required atm until it gets intergrated
Reminder for the reviewer
Make sure that this PR has the correct labels and milestone set.
Every PR needs one
docs-*
label.docs-pr-required
: This change requires a change to the documentation that has not been completed yet.docs-completed
: This change has all necessary documentation completed.docs-not-required
: This change has no user-facing impact and requires no docs.Every PR needs one
release-note-*
label.release-note-required
: This PR has user-facing changes. Most PRs should have this label.release-note-not-required
: This PR has no user-facing changes.Other optional labels:
cherry-pick-candidate
: This PR should be cherry-picked to an earlier release. For bug fixes only.needs-operator-pr
: This PR is related to install and requires a corresponding change to the operator.