summaryrefslogtreecommitdiffhomepage
path: root/WORKSPACE
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2021-01-05 10:40:58 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-05 10:43:04 -0800
commit2a5d3c248fbccfd1f711d027d70ba855625f22f3 (patch)
tree62c5dc39a60a1cfa90cafe7bcd5072576f2011cf /WORKSPACE
parent622db84e4bba468205c85c80a93b8b9a9c2c9ee3 (diff)
Add YAML validation for configuration files.
For validation, the "on" key in existing YAML files is changed to a literal string. In the YAML spec, on is a keyword which encodes a boolean value, so without relying on a specific implementation the YAML files are technically not encoding an object that complies with the specification. PiperOrigin-RevId: 350172147
Diffstat (limited to 'WORKSPACE')
-rw-r--r--WORKSPACE36
1 files changed, 35 insertions, 1 deletions
diff --git a/WORKSPACE b/WORKSPACE
index 933c1ff19..031c21163 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -1,4 +1,4 @@
-load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# Bazel/starlark utilities.
@@ -176,6 +176,19 @@ http_archive(
],
)
+# Schemas for testing.
+http_file(
+ name = "buildkite_pipeline_schema",
+ sha256 = "3369c58038b4d55c08928affafb653716eb1e7b3cabb4a391aef979dd921f4e1",
+ urls = ["https://raw.githubusercontent.com/buildkite/pipeline-schema/f7a0894074d194bcf19eec5411fec0528f7f4180/schema.json"],
+)
+
+http_file(
+ name = "github_workflow_schema",
+ sha256 = "2c375bb43dbc8b32b1bed46c290d0b70a8fa2aca7a5484dfca1b6e9c38cf9e7a",
+ urls = ["https://raw.githubusercontent.com/SchemaStore/schemastore/27612065234778feaac216ce14dd47846fe0a2dd/src/schemas/json/github-workflow.json"],
+)
+
# External Go repositories.
#
# Unfortunately, gazelle will automatically parse go modules in the
@@ -1391,3 +1404,24 @@ go_repository(
sum = "h1:+ySTxfHnfzZb9ys375PXNlLhkJPLKgHajBU0N62BDvE=",
version = "v0.0.0-20190801114015-581e00157fb1",
)
+
+go_repository(
+ name = "com_github_xeipuuv_gojsonpointer",
+ importpath = "github.com/xeipuuv/gojsonpointer",
+ sum = "h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=",
+ version = "v0.0.0-20190905194746-02993c407bfb",
+)
+
+go_repository(
+ name = "com_github_xeipuuv_gojsonreference",
+ importpath = "github.com/xeipuuv/gojsonreference",
+ sum = "h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=",
+ version = "v0.0.0-20180127040603-bd5ef7bd5415",
+)
+
+go_repository(
+ name = "com_github_xeipuuv_gojsonschema",
+ importpath = "github.com/xeipuuv/gojsonschema",
+ sum = "h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=",
+ version = "v1.2.0",
+)