-
Couldn't load subscription status.
- Fork 150
Add bake definition #567
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
base: main
Are you sure you want to change the base?
Add bake definition #567
Conversation
fb3a92f to
fbd52a6
Compare
e3f295b to
d7a9ec7
Compare
Signed-off-by: CrazyMax <[email protected]>
Also rename cross stage to binaries. cross does not make sense as name as the output is based on target platforms. Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
| assert.NotNil(t, db, "Database should be created successfully") | ||
|
|
||
| // Test with invalid path | ||
| _, err := NewMemoryDatabase("/:invalid:path") |
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.
/:invalid:path is technically valid:
#18 6.407 --- FAIL: TestNewMemoryDatabase (0.05s)
#18 6.407 sqlite_test.go:43:
#18 6.407 Error Trace: /src/pkg/memory/database/sqlite/sqlite_test.go:43
#18 6.407 Error: An error is expected but got nil.
#18 6.407 Test: TestNewMemoryDatabase
#18 6.407 Messages: Should fail with invalid database path
#18 6.407 FAIL
| @@ -1,6 +1 @@ | |||
| * | |||
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.
@dgageot prefers the "Ignore everything first and then add things that are needed one by one"
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 do :-)
| test: | ||
| desc: Run tests | ||
| cmd: go test ./... | ||
| sources: |
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.
Why did you remove the sources? Is this even needed now that we have the bake target, or maybe this should just call bake?
| @@ -1,6 +1,6 @@ | |||
| module github.com/docker/cagent | |||
|
|
|||
| go 1.25.3 | |||
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.
Why?
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'm sure there is a completely valid reason, I would just like to know why please :)
First containerized most of the tasks to avoid drifting with external tooling like golangci-lint, go version and so on.
Adds bake definition so we can avoid arbitrary targets from Taskfile and be consistent and repro between inner loop and ci environment. Here is a breakdown of the changes:
localstage in the Dockerfile has been removed since we now create non opinionated binary name.releaserstage has been added to create proper release artifacts if we want to upload them as GitHub Releases in the future.binariesif no target is specifiedvalidatetarget group runslint,testandlicensesimageandimage-crossbuild the cagent imagereleasetarget does a cross-build of the binaries and output release artifacts to./bin/releasebinariesandbinaries-crossbuild binaries and output to./bin/buildtestrun go test with coverage and output coverage result to./bin/coveragethat could then be uploaded to codecov if we want to, like we do for other projects https://app.codecov.io/gh/dockerlicensesruns go-licenses in a containerized env without need to install the binary.lintruns golangci-lint also in a containerized env without need to install the binary.