From 8f0ab21ac11901dd7e28ccabcc80bb922e7a86f4 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Wed, 11 Oct 2023 16:44:00 -0500 Subject: [PATCH 1/3] Don't error when CERC_GO_AUTH_TOKEN isn't set --- app/data/container-build/cerc-plugeth-statediff/build.sh | 6 ------ app/data/container-build/cerc-plugeth/build.sh | 6 ------ 2 files changed, 12 deletions(-) diff --git a/app/data/container-build/cerc-plugeth-statediff/build.sh b/app/data/container-build/cerc-plugeth-statediff/build.sh index 15a77ef6..144d4e57 100755 --- a/app/data/container-build/cerc-plugeth-statediff/build.sh +++ b/app/data/container-build/cerc-plugeth-statediff/build.sh @@ -1,10 +1,4 @@ #!/usr/bin/env bash # Build cerc/plugeth-statediff source ${CERC_CONTAINER_BASE_DIR}/build-base.sh -# This container build currently requires access to private dependencies in gitea -# so we check that the necessary access token has been supplied here, then pass it o the build -if [[ -z "${CERC_GO_AUTH_TOKEN}" ]]; then - echo "ERROR: CERC_GO_AUTH_TOKEN is not set" >&2 - exit 1 -fi docker build -t cerc/plugeth-statediff:local ${build_command_args} --build-arg GIT_VDBTO_TOKEN=${CERC_GO_AUTH_TOKEN} ${CERC_REPO_BASE_DIR}/plugeth-statediff diff --git a/app/data/container-build/cerc-plugeth/build.sh b/app/data/container-build/cerc-plugeth/build.sh index 1162a192..7c67da1e 100755 --- a/app/data/container-build/cerc-plugeth/build.sh +++ b/app/data/container-build/cerc-plugeth/build.sh @@ -1,10 +1,4 @@ #!/usr/bin/env bash # Build cerc/plugeth source ${CERC_CONTAINER_BASE_DIR}/build-base.sh -# This container build currently requires access to private dependencies in gitea -# so we check that the necessary access token has been supplied here, then pass it o the build -if [[ -z "${CERC_GO_AUTH_TOKEN}" ]]; then - echo "ERROR: CERC_GO_AUTH_TOKEN is not set" >&2 - exit 1 -fi docker build -t cerc/plugeth:local ${build_command_args} --build-arg GIT_VDBTO_TOKEN=${CERC_GO_AUTH_TOKEN} ${CERC_REPO_BASE_DIR}/plugeth -- 2.45.2 From d1ea028340408e3bda2e8de9c9966072b2bd23fd Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Wed, 11 Oct 2023 17:12:47 -0500 Subject: [PATCH 2/3] doc --- app/data/container-build/cerc-plugeth-statediff/build.sh | 1 + app/data/container-build/cerc-plugeth/build.sh | 1 + app/data/stacks/fixturenet-plugeth-tx/README.md | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/data/container-build/cerc-plugeth-statediff/build.sh b/app/data/container-build/cerc-plugeth-statediff/build.sh index 144d4e57..f267788e 100755 --- a/app/data/container-build/cerc-plugeth-statediff/build.sh +++ b/app/data/container-build/cerc-plugeth-statediff/build.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash # Build cerc/plugeth-statediff source ${CERC_CONTAINER_BASE_DIR}/build-base.sh +# Pass Go auth token if present docker build -t cerc/plugeth-statediff:local ${build_command_args} --build-arg GIT_VDBTO_TOKEN=${CERC_GO_AUTH_TOKEN} ${CERC_REPO_BASE_DIR}/plugeth-statediff diff --git a/app/data/container-build/cerc-plugeth/build.sh b/app/data/container-build/cerc-plugeth/build.sh index 7c67da1e..37655db7 100755 --- a/app/data/container-build/cerc-plugeth/build.sh +++ b/app/data/container-build/cerc-plugeth/build.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash # Build cerc/plugeth source ${CERC_CONTAINER_BASE_DIR}/build-base.sh +# Pass Go auth token if present docker build -t cerc/plugeth:local ${build_command_args} --build-arg GIT_VDBTO_TOKEN=${CERC_GO_AUTH_TOKEN} ${CERC_REPO_BASE_DIR}/plugeth diff --git a/app/data/stacks/fixturenet-plugeth-tx/README.md b/app/data/stacks/fixturenet-plugeth-tx/README.md index 50bfd919..3e7613c4 100644 --- a/app/data/stacks/fixturenet-plugeth-tx/README.md +++ b/app/data/stacks/fixturenet-plugeth-tx/README.md @@ -12,7 +12,7 @@ See `stacks/fixturenet-eth/README.md` for more information. * cerc/tx-spammer ## Deploy the stack -Note: since some Go dependencies are currently private, `CERC_GO_AUTH_TOKEN` must be set to a valid Gitea access token before running the `build-containers` command. +Note: if there are any private Go dependencies, `CERC_GO_AUTH_TOKEN` must be set to a valid Gitea access token before running the `build-containers` command. ``` $ laconic-so --stack fixturenet-plugeth-tx setup-repositories $ laconic-so --stack fixturenet-plugeth-tx build-containers -- 2.45.2 From ae2cefbcd60e9990622aa722a816fc2518ff0893 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Wed, 11 Oct 2023 17:51:21 -0500 Subject: [PATCH 3/3] conditionally add ags --- app/data/container-build/cerc-plugeth-statediff/build.sh | 5 ++++- app/data/container-build/cerc-plugeth/build.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/data/container-build/cerc-plugeth-statediff/build.sh b/app/data/container-build/cerc-plugeth-statediff/build.sh index f267788e..447c8d00 100755 --- a/app/data/container-build/cerc-plugeth-statediff/build.sh +++ b/app/data/container-build/cerc-plugeth-statediff/build.sh @@ -2,4 +2,7 @@ # Build cerc/plugeth-statediff source ${CERC_CONTAINER_BASE_DIR}/build-base.sh # Pass Go auth token if present -docker build -t cerc/plugeth-statediff:local ${build_command_args} --build-arg GIT_VDBTO_TOKEN=${CERC_GO_AUTH_TOKEN} ${CERC_REPO_BASE_DIR}/plugeth-statediff +if [[ -n "${CERC_GO_AUTH_TOKEN}" ]]; then + build_command_args="${build_command_args} --build-arg GIT_VDBTO_TOKEN=${CERC_GO_AUTH_TOKEN}" +fi +docker build -t cerc/plugeth-statediff:local ${build_command_args} ${CERC_REPO_BASE_DIR}/plugeth-statediff diff --git a/app/data/container-build/cerc-plugeth/build.sh b/app/data/container-build/cerc-plugeth/build.sh index 37655db7..cd98c5c9 100755 --- a/app/data/container-build/cerc-plugeth/build.sh +++ b/app/data/container-build/cerc-plugeth/build.sh @@ -2,4 +2,7 @@ # Build cerc/plugeth source ${CERC_CONTAINER_BASE_DIR}/build-base.sh # Pass Go auth token if present -docker build -t cerc/plugeth:local ${build_command_args} --build-arg GIT_VDBTO_TOKEN=${CERC_GO_AUTH_TOKEN} ${CERC_REPO_BASE_DIR}/plugeth +if [[ -n "${CERC_GO_AUTH_TOKEN}" ]]; then + build_command_args="${build_command_args} --build-arg GIT_VDBTO_TOKEN=${CERC_GO_AUTH_TOKEN}" +fi +docker build -t cerc/plugeth:local ${build_command_args} ${CERC_REPO_BASE_DIR}/plugeth -- 2.45.2