forked from bazelbuild/rules_docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base stamping decisions on --stamp configuration, not attributes on t…
…he rule This follows the example of rules_go and rules_nodejs. It means we don't produce cache-busting outputs unless the user explicitly requests non-deteriminism in the build with --stamp. BREAKING CHANGE: - To get stamped outputs, users must now call bazel with `--stamp` - the stamp attribute was removed from some providers - the stamp attribute was deprecated on container_push and container_bundle, it is now removed - the stamp attribute was removed from container_image, there is no replacement Fixes bazelbuild#1451
- Loading branch information
Showing
9 changed files
with
82 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"build_context_data rule" | ||
|
||
load("@io_bazel_rules_docker//container:providers.bzl", "BuildContextInfo") | ||
|
||
_DOC = """build_context_data gathers information about the build configuration. | ||
It is a common dependency of all targets that are sensitive to configuration.""" | ||
|
||
def _impl(ctx): | ||
return [BuildContextInfo(stamp = ctx.attr.stamp)] | ||
|
||
# Modelled after go_context_data in rules_go | ||
# Works around github.com/bazelbuild/bazel/issues/1054 | ||
build_context_data = rule( | ||
implementation = _impl, | ||
attrs = { | ||
"stamp": attr.bool(mandatory = True), | ||
}, | ||
doc = _DOC, | ||
) |
Oops, something went wrong.