Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass through auth token to plugeth container builds #529

Merged
merged 1 commit into from
Sep 8, 2023
Merged
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
1 change: 1 addition & 0 deletions app/build_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
# TODO: make this configurable
container_build_env = {
"CERC_NPM_REGISTRY_URL": get_npm_registry_url(),
"CERC_GO_AUTH_TOKEN": config("CERC_GO_AUTH_TOKEN", default=""),
"CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default=""),
"CERC_REPO_BASE_DIR": dev_root_path,
"CERC_CONTAINER_BASE_DIR": container_build_dir,
Expand Down
8 changes: 7 additions & 1 deletion app/data/container-build/cerc-plugeth-statediff/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env bash
# Build cerc/plugeth-statediff
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
docker build -t cerc/plugeth-statediff:local ${build_command_args} ${CERC_REPO_BASE_DIR}/plugeth-statediff
# 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
8 changes: 7 additions & 1 deletion app/data/container-build/cerc-plugeth/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env bash
# Build cerc/plugeth
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
docker build -t cerc/plugeth:local ${build_command_args} ${CERC_REPO_BASE_DIR}/plugeth
# 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
1 change: 1 addition & 0 deletions app/data/stacks/fixturenet-plugeth-tx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +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.
```
$ laconic-so --stack fixturenet-plugeth-tx setup-repositories
$ laconic-so --stack fixturenet-plugeth-tx build-containers
Expand Down