Skip to content

Commit

Permalink
add module rules_tf (#1265)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanndegat authored Jan 9, 2024
1 parent f63a63b commit 5fdfd0b
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 0 deletions.
61 changes: 61 additions & 0 deletions modules/rules_tf/0.0.1/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
module(
name = "rules_tf",
version = "0.0.1",
repo_name = "rules_tf",
compatibility_level = 1,
)

bazel_dep(name = "rules_license", version = "0.0.7")
bazel_dep(name = "rules_pkg", version = "0.9.1")
bazel_dep(name = "bazel_skylib", version = "1.4.2")
bazel_dep(name = "rules_python", version = "0.24.0")
bazel_dep(name = "platforms", version = "0.0.7")

repos = use_extension("@rules_tf//tf:extensions.bzl", "tf_repositories")

use_repo(
repos,
# linux_amd64
"terraform_linux_amd64",
"tflint_linux_amd64",
"tfdoc_linux_amd64",
"tofu_linux_amd64",
# linux_arm64
"terraform_linux_arm64",
"tflint_linux_arm64",
"tfdoc_linux_arm64",
"tofu_linux_arm64",
# darwin_amd64
"terraform_darwin_amd64",
"tflint_darwin_amd64",
"tfdoc_darwin_amd64",
"tofu_darwin_amd64",
# darwin_arm64
"terraform_darwin_arm64",
"tflint_darwin_arm64",
"tfdoc_darwin_arm64",
"tofu_darwin_arm64",
)

register_toolchains(
# linux_amd64
"@rules_tf//:terraform_linux_amd64_toolchain",
"@rules_tf//:tfdoc_linux_amd64_toolchain",
"@rules_tf//:tflint_linux_amd64_toolchain",
"@rules_tf//:tofu_linux_amd64_toolchain",
# linux_arm64
"@rules_tf//:terraform_linux_arm64_toolchain",
"@rules_tf//:tfdoc_linux_arm64_toolchain",
"@rules_tf//:tflint_linux_arm64_toolchain",
"@rules_tf//:tofu_linux_arm64_toolchain",
# darwin_amd64
"@rules_tf//:terraform_darwin_amd64_toolchain",
"@rules_tf//:tfdoc_darwin_amd64_toolchain",
"@rules_tf//:tflint_darwin_amd64_toolchain",
"@rules_tf//:tofu_darwin_amd64_toolchain",
# darwin_arm64
"@rules_tf//:terraform_darwin_arm64_toolchain",
"@rules_tf//:tfdoc_darwin_arm64_toolchain",
"@rules_tf//:tflint_darwin_arm64_toolchain",
"@rules_tf//:tofu_darwin_arm64_toolchain",
)
31 changes: 31 additions & 0 deletions modules/rules_tf/0.0.1/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
build_targets:
- '@rules_tf//...'
# Re-enable those targets when toolchain registration is supported.
- '-@rules_tf//tf/toolchains/git:*'

bcr_test_module:
module_path: tests/bcr
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
tasks:
run_test_module:
name: Run test module
platform: ${{ platform }}
build_targets:
- //...
test_targets:
- //...
6 changes: 6 additions & 0 deletions modules/rules_tf/0.0.1/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"url": "https://github.com/yanndegat/rules_tf/releases/download/v0.0.1/rules_tf-0.0.1.tar.gz",
"integrity": "sha256-dtxqsKoFQuxvoaT/XPOugB+2gNiMQuT31lI6SMfXUT8=",
"patch_strip": 0,
"patches": {}
}
17 changes: 17 additions & 0 deletions modules/rules_tf/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"homepage": "https://github.com/yanndegat/rules_tf/",
"maintainers": [
{
"email": "[email protected]",
"github": "yanndegat",
"name": "Yann DEGAT"
}
],
"repository": [
"github:yanndegat/rules_tf"
],
"versions": [
"0.0.1"
],
"yanked_versions": {}
}

0 comments on commit 5fdfd0b

Please sign in to comment.