-
Notifications
You must be signed in to change notification settings - Fork 489
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
build: support local state group #2038
Conversation
a384ee3
to
d1921b6
Compare
Reworked a bit build invocation in first commit as Now it saves the raw definition, inputs and targets for the group. Also needs to save the target for each state ref so we can associate them with the definition.
|
540a88f
to
68e0077
Compare
68e0077
to
c54d933
Compare
c54d933
to
90f951e
Compare
@tonistiigi As discussed, remove variadic opts and adds another arg to |
231ed85
to
b335f04
Compare
1e345f6
to
ebd0a72
Compare
Definition []byte | ||
// Targets are the targets invoked | ||
Targets []string `json:",omitempty"` | ||
// Inputs are the user inputs (bake overrides) |
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.
So no variables? Ok by me to leave this for follow-up but comments seem to suggest that this was already added.
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.
Will look in follow-up. It's a bit tricky as the matrix
feature hacks around variables so we can't just pick them.
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 if you want the values that the variables are evaluated to, you'd need to modify hclparser.Parse
to return that information. I don't think there's a way to extract the vars/funcs defined in the HCL today 😢
Apologies, the code around there is a total mess - happy to help out 😄
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.
you'd need to modify
hclparser.Parse
to return that information.
Yes indeed, I have started to look at it and how I could use context evaluation to extract vanilla variables. Will open a PR and let you know, thx!
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]>
ebd0a72
to
130e9fe
Compare
follow-up #1735
We currently support saving local state for a build ref but we can't associate multiple refs when building a group of targets. This PR adds support for saving the local state group so we can identify refs that belong to the same group of targets.