mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 18:51:59 +00:00
Revert "refactor: upgrade to rules_oci 2.0 (2nd attempt)" (#64351)
Reverts sourcegraph/sourcegraph#63829 Not working with Aspect Delivery ## Test plan CI
This commit is contained in:
parent
3b16059588
commit
addba96f47
16
WORKSPACE
16
WORKSPACE
@ -106,9 +106,9 @@ http_archive(
|
||||
# Container rules
|
||||
http_archive(
|
||||
name = "rules_oci",
|
||||
sha256 = "f70f07f9d0d6c275d7ec7d3c7f236d9b552ba3205e8f37df9c1125031cf967cc",
|
||||
strip_prefix = "rules_oci-2.0.0-beta1",
|
||||
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.0.0-beta1/rules_oci-v2.0.0-beta1.tar.gz",
|
||||
sha256 = "647f4c6fd092dc7a86a7f79892d4b1b7f1de288bdb4829ca38f74fd430fcd2fe",
|
||||
strip_prefix = "rules_oci-1.7.6",
|
||||
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v1.7.6/rules_oci-v1.7.6.tar.gz",
|
||||
)
|
||||
|
||||
http_archive(
|
||||
@ -407,9 +407,15 @@ load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
|
||||
|
||||
rules_oci_dependencies()
|
||||
|
||||
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
|
||||
load("@rules_oci//oci:repositories.bzl", "LATEST_CRANE_VERSION", "oci_register_toolchains")
|
||||
|
||||
oci_register_toolchains(name = "oci")
|
||||
oci_register_toolchains(
|
||||
name = "oci",
|
||||
crane_version = LATEST_CRANE_VERSION,
|
||||
# Uncommenting the zot toolchain will cause it to be used instead of crane for some tasks.
|
||||
# Note that it does not support docker-format images.
|
||||
# zot_version = LATEST_ZOT_VERSION,
|
||||
)
|
||||
|
||||
# Optional, for oci_tarball rule
|
||||
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball", "pkg_tar")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:go_defs.bzl", "go_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:oci_defs.bzl", "oci_image", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
|
||||
go_library(
|
||||
name = "blobstore_lib",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//cmd/server:macro.bzl", "container_dependencies", "dependencies_tars")
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
|
||||
go_library(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:msp_delivery.bzl", "msp_delivery")
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//cmd/server:macro.bzl", "container_dependencies", "dependencies_tars")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
load("@bazel_skylib//rules:build_test.bzl", "build_test")
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -28,7 +28,6 @@ sh_binary(
|
||||
env = {
|
||||
"SRC_CLI_VERSION": SRC_CLI_VERSION,
|
||||
},
|
||||
deps = ["@bazel_tools//tools/bash/runfiles"],
|
||||
)
|
||||
|
||||
sh_binary(
|
||||
|
||||
@ -1,19 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
# --- begin runfiles.bash initialization v3 ---
|
||||
# Copy-pasted from the Bazel Bash runfiles library v3.
|
||||
set -uo pipefail; set +e; f=bazel_tools/tools/bash/runfiles/runfiles.bash
|
||||
# shellcheck disable=SC1090
|
||||
source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
|
||||
source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \
|
||||
source "$0.runfiles/$f" 2>/dev/null || \
|
||||
source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
|
||||
source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
|
||||
{ echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
|
||||
# --- end runfiles.bash initialization v3 ---
|
||||
|
||||
## Setting up inputs/data
|
||||
gcloud="$(pwd)/$1" # used in workdir folder, so need an absolute path
|
||||
packer="$(pwd)/$2"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
|
||||
go_library(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
|
||||
go_library(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
|
||||
go_library(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:msp_delivery.bzl", "msp_delivery")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:msp_delivery.bzl", "msp_delivery")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
|
||||
go_library(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("macro.bzl", "container_dependencies", "dependencies_tars")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
Various helpers to help with server image building
|
||||
"""
|
||||
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
|
||||
def get_last_segment(path):
|
||||
"""
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
|
||||
go_library(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:msp_delivery.bzl", "msp_delivery")
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
|
||||
go_library(
|
||||
name = "worker_lib",
|
||||
|
||||
@ -2,7 +2,7 @@ load("//dev:go_mockgen.bzl", "go_mockgen")
|
||||
load("//dev:go_defs.bzl", "go_test")
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:msp_delivery.bzl", "msp_delivery")
|
||||
|
||||
|
||||
@ -186,7 +186,6 @@ bazel "${bazelrc[@]}" build \
|
||||
--build_event_binary_file_path_conversion=false \
|
||||
--build_event_binary_file_upload_mode=wait_for_upload_complete \
|
||||
--build_event_publish_all_actions=true \
|
||||
--remote_download_outputs=toplevel \
|
||||
${images}
|
||||
|
||||
echo "--- :bash: Generating jobfile - started"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:msp_delivery.bzl", "msp_delivery")
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
"""OCI bazel defs"""
|
||||
|
||||
load("@rules_oci//oci:defs.bzl", _oci_image = "oci_image", _oci_load = "oci_load", _oci_push = "oci_push")
|
||||
load("@rules_pkg//:pkg.bzl", _pkg_tar = "pkg_tar")
|
||||
load("@rules_oci//oci:defs.bzl", _oci_image = "oci_image", _oci_push = "oci_push", _oci_tarball = "oci_tarball")
|
||||
|
||||
REGISTRY_REPOSITORY_PREFIX = "europe-west1-docker.pkg.dev/sourcegraph-security-logging/rules-oci-test/{}"
|
||||
# REGISTRY_REPOSITORY_PREFIX = "us.gcr.io/sourcegraph-dev/{}"
|
||||
@ -13,7 +12,7 @@ def image_repository(image):
|
||||
return REGISTRY_REPOSITORY_PREFIX.format(image)
|
||||
|
||||
def oci_tarball(name, **kwargs):
|
||||
_oci_load(
|
||||
_oci_tarball(
|
||||
name = name,
|
||||
# Don't build this by default with bazel build //... since most oci_tarball
|
||||
# targets do not need to be built on CI. This prevents the remote cache from
|
||||
@ -58,10 +57,3 @@ oci_image_cross = rule(
|
||||
),
|
||||
},
|
||||
)
|
||||
|
||||
def pkg_tar(name, **kwargs):
|
||||
_pkg_tar(
|
||||
name = name,
|
||||
extension = "tar.gz",
|
||||
**kwargs
|
||||
)
|
||||
|
||||
@ -154,8 +154,11 @@ We can now build this image _locally_ and run those tests as well.
|
||||
Example:
|
||||
|
||||
```
|
||||
# Create and load a tarball that can be loaded in Docker of the worker service:
|
||||
bazel run //cmd/worker:image_tarball
|
||||
# Create a tarball that can be loaded in Docker of the worker service:
|
||||
bazel build //cmd/worker:image_tarball
|
||||
|
||||
# Load the image in Docker:
|
||||
docker load --input $(bazel cquery //cmd/worker:image_tarball --output=files)
|
||||
|
||||
# Run the container structure tests
|
||||
bazel test //cmd/worker:image_test
|
||||
|
||||
@ -55,8 +55,11 @@ Our containers are only built for `linux/amd64`, therefore we need to cross-comp
|
||||
Example:
|
||||
|
||||
```
|
||||
# Create and load a tarball that can be loaded in Docker of the worker service:
|
||||
bazel run //cmd/worker:image_tarball
|
||||
# Create a tarball that can be loaded in Docker of the worker service:
|
||||
bazel build //cmd/worker:image_tarball
|
||||
|
||||
# Load the image in Docker:
|
||||
docker load --input $(bazel cquery //cmd/worker:image_tarball --output=files)
|
||||
```
|
||||
|
||||
You can also use the same configuration flag to run the container tests on MacOS:
|
||||
|
||||
@ -186,7 +186,8 @@ env:
|
||||
commands:
|
||||
gitserver:
|
||||
install: |
|
||||
bazel run //cmd/gitserver:image_tarball
|
||||
bazel build //cmd/gitserver:image_tarball && \
|
||||
docker load --input $(bazel cquery //cmd/gitserver:image_tarball --output=files)
|
||||
gitserver-0:
|
||||
cmd: |
|
||||
docker inspect gitserver-${GITSERVER_INDEX} >/dev/null 2>&1 && docker stop gitserver-${GITSERVER_INDEX}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
filegroup(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("@rules_pkg//:mappings.bzl", "pkg_attributes", "pkg_files")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
|
||||
expand_template(
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
|
||||
pkg_tar(
|
||||
name = "src-cli",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//cmd/server:macro.bzl", "container_dependencies", "dependencies_tars")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
|
||||
DEPS = ["@com_github_sourcegraph_zoekt//cmd/zoekt-webserver"]
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("@rules_pkg//:mappings.bzl", "pkg_attributes", "pkg_files")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//cmd/server:macro.bzl", "container_dependencies", "dependencies_tars")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
|
||||
pkg_tar(
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library", "rust_test")
|
||||
load("//dev:oci_defs.bzl", "image_repository", "oci_image", "oci_push", "oci_tarball")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
|
||||
@ -113,31 +113,22 @@ oci_image(
|
||||
base = "@scip-java",
|
||||
)
|
||||
|
||||
# TODO: this is expensive as whole has to be uploaded to the remote cache
|
||||
# Instead call the executable script created by oci_tarball to load the image
|
||||
# to daemon.
|
||||
oci_tarball(
|
||||
name = "scip_java_image_tarball",
|
||||
image = ":scip_java_image",
|
||||
repo_tags = ["scip-java:tmp"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "scip_java_image_tarball_tar",
|
||||
srcs = [":scip_java_image_tarball"],
|
||||
output_group = "tarball",
|
||||
)
|
||||
|
||||
genrule(
|
||||
name = "java_groundtruth_scip",
|
||||
srcs = [
|
||||
"testdata/scip-index.sh",
|
||||
":scip_java_image_tarball_tar",
|
||||
":scip_java_image_tarball",
|
||||
] + glob(["testdata/java/**"]),
|
||||
outs = ["index-java.scip"],
|
||||
cmd = """\
|
||||
$(location testdata/scip-index.sh) \
|
||||
$(location :scip_java_image_tarball_tar) \
|
||||
$(location :scip_java_image_tarball) \
|
||||
scip-java:tmp \
|
||||
$(location testdata/java/build.gradle) \
|
||||
'scip-java index' \
|
||||
|
||||
@ -3,7 +3,7 @@ load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
|
||||
load("@npm//:defs.bzl", "npm_link_all_packages")
|
||||
load("@npm//internal/appliance/frontend/maintenance:tsconfig-to-swcconfig/package_json.bzl", tsconfig_to_swcconfig = "bin")
|
||||
load("@npm//internal/appliance/frontend/maintenance:vite/package_json.bzl", vite_bin = "bin")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("//wolfi-images:defs.bzl", "wolfi_base")
|
||||
load("@container_structure_test//:defs.bzl", "container_structure_test")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template")
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
load("//dev:oci_defs.bzl", "pkg_tar")
|
||||
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
||||
load("//dev:go_defs.bzl", "go_test")
|
||||
|
||||
go_library(
|
||||
|
||||
@ -822,7 +822,8 @@ commands:
|
||||
# Nothing to run for this, we just want to re-run the install script every time.
|
||||
cmd: exit 0
|
||||
install: |
|
||||
bazel run //cmd/batcheshelper:image_tarball
|
||||
bazel build //cmd/batcheshelper:image_tarball
|
||||
docker load --input $(bazel cquery //cmd/batcheshelper:image_tarball --output=files)
|
||||
env:
|
||||
IMAGE: batcheshelper:candidate
|
||||
# TODO: This is required but should only be set on M1 Macs.
|
||||
@ -919,7 +920,8 @@ commands:
|
||||
mkdir -p "${GRAFANA_DISK}"
|
||||
mkdir -p "$(dirname ${GRAFANA_LOG_FILE})"
|
||||
docker inspect $CONTAINER >/dev/null 2>&1 && docker rm -f $CONTAINER
|
||||
bazel run //docker-images/grafana:image_tarball
|
||||
bazel build //docker-images/grafana:image_tarball
|
||||
docker load --input $(bazel cquery //docker-images/grafana:image_tarball --output=files)
|
||||
env:
|
||||
GRAFANA_DISK: $HOME/.sourcegraph-dev/data/grafana
|
||||
# Log file location: since we log outside of the Docker container, we should
|
||||
@ -976,7 +978,8 @@ commands:
|
||||
|
||||
cp ${PROM_TARGETS} "${CONFIG_DIR}"/prometheus_targets.yml
|
||||
|
||||
bazel run //docker-images/prometheus:image_tarball
|
||||
bazel build //docker-images/prometheus:image_tarball
|
||||
docker load --input $(bazel cquery //docker-images/prometheus:image_tarball --output=files)
|
||||
env:
|
||||
PROMETHEUS_DISK: $HOME/.sourcegraph-dev/data/prometheus
|
||||
# See comment above for `grafana`
|
||||
@ -1032,7 +1035,8 @@ commands:
|
||||
"${IMAGE}"
|
||||
install: |
|
||||
docker inspect $CONTAINER >/dev/null 2>&1 && docker rm -f $CONTAINER
|
||||
bazel run //docker-images/postgres_exporter:image_tarball
|
||||
bazel build //docker-images/postgres_exporter:image_tarball
|
||||
docker load --input $(bazel cquery //docker-images/postgres_exporter:image_tarball --output=files)
|
||||
env:
|
||||
IMAGE: postgres-exporter:candidate
|
||||
CONTAINER: postgres_exporter
|
||||
@ -1046,7 +1050,8 @@ commands:
|
||||
|
||||
otel-collector:
|
||||
install: |
|
||||
bazel run //docker-images/opentelemetry-collector:image_tarball
|
||||
bazel build //docker-images/opentelemetry-collector:image_tarball
|
||||
docker load --input $(bazel cquery //docker-images/opentelemetry-collector:image_tarball --output=files)
|
||||
description: OpenTelemetry collector
|
||||
cmd: |
|
||||
JAEGER_HOST='host.docker.internal'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user