File tree Expand file tree Collapse file tree 4 files changed +31
-9
lines changed
Expand file tree Collapse file tree 4 files changed +31
-9
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euo pipefail
4+
5+ if ! [[ " $0 " =~ scripts/build_xsvm_image.sh ]]; then
6+ echo " must be run from repository root"
7+ exit 255
8+ fi
9+
10+ # Directory above this script
11+ AVALANCHE_PATH=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " ; cd .. && pwd )
12+
13+ # TODO(marun) This image name should be configurable
14+ DOCKER_IMAGE=" localhost:5001/avalanchego"
15+
16+ # Build the avalancehgo node image
17+ FORCE_TAG_LATEST=1 SKIP_BUILD_RACE=1 DOCKER_IMAGE=" ${DOCKER_IMAGE} " ./scripts/build_image.sh
18+
19+ GO_VERSION=" $( go list -m -f ' {{.GoVersion}}' ) "
20+ docker buildx build --build-arg GO_VERSION=" ${GO_VERSION} " --build-arg AVALANCHEGO_NODE_IMAGE=" ${DOCKER_IMAGE} " \
21+ -t " ${DOCKER_IMAGE} -xsvm" -f " ${AVALANCHE_PATH} /vms/example/xsvm/Dockerfile" .
Original file line number Diff line number Diff line change 1414# TODO(marun) Make the namespace configurable
1515PATH=" ${PWD} /bin:$PATH " kubectl create namespace tmpnet || true
1616
17+ bash -x ./scripts/build_xsvm_image.sh
18+
1719# TODO(marun) Is the path still necessary?
18- KUBECONFIG=" $HOME /.kube/config" PATH=" ${PWD} /bin:$PATH " bash -x ./scripts/tests.e2e.sh --runtime=kube
20+ E2E_SERIAL=1 KUBECONFIG=" $HOME /.kube/config" PATH=" ${PWD} /bin:$PATH " bash -x ./scripts/tests.e2e.sh --runtime=kube --image-name=localhost:5001/avalanchego-xsvm:latest
Original file line number Diff line number Diff line change 2020# the instructions to build non-portable BLST.
2121source ./scripts/constants.sh
2222
23- # Enable subnet testing by building xsvm
24- ./scripts/build_xsvm.sh
25- echo " "
26-
2723# Ensure an absolute path to avoid dependency on the working directory
2824# of script execution.
29- AVALANCHEGO_PATH=" $( realpath " ${AVALANCHEGO_PATH:- ./ build/ avalanchego} " ) "
3025E2E_ARGS=" ${*:- } "
3126if ! [[ " ${E2E_ARGS} " =~ " --runtime=kube" ]]; then
3227 # If not running in kubernetes, use the local avalanchego binary
28+ AVALANCHEGO_PATH=" $( realpath " ${AVALANCHEGO_PATH:- ./ build/ avalanchego} " ) "
3329 E2E_ARGS+=" --avalanchego-path=${AVALANCHEGO_PATH} "
30+
31+ # Enable subnet testing by building the xsvm binary
32+ ./scripts/build_xsvm.sh
3433fi
3534
3635# ################################
6261fi
6362
6463# ################################
65- # shellcheck disable=SC2086
66- ./scripts/ginkgo.sh ${GINKGO_ARGS} -v ./tests/e2e -- " ${E2E_ARGS[@]} " " ${ @ } "
64+ # shellcheck disable=SC2086,SC2068
65+ ./scripts/ginkgo.sh ${GINKGO_ARGS} -v ./tests/e2e -- ${E2E_ARGS[@]}
Original file line number Diff line number Diff line change @@ -25,6 +25,6 @@ RUN ./scripts/build_xsvm.sh
2525FROM $AVALANCHEGO_NODE_IMAGE AS execution
2626
2727# Copy the xsvm binary to the container plugin path
28- COPY --from=builder $BUILDER_WORKDIR /build/xsvm /avalanchego/build/plugins/v3m4wPxaHpvGr8qfMeyK6PRW3idZrPHmYcMTt7oXdK47yurVH
28+ COPY --from=builder /build /build/xsvm /avalanchego/build/plugins/v3m4wPxaHpvGr8qfMeyK6PRW3idZrPHmYcMTt7oXdK47yurVH
2929
3030# The node image's entrypoint will be reused.
You can’t perform that action at this time.
0 commit comments