forked from eBay/rules_ytt
-
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.
- Loading branch information
Showing
10 changed files
with
230 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
load("@bazel_skylib//:bzl_library.bzl", "bzl_library") | ||
|
||
exports_files( | ||
["defs.bzl"], | ||
visibility = ["//docs:__pkg__"], | ||
) | ||
|
||
bzl_library( | ||
name = "defs", | ||
srcs = ["defs.bzl"], | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//ytt/private:ytt", | ||
"//ytt:repositories", | ||
], | ||
) |
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,15 @@ | ||
# This load statement must be in the docs/ package rather than anything users depend on | ||
# so that the dependency on stardoc doesn't leak to them. | ||
load("@aspect_bazel_lib//lib:docs.bzl", "stardoc_with_diff_test", "update_docs") | ||
|
||
stardoc_with_diff_test( | ||
name = "ytt", | ||
bzl_library_target = "//:defs", | ||
) | ||
|
||
stardoc_with_diff_test( | ||
name = "repositories", | ||
bzl_library_target = "//ytt:repositories", | ||
) | ||
|
||
update_docs(name = "update") |
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,99 @@ | ||
<!-- Generated with Stardoc: http://skydoc.bazel.build --> | ||
|
||
Declare runtime dependencies | ||
|
||
These are needed for local dev, and users must install them as well. | ||
See https://docs.bazel.build/versions/main/skylark/deploying.html#dependencies | ||
|
||
|
||
<a id="ytt_repositories"></a> | ||
|
||
## ytt_repositories | ||
|
||
<pre> | ||
ytt_repositories(<a href="#ytt_repositories-name">name</a>, <a href="#ytt_repositories-platform">platform</a>, <a href="#ytt_repositories-repo_mapping">repo_mapping</a>, <a href="#ytt_repositories-ytt_version">ytt_version</a>) | ||
</pre> | ||
|
||
Fetch external tools needed for ytt toolchain | ||
|
||
**ATTRIBUTES** | ||
|
||
|
||
| Name | Description | Type | Mandatory | Default | | ||
| :------------- | :------------- | :------------- | :------------- | :------------- | | ||
| <a id="ytt_repositories-name"></a>name | A unique name for this repository. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | | ||
| <a id="ytt_repositories-platform"></a>platform | - | String | required | | | ||
| <a id="ytt_repositories-repo_mapping"></a>repo_mapping | A dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.<p>For example, an entry <code>"@foo": "@bar"</code> declares that, for any time this repository depends on <code>@foo</code> (such as a dependency on <code>@foo//some:target</code>, it should actually resolve that dependency within globally-declared <code>@bar</code> (<code>@bar//some:target</code>). | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | required | | | ||
| <a id="ytt_repositories-ytt_version"></a>ytt_version | - | String | required | | | ||
|
||
|
||
<a id="http_archive"></a> | ||
|
||
## http_archive | ||
|
||
<pre> | ||
http_archive(<a href="#http_archive-name">name</a>, <a href="#http_archive-kwargs">kwargs</a>) | ||
</pre> | ||
|
||
|
||
|
||
**PARAMETERS** | ||
|
||
|
||
| Name | Description | Default Value | | ||
| :------------- | :------------- | :------------- | | ||
| <a id="http_archive-name"></a>name | <p align="center"> - </p> | none | | ||
| <a id="http_archive-kwargs"></a>kwargs | <p align="center"> - </p> | none | | ||
|
||
|
||
<a id="rules_ytt_dependencies"></a> | ||
|
||
## rules_ytt_dependencies | ||
|
||
<pre> | ||
rules_ytt_dependencies() | ||
</pre> | ||
|
||
rules_ytt runtime dependencies. | ||
|
||
|
||
|
||
<a id="rules_ytt_internal_dependencies"></a> | ||
|
||
## rules_ytt_internal_dependencies | ||
|
||
<pre> | ||
rules_ytt_internal_dependencies() | ||
</pre> | ||
|
||
rules_ytt dependencies for internal use only. | ||
|
||
|
||
|
||
<a id="rules_ytt_register_toolchains"></a> | ||
|
||
## rules_ytt_register_toolchains | ||
|
||
<pre> | ||
rules_ytt_register_toolchains(<a href="#rules_ytt_register_toolchains-name">name</a>, <a href="#rules_ytt_register_toolchains-version">version</a>, <a href="#rules_ytt_register_toolchains-kwargs">kwargs</a>) | ||
</pre> | ||
|
||
Convenience macro for users which does typical setup. | ||
|
||
- create a repository for each built-in platform like "ytt_linux_amd64" - | ||
this repository is lazily fetched when node is needed for that platform. | ||
- create a repository exposing toolchains for each platform like "ytt_platforms" | ||
- register a toolchain pointing at each platform | ||
Users can avoid this macro and do these steps themselves, if they want more control. | ||
|
||
|
||
**PARAMETERS** | ||
|
||
|
||
| Name | Description | Default Value | | ||
| :------------- | :------------- | :------------- | | ||
| <a id="rules_ytt_register_toolchains-name"></a>name | base name for all created repos, like "ytt" | <code>"ytt"</code> | | ||
| <a id="rules_ytt_register_toolchains-version"></a>version | Ytt tool version. Supported versions are listed in [versions.bzl](private/versions.bzl). | <code>"0.46.2"</code> | | ||
| <a id="rules_ytt_register_toolchains-kwargs"></a>kwargs | passed to each node_repositories call | none | | ||
|
||
|
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,24 @@ | ||
<!-- Generated with Stardoc: http://skydoc.bazel.build --> | ||
|
||
|
||
|
||
<a id="ytt"></a> | ||
|
||
## ytt | ||
|
||
<pre> | ||
ytt(<a href="#ytt-name">name</a>, <a href="#ytt-image">image</a>, <a href="#ytt-srcs">srcs</a>) | ||
</pre> | ||
|
||
|
||
|
||
**ATTRIBUTES** | ||
|
||
|
||
| Name | Description | Type | Mandatory | Default | | ||
| :------------- | :------------- | :------------- | :------------- | :------------- | | ||
| <a id="ytt-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | | ||
| <a id="ytt-image"></a>image | (DEPRECATED) Target that generates a Docker image. Used for extracting image digest. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> | | ||
| <a id="ytt-srcs"></a>srcs | List of files that will be passed to ytt with -f param. | <a href="https://bazel.build/concepts/labels">List of labels</a> | required | | | ||
|
||
|
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,21 @@ | ||
load("@bazel_skylib//:bzl_library.bzl", "bzl_library") | ||
|
||
bzl_library( | ||
name = "ytt", | ||
srcs = ["ytt.bzl"], | ||
visibility = [ | ||
"//:__subpackages__", | ||
], | ||
) | ||
|
||
bzl_library( | ||
name = "toolchains_repo", | ||
srcs = ["toolchains_repo.bzl"], | ||
visibility = ["//ytt:__subpackages__"], | ||
) | ||
|
||
bzl_library( | ||
name = "versions", | ||
srcs = ["versions.bzl"], | ||
visibility = ["//ytt:__subpackages__"], | ||
) |
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