From 376d6c93a89906aabea69e69500b73641d62a8f9 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Wed, 21 Aug 2024 20:03:01 -0400 Subject: [PATCH] chore: cleanup Aspect Workflows before bazel-contrib hand-off --- .aspect/cli/config.yaml | 10 +- .aspect/workflows/README.md | 19 +- .aspect/workflows/bazelrc | 15 +- .aspect/workflows/config.yaml | 125 +-- .aspect/workflows/deps.bzl | 48 -- .bazeliskrc | 4 +- .circleci/BUILD.bazel | 61 -- .circleci/config.yml | 800 ------------------ .circleci/user-config.yml | 52 -- .github/workflows/ci.bazelrc | 10 - .shellcheckrc | 6 + .vale.ini | 19 + BUILD.bazel | 18 + MODULE.bazel | 2 +- WORKSPACE.bazel | 6 +- platforms/BUILD.bazel | 26 + platforms/config/BUILD.bazel | 29 + platforms/config/defs.bzl | 9 + tools/lint/BUILD.bazel | 28 + tools/lint/linters.bzl | 15 + .../vocabularies/engineering/accept.txt | 84 ++ .../vocabularies/engineering/reject.txt | 1 + tools/release/BUILD.bazel | 17 - 23 files changed, 269 insertions(+), 1135 deletions(-) delete mode 100644 .aspect/workflows/deps.bzl delete mode 100644 .circleci/BUILD.bazel delete mode 100644 .circleci/config.yml delete mode 100644 .circleci/user-config.yml create mode 100644 .shellcheckrc create mode 100644 .vale.ini create mode 100644 platforms/config/BUILD.bazel create mode 100644 platforms/config/defs.bzl create mode 100644 tools/lint/BUILD.bazel create mode 100644 tools/lint/linters.bzl create mode 100644 tools/lint/vale/config/vocabularies/engineering/accept.txt create mode 100644 tools/lint/vale/config/vocabularies/engineering/reject.txt diff --git a/.aspect/cli/config.yaml b/.aspect/cli/config.yaml index 383154592..b4f8a0a03 100644 --- a/.aspect/cli/config.yaml +++ b/.aspect/cli/config.yaml @@ -1,6 +1,4 @@ -configure: - languages: - javascript: false - go: false - kotlin: false - protobuf: true +lint: + aspects: + - //tools/lint:linters.bzl%vale + - //tools/lint:linters.bzl%shellcheck diff --git a/.aspect/workflows/README.md b/.aspect/workflows/README.md index 5660db511..c63cc6906 100644 --- a/.aspect/workflows/README.md +++ b/.aspect/workflows/README.md @@ -1,18 +1,5 @@ -# Aspect Workflows demonstration deployment +# Aspect Workflows -This deployment of [Aspect Workflows](https://www.aspect.build/workflows) is configured to run on GCP + CircleCI. +This deployment of [Aspect Workflows](https://www.aspect.build/workflows) is run on AWS + Buildkite. -You can see this Aspect Workflows demonstration deployment live at https://app.circleci.com/pipelines/github/aspect-build/bazel-lib. - -The two components of the configuration in this repository are, - -1. Aspect Workflows configuration yaml -1. CircleCI pipeline configuration - -## Aspect Workflows configuration yaml - -This is the [config.yaml](./config.yaml) file in this directory. - -## CircleCI pipeline configuration - -This is the [.circleci/config.yml](../../.circleci/config.yml) file. +You can see this Aspect Workflows demonstration deployment live at https://buildkite.com/aspect-build/bazel-lib. Learn more at https://aspect.build. diff --git a/.aspect/workflows/bazelrc b/.aspect/workflows/bazelrc index 2fb1561e9..a6e12c214 100644 --- a/.aspect/workflows/bazelrc +++ b/.aspect/workflows/bazelrc @@ -2,9 +2,12 @@ common --remote_download_outputs=minimal common --nobuild_runfile_links -common:aspect_rbe --extra_execution_platforms=@aspect_bazel_lib//platforms:x86_64_linux_remote -common:aspect_rbe --host_platform=@aspect_bazel_lib//platforms:x86_64_linux_remote -common:aspect_rbe --remote_executor=unix:///mnt/ephemeral/buildbarn/.cache/bb_clientd/grpc -common:aspect_rbe --genrule_strategy=remote,local -common:aspect_rbe --jobs=32 -common:aspect_rbe --remote_timeout=3600 +# remote execution +common --config=rbe + +common:rbe --extra_execution_platforms=@aspect_bazel_lib//platforms:x86_64_linux_remote +common:rbe --host_platform=@aspect_bazel_lib//platforms:x86_64_linux_remote +common:rbe --remote_executor=unix:///mnt/ephemeral/buildbarn/.cache/bb_clientd/grpc +common:rbe --genrule_strategy=remote,local +common:rbe --jobs=32 +common:rbe --remote_timeout=3600 diff --git a/.aspect/workflows/config.yaml b/.aspect/workflows/config.yaml index ec5e3b244..f153d2ec9 100644 --- a/.aspect/workflows/config.yaml +++ b/.aspect/workflows/config.yaml @@ -1,125 +1,24 @@ -queue: bazel-lib-default bazel: flags: - - --config=aspect_rbe + - workspaces: .: tasks: - - test: - targets: - - //... - - -//lib/tests/coreutils:ls_test # Broken on workflows CI & RBE - - -//lib/tests/tar:test_dirs # Broken on workflows CI & RBE - - configure: - bazel: - flags: [] # TODO: Aspect CLI does not support --config for configure cmd - e2e/copy_action: - icon: bazel - tasks: - - test: - queue: bazel-lib-small - - format: - without: true - - gazelle: - without: true - - configure: - without: true - - buildifier: - without: true - - delivery: - without: true - e2e/copy_to_directory: - icon: bazel - tasks: - - test: - queue: bazel-lib-small - - format: - without: true - - gazelle: - without: true - - configure: - without: true - - buildifier: - without: true - - delivery: - without: true - e2e/coreutils: - icon: bazel - tasks: - - test: - queue: bazel-lib-small - - format: - without: true - - gazelle: - without: true - - configure: - without: true - - buildifier: - without: true - - delivery: - without: true - e2e/external_copy_to_directory: - icon: bazel - tasks: - - test: - queue: bazel-lib-small - - format: - without: true - - gazelle: - without: true - - configure: - without: true - - buildifier: - without: true - - delivery: - without: true - e2e/smoke: - icon: bazel - tasks: - - test: - queue: bazel-lib-small - - format: - without: true - - gazelle: - without: true - - configure: - without: true - - buildifier: - without: true - - delivery: - without: true tasks: + - checkout: + update_strategy: rebase - test: - hooks: - - type: before_task - command: vmstat -a -S M -t 1 2>&1 > vmstat.out & - - type: after_task - command: cat vmstat.out - artifact_paths: - - vmstat.out + targets: + - //... + - -//lib/tests/coreutils:ls_test # Broken on workflows CI & RBE + - -//lib/tests/tar:test_dirs # Broken on workflows CI & RBE - format: - queue: bazel-lib-small + queue: aspect-small + - lint: + queue: aspect-small - gazelle: - queue: bazel-lib-small - - configure: - queue: bazel-lib-small + queue: aspect-small - buildifier: - queue: bazel-lib-small - - delivery: - queue: bazel-lib-default - auto_deliver: true - rules: - - deliverable: 'attr("tags", "\bdeliverable\b", //...)' - condition: - branches: - - main - - deliverable: - - //tools/release:tools_delivery - condition: - only_on_change: false - branches: - - main - - warming: - queue: bazel-lib-warming + queue: aspect-small notifications: github: {} diff --git a/.aspect/workflows/deps.bzl b/.aspect/workflows/deps.bzl deleted file mode 100644 index 962c964e4..000000000 --- a/.aspect/workflows/deps.bzl +++ /dev/null @@ -1,48 +0,0 @@ -"""Bazel dependencies for Aspect Workflows""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", _http_archive = "http_archive", _http_file = "http_file") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - -# TODO: move this to a rule set so repositories on Aspect Workflows can avoid this boilerplate -rosetta_version = "5.10.12" -rosetta_integrity = { - "darwin_aarch64": "sha256-AmrO0e44haDvaVCosuNCPONPTLflSWyHMmSVv7V6iO8=", - "darwin_x86_64": "sha256-9g21wDZPBKqP0Z/KCmULJhwH4SqsKqOS1ceRVg3TWYs=", - "linux_aarch64": "sha256-KncnXJfAstOI5savV+pCF8/AuPlJs1DG8xTwXstPmuM=", - "linux_x86_64": "sha256-1oyhGKI0yzL1Y/5IjFmWShl27Bs4TqFZNipVL2xb9wU=", -} - -# https://github.com/suzuki-shunsuke/circleci-config-merge/releases -# https://dev.to/suzukishunsuke/splitting-circleci-config-yml-10gk -circleci_config_merge_version = "1.1.6" -circleci_config_merge_integrity = { - "darwin_aarch64": "sha256-7cQeLrSVRZR+mQu/njn+x//EIb2bhTV2+J8fafRHpr4=", - "darwin_x86_64": "sha256-vHKDSdDaYK58MaudJ9yOPRKh+OT/LiTQV/9E07RL8qA=", - "linux_aarch64": "sha256-MaXVQmRK9q9LgsfM5ZzxCIIT8rUcOBbzJ8aVDgK6zWs=", - "linux_x86_64": "sha256-3eYJn7dShZD1oiS3cgXfqXwdDzclf/N97A2nh7ZfW+w=", -} - -def http_archive(name, **kwargs): - maybe(_http_archive, name = name, **kwargs) - -def http_file(name, **kwargs): - maybe(_http_file, name = name, **kwargs) - -# buildifier: disable=function-docstring -def fetch_workflows_deps(): - for platform_arch in rosetta_integrity.keys(): - http_file( - name = "rosetta_{}".format(platform_arch), - downloaded_file_path = "rosetta", - executable = True, - integrity = rosetta_integrity[platform_arch], - urls = ["https://static.aspect.build/aspect/{0}/rosetta_real_{1}".format(rosetta_version, platform_arch.replace("aarch64", "arm64"))], - ) - - for platform_arch in circleci_config_merge_integrity.keys(): - http_archive( - name = "circleci_config_merge_{}".format(platform_arch), - build_file_content = "exports_files([\"circleci-config-merge\"])", - integrity = circleci_config_merge_integrity[platform_arch], - urls = ["https://github.com/suzuki-shunsuke/circleci-config-merge/releases/download/v{0}/circleci-config-merge_{0}_{1}.tar.gz".format(circleci_config_merge_version, platform_arch.replace("aarch64", "arm64").replace("x86_64", "amd64"))], - ) diff --git a/.bazeliskrc b/.bazeliskrc index 269fbb0a0..3e55de460 100644 --- a/.bazeliskrc +++ b/.bazeliskrc @@ -1,2 +1,2 @@ -BAZELISK_BASE_URL=https://github.com/aspect-build/aspect-cli/releases/download -USE_BAZEL_VERSION=aspect/5.9.25 +BAZELISK_BASE_URL=https://static.aspect.build/aspect +USE_BAZEL_VERSION=aspect/2024.34.43 diff --git a/.circleci/BUILD.bazel b/.circleci/BUILD.bazel deleted file mode 100644 index 6dfea2a0e..000000000 --- a/.circleci/BUILD.bazel +++ /dev/null @@ -1,61 +0,0 @@ -load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_file") - -CIRCLECI_ORG = "aspect-build" - -CIRCLECI_USER_CONFIG_FILE = "//.circleci:user-config.yml" - -not_windows = select({ - # There isn't a published rosetta binary for windows as of Feb 2024 - "@platforms//os:windows": ["@platforms//:incompatible"], - "//conditions:default": [], -}) - -alias( - name = "rosetta", - actual = select({ - "@bazel_tools//src/conditions:darwin_arm64": "@rosetta_darwin_aarch64//file:rosetta", - "@bazel_tools//src/conditions:darwin_x86_64": "@rosetta_darwin_x86_64//file:rosetta", - "@bazel_tools//src/conditions:linux_aarch64": "@rosetta_linux_aarch64//file:rosetta", - "@bazel_tools//src/conditions:linux_x86_64": "@rosetta_linux_x86_64//file:rosetta", - }), - target_compatible_with = not_windows, -) - -alias( - name = "circleci-config-merge", - actual = select({ - "@bazel_tools//src/conditions:darwin_arm64": "@circleci_config_merge_darwin_aarch64//:circleci-config-merge", - "@bazel_tools//src/conditions:darwin_x86_64": "@circleci_config_merge_darwin_x86_64//:circleci-config-merge", - "@bazel_tools//src/conditions:linux_aarch64": "@circleci_config_merge_linux_aarch64//:circleci-config-merge", - "@bazel_tools//src/conditions:linux_x86_64": "@circleci_config_merge_linux_x86_64//:circleci-config-merge", - }), - target_compatible_with = not_windows, -) - -genrule( - name = "aspect_workflows_config", - srcs = ["//.aspect/workflows:config.yaml"], - outs = [":aspect-workflows-config.yml"], - cmd = "CI=1 CIRCLE_PROJECT_USERNAME={0} $(execpath :rosetta) steps --configuration .aspect/workflows/config.yaml --host circleci > $@".format(CIRCLECI_ORG), - target_compatible_with = not_windows, - tools = [":rosetta"], -) - -genrule( - name = "merge_config", - srcs = [ - ":aspect-workflows-config.yml", - CIRCLECI_USER_CONFIG_FILE, - ], - outs = [":_config.yml"], - cmd = "echo -e '# GENERATED FILE - DO NOT EDIT!\\n# Update with: bazel run //.circleci:write_merged_config' > $@ && $(execpath :circleci-config-merge) merge $(execpath :aspect-workflows-config.yml) $(execpath {0}) >> $@".format(CIRCLECI_USER_CONFIG_FILE), - target_compatible_with = not_windows, - tools = [":circleci-config-merge"], -) - -write_source_file( - name = "write_merged_config", - in_file = ":_config.yml", - out_file = "config.yml", - target_compatible_with = not_windows, -) diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 3da36c9e4..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,800 +0,0 @@ -# GENERATED FILE - DO NOT EDIT! -# Update with: bazel run //.circleci:write_merged_config -version: 2.1 -workflows: - aspect-workflows: - jobs: - - aw-auto-deliver: - context: [] - filters: - branches: - only: - - /^main$/ - requires: - - aw-root_workspace_test - workspace: . - - aw-buildifier: - context: [] - workspace: . - - aw-format: - context: [] - workspace: . - - aw-gazelle: - context: [] - workspace: . - - aw-root_workspace_configure: - context: [] - workspace: . - - aw-root_workspace_test: - context: [] - workspace: . - when: - and: - - not: << pipeline.parameters.perform_delivery >> - - not: - equal: - - scheduled_pipeline - - << pipeline.trigger_source >> - aspect-workflows-e2e-copy_action: - jobs: - - aw-e2e_copy_action_test: - context: [] - delivery_manifest: false - workspace: e2e/copy_action - when: - and: - - not: << pipeline.parameters.perform_delivery >> - - not: - equal: - - scheduled_pipeline - - << pipeline.trigger_source >> - aspect-workflows-e2e-copy_to_directory: - jobs: - - aw-e2e_copy_to_directory_test: - context: [] - delivery_manifest: false - workspace: e2e/copy_to_directory - when: - and: - - not: << pipeline.parameters.perform_delivery >> - - not: - equal: - - scheduled_pipeline - - << pipeline.trigger_source >> - aspect-workflows-e2e-coreutils: - jobs: - - aw-e2e_coreutils_test: - context: [] - delivery_manifest: false - workspace: e2e/coreutils - when: - and: - - not: << pipeline.parameters.perform_delivery >> - - not: - equal: - - scheduled_pipeline - - << pipeline.trigger_source >> - aspect-workflows-e2e-external_copy_to_directory: - jobs: - - aw-e2e_external_copy_to_directory_test: - context: [] - delivery_manifest: false - workspace: e2e/external_copy_to_directory - when: - and: - - not: << pipeline.parameters.perform_delivery >> - - not: - equal: - - scheduled_pipeline - - << pipeline.trigger_source >> - aspect-workflows-e2e-smoke: - jobs: - - aw-e2e_smoke_test: - context: [] - delivery_manifest: false - workspace: e2e/smoke - when: - and: - - not: << pipeline.parameters.perform_delivery >> - - not: - equal: - - scheduled_pipeline - - << pipeline.trigger_source >> - aspect-workflows-manual-deliver: - jobs: - - aw-manual-deliver: - context: [] - workspace: << pipeline.parameters.workspace >> - when: - equal: - - true - - << pipeline.parameters.perform_delivery >> - aspect-workflows-warming: - jobs: - - aw-warming: {} - when: - and: - - equal: - - scheduled_pipeline - - << pipeline.trigger_source >> - - equal: - - aspect-workflows-warming - - << pipeline.schedule.name >> - user-workflow: - jobs: - - user-job - when: - and: - - not: << pipeline.parameters.perform_delivery >> - - not: - equal: - - << pipeline.trigger_source >> - - scheduled_pipeline -jobs: - aw-auto-deliver: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - DELIVERY_COMMIT: << pipeline.parameters.delivery_commit >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - workspace: - type: string - resource_class: aspect-build/bazel-lib-default - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: git fetch - name: Git fetch - - when: - condition: << pipeline.parameters.delivery_commit >> - steps: - - run: - command: git checkout << pipeline.parameters.delivery_commit >> - name: Checkout release commit - - run: - command: rosetta run delivery - name: Delivery - no_output_timeout: 180m - working_directory: /mnt/ephemeral/workdir - aw-buildifier: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - delivery_manifest: - default: true - type: boolean - workspace: - type: string - resource_class: aspect-build/bazel-lib-small - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: rm -rf /workflows/artifacts /workflows/testlogs - name: Prepare archive directories - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: rosetta run buildifier --workspace << parameters.workspace >> - name: Buildifier - no_output_timeout: 180m - - store_artifacts: - path: /workflows/artifacts - - run: - command: rosetta run finalization - name: Finalization - no_output_timeout: 10m - when: always - working_directory: /mnt/ephemeral/workdir - aw-e2e_copy_action_test: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - delivery_manifest: - default: true - type: boolean - workspace: - type: string - resource_class: aspect-build/bazel-lib-small - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: rm -rf /workflows/artifacts /workflows/testlogs - name: Prepare archive directories - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: rosetta run test --workspace << parameters.workspace >> - name: Test - no_output_timeout: 180m - - store_test_results: - path: /workflows/testlogs - - when: - condition: - and: - - <> - - or: - - matches: - pattern: ^main$ - value: << pipeline.git.branch >> - steps: - - run: - command: rosetta run delivery_manifest --workspace << parameters.workspace - >> --data TARGETS_SOURCE=test - name: Delivery manifest - no_output_timeout: 180m - - store_artifacts: - path: /workflows/testlogs - - store_artifacts: - path: /workflows/artifacts - - store_artifacts: - path: e2e/copy_action/vmstat.out - - run: - command: rosetta run finalization - name: Finalization - no_output_timeout: 10m - when: always - working_directory: /mnt/ephemeral/workdir - aw-e2e_copy_to_directory_test: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - delivery_manifest: - default: true - type: boolean - workspace: - type: string - resource_class: aspect-build/bazel-lib-small - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: rm -rf /workflows/artifacts /workflows/testlogs - name: Prepare archive directories - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: rosetta run test --workspace << parameters.workspace >> - name: Test - no_output_timeout: 180m - - store_test_results: - path: /workflows/testlogs - - when: - condition: - and: - - <> - - or: - - matches: - pattern: ^main$ - value: << pipeline.git.branch >> - steps: - - run: - command: rosetta run delivery_manifest --workspace << parameters.workspace - >> --data TARGETS_SOURCE=test - name: Delivery manifest - no_output_timeout: 180m - - store_artifacts: - path: /workflows/testlogs - - store_artifacts: - path: /workflows/artifacts - - store_artifacts: - path: e2e/copy_to_directory/vmstat.out - - run: - command: rosetta run finalization - name: Finalization - no_output_timeout: 10m - when: always - working_directory: /mnt/ephemeral/workdir - aw-e2e_coreutils_test: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - delivery_manifest: - default: true - type: boolean - workspace: - type: string - resource_class: aspect-build/bazel-lib-small - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: rm -rf /workflows/artifacts /workflows/testlogs - name: Prepare archive directories - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: rosetta run test --workspace << parameters.workspace >> - name: Test - no_output_timeout: 180m - - store_test_results: - path: /workflows/testlogs - - when: - condition: - and: - - <> - - or: - - matches: - pattern: ^main$ - value: << pipeline.git.branch >> - steps: - - run: - command: rosetta run delivery_manifest --workspace << parameters.workspace - >> --data TARGETS_SOURCE=test - name: Delivery manifest - no_output_timeout: 180m - - store_artifacts: - path: /workflows/testlogs - - store_artifacts: - path: /workflows/artifacts - - store_artifacts: - path: e2e/coreutils/vmstat.out - - run: - command: rosetta run finalization - name: Finalization - no_output_timeout: 10m - when: always - working_directory: /mnt/ephemeral/workdir - aw-e2e_external_copy_to_directory_test: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - delivery_manifest: - default: true - type: boolean - workspace: - type: string - resource_class: aspect-build/bazel-lib-small - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: rm -rf /workflows/artifacts /workflows/testlogs - name: Prepare archive directories - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: rosetta run test --workspace << parameters.workspace >> - name: Test - no_output_timeout: 180m - - store_test_results: - path: /workflows/testlogs - - when: - condition: - and: - - <> - - or: - - matches: - pattern: ^main$ - value: << pipeline.git.branch >> - steps: - - run: - command: rosetta run delivery_manifest --workspace << parameters.workspace - >> --data TARGETS_SOURCE=test - name: Delivery manifest - no_output_timeout: 180m - - store_artifacts: - path: /workflows/testlogs - - store_artifacts: - path: /workflows/artifacts - - store_artifacts: - path: e2e/external_copy_to_directory/vmstat.out - - run: - command: rosetta run finalization - name: Finalization - no_output_timeout: 10m - when: always - working_directory: /mnt/ephemeral/workdir - aw-e2e_smoke_test: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - delivery_manifest: - default: true - type: boolean - workspace: - type: string - resource_class: aspect-build/bazel-lib-small - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: rm -rf /workflows/artifacts /workflows/testlogs - name: Prepare archive directories - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: rosetta run test --workspace << parameters.workspace >> - name: Test - no_output_timeout: 180m - - store_test_results: - path: /workflows/testlogs - - when: - condition: - and: - - <> - - or: - - matches: - pattern: ^main$ - value: << pipeline.git.branch >> - steps: - - run: - command: rosetta run delivery_manifest --workspace << parameters.workspace - >> --data TARGETS_SOURCE=test - name: Delivery manifest - no_output_timeout: 180m - - store_artifacts: - path: /workflows/testlogs - - store_artifacts: - path: /workflows/artifacts - - store_artifacts: - path: e2e/smoke/vmstat.out - - run: - command: rosetta run finalization - name: Finalization - no_output_timeout: 10m - when: always - working_directory: /mnt/ephemeral/workdir - aw-format: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - delivery_manifest: - default: true - type: boolean - workspace: - type: string - resource_class: aspect-build/bazel-lib-small - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: rm -rf /workflows/artifacts /workflows/testlogs - name: Prepare archive directories - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: rosetta run format --workspace << parameters.workspace >> - name: Format - no_output_timeout: 180m - - store_artifacts: - path: /workflows/artifacts - - run: - command: rosetta run finalization - name: Finalization - no_output_timeout: 10m - when: always - working_directory: /mnt/ephemeral/workdir - aw-gazelle: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - delivery_manifest: - default: true - type: boolean - workspace: - type: string - resource_class: aspect-build/bazel-lib-small - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: rm -rf /workflows/artifacts /workflows/testlogs - name: Prepare archive directories - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: rosetta run gazelle --workspace << parameters.workspace >> - name: Gazelle - no_output_timeout: 180m - - store_artifacts: - path: /workflows/artifacts - - run: - command: rosetta run finalization - name: Finalization - no_output_timeout: 10m - when: always - working_directory: /mnt/ephemeral/workdir - aw-manual-deliver: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - DELIVERY_COMMIT: << pipeline.parameters.delivery_commit >> - DELIVERY_TARGETS: << pipeline.parameters.delivery_targets >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - workspace: - type: string - resource_class: aspect-build/bazel-lib-default - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: git fetch - name: Git fetch - - when: - condition: << pipeline.parameters.delivery_commit >> - steps: - - run: - command: git checkout << pipeline.parameters.delivery_commit >> - name: Checkout release commit - - run: - command: rosetta run delivery - name: Delivery - no_output_timeout: 180m - working_directory: /mnt/ephemeral/workdir - aw-root_workspace_configure: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - delivery_manifest: - default: true - type: boolean - workspace: - type: string - resource_class: aspect-build/bazel-lib-small - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: rm -rf /workflows/artifacts /workflows/testlogs - name: Prepare archive directories - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: rosetta run configure --workspace << parameters.workspace >> - name: Configure - no_output_timeout: 180m - - store_artifacts: - path: /workflows/artifacts - - run: - command: rosetta run finalization - name: Finalization - no_output_timeout: 10m - when: always - working_directory: /mnt/ephemeral/workdir - aw-root_workspace_test: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - ASPECT_WORKFLOWS_WORKSPACE: << parameters.workspace >> - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - parameters: - delivery_manifest: - default: true - type: boolean - workspace: - type: string - resource_class: aspect-build/bazel-lib-default - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: rm -rf /workflows/artifacts /workflows/testlogs - name: Prepare archive directories - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: rosetta run test --workspace << parameters.workspace >> - name: Test - no_output_timeout: 180m - - store_test_results: - path: /workflows/testlogs - - when: - condition: - and: - - <> - - or: - - matches: - pattern: ^main$ - value: << pipeline.git.branch >> - steps: - - run: - command: rosetta run delivery_manifest --workspace << parameters.workspace - >> --data TARGETS_SOURCE=test - name: Delivery manifest - no_output_timeout: 180m - - store_artifacts: - path: /workflows/testlogs - - store_artifacts: - path: /workflows/artifacts - - store_artifacts: - path: vmstat.out - - run: - command: rosetta run finalization - name: Finalization - no_output_timeout: 10m - when: always - working_directory: /mnt/ephemeral/workdir - aw-warming: - environment: - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_NUMBER: << pipeline.number >> - ASPECT_WORKFLOWS_CIRCLE_PIPELINE_PROJECT_TYPE: << pipeline.project.type >> - ASPECT_WORKFLOWS_CIRCLE_WORKFLOW_BASE_NAME: aspect-workflows - ASPECT_WORKFLOWS_CONFIG: .aspect/workflows/config.yaml - XDG_CACHE_HOME: /mnt/ephemeral/caches - machine: true - resource_class: aspect-build/bazel-lib-warming - steps: - - run: - command: /etc/aspect/workflows/bin/configure_workflows_env - name: Workflows environment - - checkout - - run: - command: /etc/aspect/workflows/bin/agent_health_check - name: Agent health check - no_output_timeout: 180m - - run: - command: rosetta run warming --workspace e2e/smoke - name: Create warming archive for e2e/smoke - no_output_timeout: 180m - - run: - command: rosetta run warming --workspace e2e/external_copy_to_directory - name: Create warming archive for e2e/external_copy_to_directory - no_output_timeout: 180m - - run: - command: rosetta run warming --workspace e2e/coreutils - name: Create warming archive for e2e/coreutils - no_output_timeout: 180m - - run: - command: rosetta run warming --workspace e2e/copy_to_directory - name: Create warming archive for e2e/copy_to_directory - no_output_timeout: 180m - - run: - command: rosetta run warming --workspace e2e/copy_action - name: Create warming archive for e2e/copy_action - no_output_timeout: 180m - - run: - command: rosetta run warming --workspace . - name: Create warming archive for root - no_output_timeout: 180m - - run: - command: /etc/aspect/workflows/bin/warming_archive - name: Archive warming tars - working_directory: /mnt/ephemeral/workdir - user-job: - docker: - - image: cimg/base:2023.03 - steps: - - checkout - - run: echo "Example user CircleCI job that is not generated by Aspect Workflows." -parameters: - delivery_commit: - default: "" - description: The commit to checkout and run the delivery from. Targets listed - in the delivery manifest for this commit will be delivered unless specific targets - are listed in `delivery_targets`. - type: string - delivery_targets: - default: "" - description: List of Bazel targets to deliver, delimited by spaces. For example, - `//app/a:push_release //app/b:push_release`. If empty, targets listed in the - delivery manifest for the target commit will be delivered. - type: string - perform_delivery: - default: false - type: boolean - workspace: - default: . - description: The workspace that the `delivery_targets` live within. - type: string diff --git a/.circleci/user-config.yml b/.circleci/user-config.yml deleted file mode 100644 index a11cf53de..000000000 --- a/.circleci/user-config.yml +++ /dev/null @@ -1,52 +0,0 @@ -# This is an example of a user CircleCI configuration that is not generated by -# Aspect Workflows. The naming of this file is arbitrary. This configuration is -# merged with the generated Aspect Workflows CircleCI configuration into the -# load bearing load `.circleci/config.yaml` configuration file that is used by -# CircleCI. -# -# To update `.circleci/config.yaml` after editing this file run: -# -# bazel run //.circleci:write_merged_config -# -# -# Aspect Workflows workflow names are all prefixed with "aspect-workflows-". -# These currently include: -# -# - aspect-workflows -# - aspect-workflows-warming -# - aspect-workflows-manual-deliver -# -# Aspect Workflows job names are all prefixed with "aw-". These currently -# include. -# -# - aw-auto-deliver -# - aw-buildifier -# - aw-configure -# - aw-format -# - aw-gazelle -# - aw-manual-deliver -# - aw-test -# - aw-warming -# -# In your user CircleCI configuration, avoid workflow names prefixed with -# `aspect-workflows-` and job names prefixed with `aw-`. Conflicting workflow or -# job names will result in a bad configuration merge. -version: 2.1 -jobs: - user-job: - docker: - - image: cimg/base:2023.03 - steps: - - checkout - - run: echo "Example user CircleCI job that is not generated by Aspect Workflows." -workflows: - user-workflow: - jobs: - - user-job - when: - and: - - not: << pipeline.parameters.perform_delivery >> - - not: - equal: - - << pipeline.trigger_source >> - - scheduled_pipeline diff --git a/.github/workflows/ci.bazelrc b/.github/workflows/ci.bazelrc index 4821d32a5..74059fd66 100644 --- a/.github/workflows/ci.bazelrc +++ b/.github/workflows/ci.bazelrc @@ -4,13 +4,3 @@ common --repository_cache=~/.cache/bazel-repository-cache # Debug where options came from common --announce_rc - -# Remote build execution -build:rbe --extra_execution_platforms=@aspect_bazel_lib//platforms:x86_64_linux_remote -build:rbe --host_platform=@aspect_bazel_lib//platforms:x86_64_linux_remote -build:rbe --jobs=32 - -# BuildBuddy remote exec -build:rbe --bes_results_url=https://app.buildbuddy.io/invocation/ -build:rbe --bes_backend=grpcs://remote.buildbuddy.io -build:rbe --remote_executor=grpcs://remote.buildbuddy.io diff --git a/.shellcheckrc b/.shellcheckrc new file mode 100644 index 000000000..aade3f932 --- /dev/null +++ b/.shellcheckrc @@ -0,0 +1,6 @@ +# Turn on warnings for unquoted variables with safe values +enable=quote-safe-variables +# Turn on warnings for unassigned uppercase variables +enable=check-unassigned-uppercase + +#enable=require-variable-braces \ No newline at end of file diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 000000000..79a2a4188 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,19 @@ +# Configuration for https://Vale.sh +# See https://vale.sh/docs/topics/config/ + +StylesPath = tools/lint/vale +IgnoredScopes = code + +# Tell Vale to look in tools/lint/vale/config/vocabularies/engineering +Vocab = engineering + +[*.md] +BlockIgnores = ```[a-z]*\n.*?\n``` +BasedOnStyles = Vale, Google + +# Reduce levels to make silo error-free. +# TODO(alex): consider promoting some to error +Google.Exclamation = warning +Google.Quotes = warning +Vale.Spelling = warning +Vale.Terms = warning diff --git a/BUILD.bazel b/BUILD.bazel index 1b18b9792..94fb9b5ef 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,3 +1,4 @@ +load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin") load("@aspect_bazel_lib_host//:defs.bzl", "host") load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("@bazel_skylib//rules:copy_file.bzl", "copy_file") @@ -10,6 +11,8 @@ load("//lib:testing.bzl", "assert_contains") load("//lib:write_source_files.bzl", "write_source_files") load("//lib:yq.bzl", "yq") +exports_files([".shellcheckrc"]) + # gazelle:prefix github.com/aspect-build/bazel-lib gazelle_binary( @@ -163,3 +166,18 @@ diff_test( file1 = "tar_test13_mtree", file2 = "//lib/tests/tar:expected13.mtree", ) + +# Place the .vale.ini file in bazel-bin so the relative path it contains +# StylesPath = tools/lint/vale +# will work when it's run as an action. +copy_to_bin( + name = ".vale_ini", + srcs = [".vale.ini"], + visibility = ["//visibility:public"], +) + +filegroup( + name = "markdown_files", + srcs = glob(["*.md"]), + tags = ["markdown"], +) diff --git a/MODULE.bazel b/MODULE.bazel index 7118e8484..95c3ddf8d 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -76,7 +76,7 @@ use_repo(host, "aspect_bazel_lib_host") host_platform = use_extension("@platforms//host:extension.bzl", "host_platform", dev_dependency = True) use_repo(host_platform, "host_platform") -bazel_dep(name = "aspect_rules_lint", version = "1.0.0-rc8", dev_dependency = True) +bazel_dep(name = "aspect_rules_lint", version = "1.0.0-rc10", dev_dependency = True) bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True) bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True) bazel_dep(name = "bazel_features", version = "0.2.0", dev_dependency = True) diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 876b3821e..9bdbd086e 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -15,7 +15,7 @@ load("//:deps.bzl", "go_dependencies") go_dependencies() ############################################ -# Aspect Workflows -load("//.aspect/workflows:deps.bzl", "fetch_workflows_deps") +# Lint +load("@aspect_rules_lint//lint:vale.bzl", "fetch_vale") -fetch_workflows_deps() +fetch_vale() diff --git a/platforms/BUILD.bazel b/platforms/BUILD.bazel index 27de620a3..031b17359 100644 --- a/platforms/BUILD.bazel +++ b/platforms/BUILD.bazel @@ -1,3 +1,29 @@ +load("//platforms/config:defs.bzl", "platforms") + +[platform( + name = "{}_{}".format( + p.os, + p.cpu, + ), + constraint_values = [ + "@platforms//os:{}".format(p.os), + "@platforms//cpu:{}".format(p.cpu), + ], + visibility = ["//visibility:public"], +) for p in platforms] + +alias( + name = "linux_amd64", + actual = ":linux_x86_64", + visibility = ["//visibility:public"], +) + +alias( + name = "linux_arm64", + actual = ":linux_aarch64", + visibility = ["//visibility:public"], +) + platform( name = "x86_64_linux_remote", constraint_values = [ diff --git a/platforms/config/BUILD.bazel b/platforms/config/BUILD.bazel new file mode 100644 index 000000000..c48e4a241 --- /dev/null +++ b/platforms/config/BUILD.bazel @@ -0,0 +1,29 @@ +load(":defs.bzl", "platforms") + +config_setting( + name = "aarch64", + constraint_values = [ + "@platforms//cpu:aarch64", + ], + visibility = ["//visibility:public"], +) + +config_setting( + name = "x86_64", + constraint_values = [ + "@platforms//cpu:x86_64", + ], + visibility = ["//visibility:public"], +) + +[config_setting( + name = "{}_{}".format( + p.os, + p.cpu, + ), + constraint_values = [ + "@platforms//os:{}".format(p.os), + "@platforms//cpu:{}".format(p.cpu), + ], + visibility = ["//visibility:public"], +) for p in platforms] diff --git a/platforms/config/defs.bzl b/platforms/config/defs.bzl new file mode 100644 index 000000000..4d11d40bb --- /dev/null +++ b/platforms/config/defs.bzl @@ -0,0 +1,9 @@ +"""This module generated the platforms list for the build matrix.""" + +cpus = ["aarch64", "x86_64"] + +platforms = [ + struct(os = os, cpu = cpu) + for os in os_to_linker + for cpu in cpus +] diff --git a/tools/lint/BUILD.bazel b/tools/lint/BUILD.bazel new file mode 100644 index 000000000..6a28b9b32 --- /dev/null +++ b/tools/lint/BUILD.bazel @@ -0,0 +1,28 @@ +load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory") +load("@bazel_skylib//rules:native_binary.bzl", "native_binary") + +package(default_visibility = ["//visibility:public"]) + +native_binary( + name = "vale_bin", + src = select({ + "//platforms/config:linux_x86_64": "@vale_Linux_64-bit//:vale", + "//platforms/config:macos_aarch64": "@vale_macOS_arm64//:vale", + "//platforms/config:macos_x86_64": "@vale_macOS_64-bit//:vale", + }), + out = "vale_bin", +) + +# Take care to keep the StylesPath entry in /.vale.ini working: +# - the editor sees tools/lint/vale in the source tree +# - the linting aspect sees bazel-bin/tools/lint/vale +copy_to_directory( + name = "vale_styles", + srcs = [ + "vale", + "@vale_Google//:Google", + ], + out = "vale", + include_external_repositories = ["vale_*"], + replace_prefixes = {"vale/": ""}, +) diff --git a/tools/lint/linters.bzl b/tools/lint/linters.bzl new file mode 100644 index 000000000..d8c0da811 --- /dev/null +++ b/tools/lint/linters.bzl @@ -0,0 +1,15 @@ +"Create linter aspects, see https://github.com/aspect-build/rules_lint/blob/main/docs/linting.md#installation" + +load("@aspect_rules_lint//lint:vale.bzl", "lint_vale_aspect") +load("@aspect_rules_lint//lint:shellcheck.bzl", "lint_shellcheck_aspect") + +shellcheck = lint_shellcheck_aspect( + binary = "@multitool//tools/shellcheck", + config = "@@//:.shellcheckrc", +) + +vale = lint_vale_aspect( + binary = "@@//tools/lint:vale_bin", + config = "@@//:.vale_ini", + styles = "@@//tools/lint:vale_styles", +) diff --git a/tools/lint/vale/config/vocabularies/engineering/accept.txt b/tools/lint/vale/config/vocabularies/engineering/accept.txt new file mode 100644 index 000000000..39935fc48 --- /dev/null +++ b/tools/lint/vale/config/vocabularies/engineering/accept.txt @@ -0,0 +1,84 @@ +# Proper Nouns +Aspect +Bazel +Buildbarn +Buildkite +Coursier +GitHub +Gerrit +Grafana +GitLab +Googlers +HashiCorp +BuildCop +JUnit +Buildifier +Buildozer +KPIs +Kubernetes +Memorystore +MSBuild +Redis +Starlark +Skymeld +PyPI +Netlify +NVMe +Plaintext +Testcontainers +YouTube + +[Rr]unbook +[Ii]nvalidations? + +# Commonly understood acronyms +ACLs +AMIs +APIs +ASGs +CPUs +MRs + +# Language-specific ecosystem terms +p?npm +classpath +virtualenv +protobuf + +# Software quality terms +auditable +hermeticity +incrementality +performant +composable + +# DevX terms +abandonware +codelab +cron +downloader +monorepo +rebase +mutex +hotfix +oncall +poisioning +statefulness +teardown +toolchain +transpile +vendored +vendoring + +# Bazel terms +genrule +rules_lint +rules_py +rules_oci +formatters +sandboxing +sandboxed +subprocess +bzlmod +rosetta +ruleset diff --git a/tools/lint/vale/config/vocabularies/engineering/reject.txt b/tools/lint/vale/config/vocabularies/engineering/reject.txt new file mode 100644 index 000000000..ba0e162e1 --- /dev/null +++ b/tools/lint/vale/config/vocabularies/engineering/reject.txt @@ -0,0 +1 @@ +bar \ No newline at end of file diff --git a/tools/release/BUILD.bazel b/tools/release/BUILD.bazel index e540b84b3..b5078be2d 100644 --- a/tools/release/BUILD.bazel +++ b/tools/release/BUILD.bazel @@ -33,23 +33,6 @@ sh_binary( deps = ["@bazel_tools//tools/bash/runfiles"], ) -# Demonstration delivery target for Aspect Workflows. -# In the future this could be wired up to push dev releases to an S3 bucket. -sh_binary( - name = "tools_delivery_only_on_change", - srcs = ["delivery.sh"], - data = RELEASE_ARTIFACTS, - tags = ["deliverable"], -) - -# Demonstration delivery target for Aspect Workflows. -# In the future this could be wired up to push dev releases to an S3 bucket. -sh_binary( - name = "tools_delivery", - srcs = ["delivery.sh"], - data = RELEASE_ARTIFACTS, -) - bzl_library( name = "hashes", srcs = ["hashes.bzl"],