generated from bazel-contrib/rules-template
-
Notifications
You must be signed in to change notification settings - Fork 13
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: implement apko rule #1
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
918b4a3
feat: implement apko rule
thesayyn a3dd751
address some of the changes.
thesayyn 1636f2d
move apko_image to private
thesayyn 2c5156f
implement --offline
thesayyn 82ed3da
cleanup & credential helper
thesayyn bb22c85
more fixes
thesayyn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,6 @@ | ||
# Generated by apko_bazelrc. DO NOT EDIT | ||
# Required for range requests for fetching the apk packages. | ||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests | ||
# Use https://www.base64decode.org/ to see what this base64 encoded command does. | ||
|
||
common --credential_helper="%workspace%/.apko/range.sh" |
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,4 @@ | ||
#!/usr/bin/env bash | ||
thesayyn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo -n '{"headers":{"Range":[' | ||
cat | sed -n 's/.*#_apk_range_bytes_\([[:digit:]]*-[[:digit:]]*\).*/"bytes=\1"/p' | tr -d '\n' | ||
echo ']}}' |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"homepage": "https://github.com/myorg/rules_mylang", | ||
"homepage": "https://github.com/chainguard-dev/rules_apko", | ||
"maintainers": [], | ||
"repository": ["github:myorg/rules_mylang"], | ||
"repository": ["github:chainguard-dev/rules_apko"], | ||
"versions": [], | ||
"yanked_versions": {} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"integrity": "**leave this alone**", | ||
"strip_prefix": "{REPO}-{VERSION}", | ||
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_mylang-{TAG}.tar.gz" | ||
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_apko-{TAG}.tar.gz" | ||
} |
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 |
---|---|---|
@@ -1,21 +1,38 @@ | ||
"Bazel dependencies" | ||
|
||
module( | ||
name = "com_myorg_rules_mylang", | ||
name = "rules_apko", | ||
version = "0.0.0", | ||
compatibility_level = 1, | ||
) | ||
|
||
bazel_dep(name = "bazel_skylib", version = "1.4.1") | ||
bazel_dep(name = "platforms", version = "0.0.5") | ||
bazel_dep(name = "aspect_bazel_lib", version = "1.34.5") | ||
|
||
bazel_dep(name = "gazelle", version = "0.29.0", dev_dependency = True, repo_name = "bazel_gazelle") | ||
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True) | ||
bazel_dep(name = "aspect_bazel_lib", version = "1.32.1", dev_dependency = True) | ||
bazel_dep(name = "buildifier_prebuilt", version = "6.1.0", dev_dependency = True) | ||
|
||
mylang = use_extension("//mylang:extensions.bzl", "mylang") | ||
mylang.toolchain(mylang_version = "1.14.2") | ||
use_repo(mylang, "mylang_toolchains") | ||
toolchain = use_extension("//apko:extensions.bzl", "apko") | ||
toolchain.toolchain(apko_version = "v0.0.0") | ||
use_repo(toolchain, "apko_toolchains") | ||
|
||
register_toolchains("@mylang_toolchains//:all") | ||
register_toolchains("@apko_toolchains//:all") | ||
|
||
# locks | ||
lock = use_extension( | ||
thesayyn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"//apko:extensions.bzl", | ||
"apko", | ||
dev_dependency = True, | ||
) | ||
lock.translate_lock( | ||
name = "examples_lock", | ||
lock = "//examples/lock:apko.lock.json", | ||
) | ||
lock.translate_lock( | ||
name = "examples_wolfi_base", | ||
lock = "//examples/wolfi-base:apko.lock.json", | ||
) | ||
use_repo(lock, "examples_lock") | ||
use_repo(lock, "examples_wolfi_base") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Would be great to have some public location talking about the problem and this clever solution, maybe a blog.aspect.dev post to start with? Or something on docs.aspect.build?