Skip to content

Commit

Permalink
Unpin Bazel version (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrisco authored Dec 10, 2024
1 parent bdeb239 commit e2d2ca8
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 71 deletions.
1 change: 0 additions & 1 deletion .bazelversion

This file was deleted.

2 changes: 1 addition & 1 deletion .bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bcr_test_module:
module_path: "."
matrix:
platform: ["macos", "ubuntu2004", "windows"]
bazel: ["6.x", "7.x"]
bazel: ["7.x", "8.x"]
tasks:
run_tests:
name: "Run test module"
Expand Down
69 changes: 3 additions & 66 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
if: startswith(runner.os, 'Windows')
- name: Setup Bazelrc
run: |
echo "common --noenable_bzlmod" >> ./user.bazelrc
echo "common --keep_going" >> ./user.bazelrc
# Build and Test the code
Expand Down Expand Up @@ -125,68 +124,6 @@ jobs:
- name: Setup Bazelrc
run: |
echo "common --config=strict" >> ./user.bazelrc
echo "common --noenable_bzlmod" >> ./user.bazelrc
echo "common --keep_going" >> ./user.bazelrc
# Build and Test the code
- name: Test (Unix)
run: bazel ${BAZEL_STARTUP_FLAGS[@]} test //...
if: startswith(runner.os, 'Windows') != true
- name: Test (Windows)
run: bazel $env:BAZEL_STARTUP_FLAGS test //...
if: startswith(runner.os, 'Windows')

ci-bzlmod:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-14
- os: ubuntu-20.04
- os: windows-2019
steps:
# Checkout the code
- uses: actions/checkout@v2

# Caches and restores the Bazel outputs.
- name: Retain Bazel cache (linux)
uses: actions/cache@v2
env:
cache-name: bazel-cache
with:
path: |
~/.cache/bazelisk
~/.cache/bazel
key: ${{ runner.os }}-${{ env.cache-name }}
if: startswith(runner.os, 'Linux')
- name: Retain Bazel cache (MacOS)
uses: actions/cache@v2
env:
cache-name: bazel-cache
with:
path: |
~/.cache/bazelisk
/private/var/tmp/_bazel_runner
key: ${{ runner.os }}-${{ env.cache-name }}
if: startswith(runner.os, 'MacOS')
- name: Retain Bazel cache (Windows)
uses: actions/cache@v2
env:
cache-name: bazel-cache
with:
path: |
~/.cache/bazelisk
C:/bzl
key: ${{ runner.os }}-${{ env.cache-name }}
if: startswith(runner.os, 'Windows')

- name: Setup Bazelrc (Windows)
run: echo "startup --output_user_root=C:/bzl" > ./user.bazelrc
if: startswith(runner.os, 'Windows')
- name: Setup Bazelrc
run: |
echo "common --config=strict" >> ./user.bazelrc
echo "common --enable_bzlmod" >> ./user.bazelrc
echo "common --keep_going" >> ./user.bazelrc
# Build and Test the code
Expand All @@ -198,19 +135,19 @@ jobs:
if: startswith(runner.os, 'Windows')

ci-buildifier:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v2
- name: Download Buildifier
run: |
wget "https://github.com/bazelbuild/buildtools/releases/download/v6.3.3/buildifier-linux-amd64" -O buildifier
wget "https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-linux-amd64" -O buildifier
chmod +x buildifier
- name: Buildifier
run: ./buildifier -lint=warn -mode=check -warnings=all -r ${{ github.workspace }}

ci-gofmt:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Jerome1337/[email protected]
Expand Down
5 changes: 4 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bazel_dep(name = "rules_go", version = "0.50.1", repo_name = "io_bazel_rules_go"
# https://github.com/bazel-contrib/rules_oci/issues/575
bazel_dep(name = "aspect_bazel_lib", version = "2.7.2", dev_dependency = True)
bazel_dep(name = "rules_oci", version = "2.0.0", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc")
bazel_dep(name = "stardoc", version = "0.7.1", dev_dependency = True, repo_name = "io_bazel_stardoc")

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.23.0")
Expand Down Expand Up @@ -43,6 +43,9 @@ register_toolchains(
helm_test = use_extension("@rules_helm//tests:test_extensions.bzl", "helm_test", dev_dependency = True)
use_repo(
helm_test,
"helm_cm_push_linux",
"helm_cm_push_macos",
"helm_cm_push_windows",
"helm_test_deps__with_chart_deps_postgresql",
"helm_test_deps__with_chart_deps_redis",
"rules_helm_test_container_base",
Expand Down
43 changes: 41 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ genrule(
## chart_file

<pre>
load("@rules_helm//helm:defs.bzl", "chart_file")

chart_file(<a href="#chart_file-name">name</a>, <a href="#chart_file-api_version">api_version</a>, <a href="#chart_file-app_version">app_version</a>, <a href="#chart_file-chart_name">chart_name</a>, <a href="#chart_file-description">description</a>, <a href="#chart_file-type">type</a>, <a href="#chart_file-version">version</a>)
</pre>

Expand All @@ -100,6 +102,8 @@ Create a Helm chart file.
## helm_import

<pre>
load("@rules_helm//helm:defs.bzl", "helm_import")

helm_import(<a href="#helm_import-name">name</a>, <a href="#helm_import-chart">chart</a>, <a href="#helm_import-version">version</a>)
</pre>

Expand All @@ -120,6 +124,8 @@ A rule that allows pre-packaged Helm charts to be used within Bazel.
## helm_install

<pre>
load("@rules_helm//helm:defs.bzl", "helm_install")

helm_install(<a href="#helm_install-name">name</a>, <a href="#helm_install-data">data</a>, <a href="#helm_install-helm_opts">helm_opts</a>, <a href="#helm_install-install_name">install_name</a>, <a href="#helm_install-opts">opts</a>, <a href="#helm_install-package">package</a>)
</pre>

Expand All @@ -143,6 +149,8 @@ Produce an executable for performing a `helm install` operation.
## helm_lint_test

<pre>
load("@rules_helm//helm:defs.bzl", "helm_lint_test")

helm_lint_test(<a href="#helm_lint_test-name">name</a>, <a href="#helm_lint_test-chart">chart</a>)
</pre>

Expand All @@ -162,6 +170,8 @@ A rule for performing `helm lint` on a helm package
## helm_package

<pre>
load("@rules_helm//helm:defs.bzl", "helm_package")

helm_package(<a href="#helm_package-name">name</a>, <a href="#helm_package-deps">deps</a>, <a href="#helm_package-chart">chart</a>, <a href="#helm_package-chart_json">chart_json</a>, <a href="#helm_package-crds">crds</a>, <a href="#helm_package-images">images</a>, <a href="#helm_package-stamp">stamp</a>, <a href="#helm_package-substitutions">substitutions</a>, <a href="#helm_package-templates">templates</a>, <a href="#helm_package-values">values</a>,
<a href="#helm_package-values_json">values_json</a>)
</pre>
Expand Down Expand Up @@ -191,6 +201,8 @@ Rules for creating Helm chart packages.
## helm_plugin

<pre>
load("@rules_helm//helm:defs.bzl", "helm_plugin")

helm_plugin(<a href="#helm_plugin-name">name</a>, <a href="#helm_plugin-data">data</a>, <a href="#helm_plugin-plugin_name">plugin_name</a>, <a href="#helm_plugin-yaml">yaml</a>)
</pre>

Expand All @@ -212,6 +224,8 @@ Define a [helm plugin](https://helm.sh/docs/topics/plugins/).
## helm_push

<pre>
load("@rules_helm//helm:defs.bzl", "helm_push")

helm_push(<a href="#helm_push-name">name</a>, <a href="#helm_push-env">env</a>, <a href="#helm_push-include_images">include_images</a>, <a href="#helm_push-login_url">login_url</a>, <a href="#helm_push-package">package</a>, <a href="#helm_push-registry_url">registry_url</a>)
</pre>

Expand Down Expand Up @@ -240,6 +254,8 @@ if the following environment variables are defined:
## helm_push_images

<pre>
load("@rules_helm//helm:defs.bzl", "helm_push_images")

helm_push_images(<a href="#helm_push_images-name">name</a>, <a href="#helm_push_images-env">env</a>, <a href="#helm_push_images-package">package</a>)
</pre>

Expand All @@ -260,6 +276,8 @@ Produce an executable for pushing all oci images used by a helm chart.
## helm_push_registry

<pre>
load("@rules_helm//helm:defs.bzl", "helm_push_registry")

helm_push_registry(<a href="#helm_push_registry-name">name</a>, <a href="#helm_push_registry-env">env</a>, <a href="#helm_push_registry-include_images">include_images</a>, <a href="#helm_push_registry-login_url">login_url</a>, <a href="#helm_push_registry-package">package</a>, <a href="#helm_push_registry-registry_url">registry_url</a>)
</pre>

Expand Down Expand Up @@ -288,6 +306,8 @@ if the following environment variables are defined:
## helm_template_test

<pre>
load("@rules_helm//helm:defs.bzl", "helm_template_test")

helm_template_test(<a href="#helm_template_test-name">name</a>, <a href="#helm_template_test-chart">chart</a>, <a href="#helm_template_test-installer">installer</a>)
</pre>

Expand All @@ -308,6 +328,8 @@ A test rule for rendering helm chart templates.
## helm_toolchain

<pre>
load("@rules_helm//helm:defs.bzl", "helm_toolchain")

helm_toolchain(<a href="#helm_toolchain-name">name</a>, <a href="#helm_toolchain-helm">helm</a>, <a href="#helm_toolchain-plugins">plugins</a>)
</pre>

Expand All @@ -328,6 +350,8 @@ A helm toolchain.
## helm_uninstall

<pre>
load("@rules_helm//helm:defs.bzl", "helm_uninstall")

helm_uninstall(<a href="#helm_uninstall-name">name</a>, <a href="#helm_uninstall-data">data</a>, <a href="#helm_uninstall-helm_opts">helm_opts</a>, <a href="#helm_uninstall-install_name">install_name</a>, <a href="#helm_uninstall-opts">opts</a>)
</pre>

Expand All @@ -350,6 +374,8 @@ Produce an executable for performing a `helm uninstall` operation.
## helm_upgrade

<pre>
load("@rules_helm//helm:defs.bzl", "helm_upgrade")

helm_upgrade(<a href="#helm_upgrade-name">name</a>, <a href="#helm_upgrade-data">data</a>, <a href="#helm_upgrade-helm_opts">helm_opts</a>, <a href="#helm_upgrade-install_name">install_name</a>, <a href="#helm_upgrade-opts">opts</a>, <a href="#helm_upgrade-package">package</a>)
</pre>

Expand All @@ -373,14 +399,15 @@ Produce an executable for performing a `helm upgrade` operation.
## HelmPackageInfo

<pre>
load("@rules_helm//helm:defs.bzl", "HelmPackageInfo")

HelmPackageInfo(<a href="#HelmPackageInfo-chart">chart</a>, <a href="#HelmPackageInfo-images">images</a>, <a href="#HelmPackageInfo-metadata">metadata</a>)
</pre>

A provider for helm packages

**FIELDS**


| Name | Description |
| :------------- | :------------- |
| <a id="HelmPackageInfo-chart"></a>chart | File: The result of `helm package` |
Expand All @@ -393,6 +420,8 @@ A provider for helm packages
## chart_content

<pre>
load("@rules_helm//helm:defs.bzl", "chart_content")

chart_content(<a href="#chart_content-name">name</a>, <a href="#chart_content-api_version">api_version</a>, <a href="#chart_content-description">description</a>, <a href="#chart_content-type">type</a>, <a href="#chart_content-version">version</a>, <a href="#chart_content-app_version">app_version</a>)
</pre>

Expand Down Expand Up @@ -420,9 +449,11 @@ str: A json encoded string which represents `Chart.yaml` contents.
## helm_chart

<pre>
load("@rules_helm//helm:defs.bzl", "helm_chart")

helm_chart(<a href="#helm_chart-name">name</a>, <a href="#helm_chart-chart">chart</a>, <a href="#helm_chart-chart_json">chart_json</a>, <a href="#helm_chart-crds">crds</a>, <a href="#helm_chart-values">values</a>, <a href="#helm_chart-values_json">values_json</a>, <a href="#helm_chart-substitutions">substitutions</a>, <a href="#helm_chart-templates">templates</a>, <a href="#helm_chart-images">images</a>,
<a href="#helm_chart-deps">deps</a>, <a href="#helm_chart-install_name">install_name</a>, <a href="#helm_chart-registry_url">registry_url</a>, <a href="#helm_chart-login_url">login_url</a>, <a href="#helm_chart-helm_opts">helm_opts</a>, <a href="#helm_chart-install_opts">install_opts</a>, <a href="#helm_chart-upgrade_opts">upgrade_opts</a>,
<a href="#helm_chart-uninstall_opts">uninstall_opts</a>, <a href="#helm_chart-data">data</a>, <a href="#helm_chart-stamp">stamp</a>, <a href="#helm_chart-kwargs">kwargs</a>)
<a href="#helm_chart-uninstall_opts">uninstall_opts</a>, <a href="#helm_chart-data">data</a>, <a href="#helm_chart-stamp">stamp</a>, <a href="#helm_chart-kwargs">**kwargs</a>)
</pre>

Rules for producing a helm package and some convenience targets.
Expand Down Expand Up @@ -470,6 +501,8 @@ Rules for producing a helm package and some convenience targets.
## helm_register_toolchains

<pre>
load("@rules_helm//helm:defs.bzl", "helm_register_toolchains")

helm_register_toolchains(<a href="#helm_register_toolchains-version">version</a>, <a href="#helm_register_toolchains-helm_url_templates">helm_url_templates</a>, <a href="#helm_register_toolchains-plugins">plugins</a>)
</pre>

Expand All @@ -490,6 +523,8 @@ Register helm toolchains.
## rules_helm_dependencies

<pre>
load("@rules_helm//helm:defs.bzl", "rules_helm_dependencies")

rules_helm_dependencies()
</pre>

Expand All @@ -502,6 +537,8 @@ Defines helm dependencies
## helm_lint_aspect

<pre>
load("@rules_helm//helm:defs.bzl", "helm_lint_aspect")

helm_lint_aspect(<a href="#helm_lint_aspect-name">name</a>)
</pre>

Expand All @@ -524,6 +561,8 @@ An aspect for running `helm lint` on helm package targets
## helm_import_repository

<pre>
load("@rules_helm//helm:defs.bzl", "helm_import_repository")

helm_import_repository(<a href="#helm_import_repository-name">name</a>, <a href="#helm_import_repository-chart_name">chart_name</a>, <a href="#helm_import_repository-repo_mapping">repo_mapping</a>, <a href="#helm_import_repository-repository">repository</a>, <a href="#helm_import_repository-sha256">sha256</a>, <a href="#helm_import_repository-url">url</a>, <a href="#helm_import_repository-version">version</a>)
</pre>

Expand Down

0 comments on commit e2d2ca8

Please sign in to comment.