Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions rs/rosetta-api/local/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ $ ./ci/container/container-run.sh
$ bazel build //rs/rosetta-api/icp:rosetta_image.tar

# Move the resulting TAR file to a place that can be accessed outside the dev container
$ mv bazel-bin/rs/rosetta-api/icp/rosetta_image.tar /tmp
$ mv bazel-bin/rs/rosetta-api/icp/rosetta_image_tarball/tarball.tar /tmp/rosetta_image.tar

# Same for ICRC1
$ bazel build //rs/rosetta-api/icrc1:icrc_rosetta_image.tar
$ mv bazel-bin/rs/rosetta-api/icrc1/icrc_rosetta_image.tar /tmp
$ mv bazel-bin/rs/rosetta-api/icrc1/icrc_rosetta_image_tarball/tarball.tar /tmp/icrc_rosetta_image.tar

# Exit the dev container
$ exit
Expand All @@ -102,13 +102,13 @@ Example that deploys local versions for both:
Example that deploys local ICRC1 Rosetta with multiple ledgers:

```bash
./deploy.sh --local-icrc1-image-tar ~/workspaces/ic/ic-master/bazel-bin/rs/rosetta-api/icrc1/icrc_rosetta_image.tar --icrc1-ledgers 'lkwrt-vyaaa-aaaaq-aadhq-cai,xsi2v-cyaaa-aaaaq-aabfq-cai'
./deploy.sh --local-icrc1-image-tar ~/workspaces/ic/ic-master/bazel-bin/rs/rosetta-api/icrc1/icrc_rosetta_image_tarball/tarball.tar --icrc1-ledgers 'lkwrt-vyaaa-aaaaq-aadhq-cai,xsi2v-cyaaa-aaaaq-aabfq-cai'
```

Example that deploys **only** your local ICRC1 Rosetta build (skipping the latest image):

```bash
./deploy.sh --local-icrc1-image-tar ~/workspaces/ic/ic-master/bazel-bin/rs/rosetta-api/icrc1/icrc_rosetta_image.tar --icrc1-ledgers 'lkwrt-vyaaa-aaaaq-aadhq-cai,xsi2v-cyaaa-aaaaq-aabfq-cai' --no-icrc1-latest
./deploy.sh --local-icrc1-image-tar ~/workspaces/ic/ic-master/bazel-bin/rs/rosetta-api/icrc1/icrc_rosetta_image_tarball/tarball.tar --icrc1-ledgers 'lkwrt-vyaaa-aaaaq-aadhq-cai,xsi2v-cyaaa-aaaaq-aabfq-cai' --no-icrc1-latest
```

The services and pods deployed with those images will have a `-local` in their names.
Expand Down Expand Up @@ -168,7 +168,7 @@ bazel build //rs/rosetta-api/icrc1:icrc_rosetta_image.tar

# Redeploy only the ICRC local instance (other instances keep running)
./deploy.sh --use-persistent-volumes \
--local-icrc1-image-tar bazel-bin/rs/rosetta-api/icrc1/icrc_rosetta_image.tar
--local-icrc1-image-tar bazel-bin/rs/rosetta-api/icrc1/icrc_rosetta_image_tarball/tarball.tar
```

The script will:
Expand Down
21 changes: 4 additions & 17 deletions rs/tests/system_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Rules for system-tests.
"""

load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("@rules_oci//oci:defs.bzl", "oci_load")
load("@rules_rust//rust:defs.bzl", "rust_binary")
load("@rules_shell//shell:sh_test.bzl", "sh_test")
Expand Down Expand Up @@ -405,11 +404,11 @@ def oci_tar(name, image, repo_tags = []):

basename = name.removesuffix(".tar")

name_image = basename + "_image"
tarball = basename + "_tarball"

# First load the image
oci_load(
name = name_image,
name = tarball,
image = image,
repo_tags = repo_tags,
target_compatible_with = [
Expand All @@ -418,24 +417,12 @@ def oci_tar(name, image, repo_tags = []):
)

# create the tarball
name_tarballdir = basename + "_tarballdir"
native.filegroup(
name = name_tarballdir,
srcs = [":" + name_image],
name = name,
srcs = [":" + tarball],
output_group = "tarball",
target_compatible_with = [
"@platforms//os:linux",
],
tags = ["manual"],
)

# Copy the tarball out so we can reference the file by 'name'
copy_file(
name = basename + "_tar",
src = ":" + name_tarballdir,
out = name,
target_compatible_with = [
"@platforms//os:linux",
],
tags = ["manual"],
)
Loading