-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat: Magefile #687
feat: Magefile #687
Conversation
Adds Build namespace with compile targets for Loki, Promtail and LogCLI
Ports lint and test targets from Makefile
Ports all helm related targets from Makefile
Adds magefile libraries required to build the build-chain
Adding targets to Makefile to install and upgrade mage. Experimenting with a `mage all` target
I'm liking this so far, my only gripe is that I wish you could default the I think we should continue to build out functionality. |
|
yeah true :) really I want to impose I think to keep the feel of loki similar to most go projects we should keep the makefile as a wrapper to mage, we can even go so far as adding the new I think we'd just have to figure out what targets to keep in the makefile |
type Assets mg.Namespace | ||
|
||
func (Assets) CheckAssets() error { | ||
err := sh.Run("git", "diff", "--exit-code", "pkg/promtail/server/ui") |
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.
git()
is available as a function (cmds.go
)
@sh0rez What was the end result of this experiment? We're contemplating investing in Mage to help with compatibility issues with Makefile and supporting devs on Windows/Max/Linux |
We went with Makefiles instead, mostly because shelling out in Go is not optimal, as it requires error checking, etc. But I am aware of many projects being very happy with Mage and it is by far the best Make alternative I have seen so far. |
Understood, thanks for the quick response! |
Adds a
magefile.go
as an exploratory effort whether it is worth it investing on that technology. Not intended to be merged yet. See #684 for referenceProgress overview:
all
assets
build-plugin
check_assets
check-generated-files
clean
cmd/docker-driver/docker-driver
cmd/docker-driver/docker-driver-debug
cmd/docker-driver/.uptodate
cmd/docker-driver/.uptodate-debug
cmd/logcli/logcli
(renamed tobuild:logcli
)cmd/logcli/logcli-debug
(renamed toDEBUG=true build:logcli
)cmd/logcli/.uptodate
cmd/logcli/.uptodate-debug
cmd/loki/loki
(renamed tobuild:loki
)cmd/loki/loki-debug
(renamed toDEBUG=true build:loki
)cmd/loki/.uptodate
cmd/loki/.uptodate-debug
cmd/promtail/promtail
(renamed tobuild:logcli
)cmd/promtail/promtail-debug
(renamed toDEBUG=true build:loki
)cmd/promtail/.uptodate
cmd/promtail/.uptodate-debug
debug
enable-plugin
helm
(renamed tohelm:build
)helm-clean
helm-install
helm-publish
helm-upgrade
images
lint
load-images
loki-build-image/.uptodate
pkg/logproto/logproto.pb.go
pkg/logql/expr.go
pkg/promtail/server/server.go
protos
push-images
push-latest
push-plugin
release-perform
release-prepare
save-images
shell
test
vendor/github.com/cortexproject/cortex/pkg/chunk/storage/caching_index_client.pb.go
vendor/github.com/cortexproject/cortex/pkg/ingester/client/cortex.pb.go
vendor/github.com/cortexproject/cortex/pkg/ring/ring.pb.go
yacc