File tree Expand file tree Collapse file tree 4 files changed +30
-8
lines changed Expand file tree Collapse file tree 4 files changed +30
-8
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 14
14
# TODO(marun) Make the namespace configurable
15
15
PATH=" ${PWD} /bin:$PATH " kubectl create namespace tmpnet || true
16
16
17
+ bash -x ./scripts/build_xsvm_image.sh
18
+
17
19
# 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 20
20
# the instructions to build non-portable BLST.
21
21
source ./scripts/constants.sh
22
22
23
- # Enable subnet testing by building xsvm
24
- ./scripts/build_xsvm.sh
25
- echo " "
26
-
27
23
# Ensure an absolute path to avoid dependency on the working directory
28
24
# of script execution.
29
- AVALANCHEGO_PATH=" $( realpath " ${AVALANCHEGO_PATH:- ./ build/ avalanchego} " ) "
30
25
E2E_ARGS=" ${*:- } "
31
26
if ! [[ " ${E2E_ARGS} " =~ " --runtime=kube" ]]; then
32
27
# If not running in kubernetes, use the local avalanchego binary
28
+ AVALANCHEGO_PATH=" $( realpath " ${AVALANCHEGO_PATH:- ./ build/ avalanchego} " ) "
33
29
E2E_ARGS+=" --avalanchego-path=${AVALANCHEGO_PATH} "
30
+
31
+ # Enable subnet testing by building the xsvm binary
32
+ ./scripts/build_xsvm.sh
34
33
fi
35
34
36
35
# ################################
63
62
64
63
# ################################
65
64
# shellcheck disable=SC2086
66
- ./scripts/ginkgo.sh ${GINKGO_ARGS} -v ./tests/e2e -- " ${E2E_ARGS[@]} " " ${ @ } "
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
25
25
FROM $AVALANCHEGO_NODE_IMAGE AS execution
26
26
27
27
# 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
29
29
30
30
# The node image's entrypoint will be reused.
You can’t perform that action at this time.
0 commit comments