-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add API build trigger #2201
Add API build trigger #2201
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2201 +/- ##
==========================================
- Coverage 58.56% 58.14% -0.42%
==========================================
Files 188 188
Lines 7792 7863 +71
==========================================
+ Hits 4563 4572 +9
- Misses 2858 2919 +61
- Partials 371 372 +1
Continue to review full report at Codecov.
|
Can you give an example how this works? Or is this part of |
exactly, sorry I wasn't very descriptive here. the default trigger is
users can also use a gRPC client instead of curl and achieve the same result. conn, err := grpc.Dial(skaffoldRPCAddr, grpc.WithInsecure())
if err != nil {
fmt.Printf("error opening connection: %s\n", err.Error())
os.Exit(1)
}
defer conn.Close()
client := proto.NewSkaffoldServiceClient(conn)
_, err := client.Build(ctx, &empty.Empty{})
if err != nil {
fmt.Printf("error issuing build request: %v\n", err)
} |
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.
Overall this looks good. Just few clarifications.
e3eb796
to
cd0e10b
Compare
This looks great! Another example: Not to be tackled in this PR, but would be great to know if we plan to do this future. |
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.
LGTM except a nit on apiServer.Interval
@tejal29 spot on, I'll be sending a follow up PR that adds a trigger for deploys as well. the idea is to split the dev loop into its individual components and give users the ability to control each one independently (if they want to). I haven't figured out the story for testing yet though: I originally considered it to be part of the build step, but your example makes a good point. I suppose users could specify their test files as build dependencies for the artifact they're testing, but I'll think more about it. |
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.
looking good, I have only one concern left
b20c50d
to
b429454
Compare
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.
LGTM
This adds an API build trigger type, which allows users to use the gRPC/HTTP server in skaffold to trigger builds in place of the polling/manual triggers.
When using the API trigger in dev mode, skaffold will only rebuild images if a trigger is issued by the user (and if files have changed since the last rebuild).