diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01e69c8..c81e998 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ include: - - local: 'ci_templates/.cic-base.yml' + - local: 'ci_templates/.cic-template.yml' - local: 'apps/contract-migration/.gitlab-ci.yml' + - local: 'apps/cic-eth/.gitlab-ci.yml' stages: - build diff --git a/.gitmodules b/.gitmodules index 0aa4078..2fa7e0b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "apps/cic-cache"] path = apps/cic-cache url = git@gitlab.com:grassrootseconomics/cic-cache.git +[submodule "apps/cic-meta"] + path = apps/cic-meta + url = git@gitlab.com:grassrootseconomics/cic-meta.git diff --git a/apps/cic-meta b/apps/cic-meta new file mode 160000 index 0000000..76e8b80 --- /dev/null +++ b/apps/cic-meta @@ -0,0 +1 @@ +Subproject commit 76e8b80965ccedbc59790248050fa598a747f85a diff --git a/apps/contract-migration/README.md b/apps/contract-migration/README.md index a3bf699..59b0185 100644 --- a/apps/contract-migration/README.md +++ b/apps/contract-migration/README.md @@ -15,7 +15,7 @@ Now build this repo's image and run it against the 'eth' service (ganache, for e Here is how to do that in one shot: ``` -docker build -t registry.gitlab.com/grassrootseconomics/cic-docker-internal . && docker run --env ETH_PROVIDER=http://eth:8545 --net cic-network -v cic-docker-internal_contract-config:/tmp/cic/config --rm -it registry.gitlab.com/grassrootseconomics/cic-docker-internal reset.sh +docker build -t registry.gitlab.com/grassrootseconomics/cic-docker-internal -f docker/ . && docker run --env ETH_PROVIDER=http://eth:8545 --net cic-network -v cic-docker-internal_contract-config:/tmp/cic/config --rm -it registry.gitlab.com/grassrootseconomics/cic-docker-internal reset.sh ``` Stop the containers and bring down the services with diff --git a/apps/contract-migration/Dockerfile b/apps/contract-migration/docker/Dockerfile similarity index 100% rename from apps/contract-migration/Dockerfile rename to apps/contract-migration/docker/Dockerfile diff --git a/ci_templates/.cic-base.yml b/ci_templates/.cic-template.yml similarity index 92% rename from ci_templates/.cic-base.yml rename to ci_templates/.cic-template.yml index 4af3530..fdb0515 100644 --- a/ci_templates/.cic-base.yml +++ b/ci_templates/.cic-template.yml @@ -11,12 +11,13 @@ # https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4125 DOCKER_TLS_VERIFY: 1 DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client" + DOCKERFILE_PATH: docker/ services: - docker:19.03.13-dind before_script: - docker info - cd $CONTEXT script: - - docker build -t $CI_PROJECT_PATH_SLUG:$CI_COMMIT_SHORT_SHA . + - docker build -t $CI_PROJECT_PATH_SLUG:$CI_COMMIT_SHORT_SHA -f $DOCKERFILE_PATH . diff --git a/docker-compose.yml b/docker-compose.yml index 3be36a5..c730ac4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,7 +54,9 @@ services: - bee-data:/tmp/cic/bee contract-migration: - build: apps/contract-migration + build: + context: apps/contract-migration + dockerfile: apps/contract-migration/docker/ environment: # ETH_PROVIDER should be broken out into host/port but cic-eth expects this ETH_PROVIDER: http://eth:8545 @@ -125,9 +127,9 @@ services: dockerfile: cic-eth/docker/Dockerfile environment: CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS - ETH_PROVIDER: ${ETH_PROVIDER:-http://eth:8545} - ETH_ABI_DIR: ${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi} ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER + ETH_PROVIDER: http://eth:8545 + ETH_ABI_DIR: ${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi} DATABASE_USER: ${DATABASE_USER:-grassroots} DATABASE_HOST: ${DATABASE_HOST:-postgres} DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} @@ -136,10 +138,10 @@ services: DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres} DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2} PGPASSWORD: ${DATABASE_PASSWORD:-tralala} - CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-8995} + CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-Bloxberg:8995} BANCOR_DIR: ${BANCOR_DIR:-/usr/local/share/cic/bancor} - CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://} - CELERY_RESULT_URL: ${CELERY_RESULT_URL:-""} + CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis} + CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis} SIGNER_SOCKET_PATH: ${SIGNER_SOCKET_PATH:-/tmp/cic/signer/jsonrpc.ipc} SIGNER_SECRET: ${SIGNER_SECRET:-deadbeef} ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER: ${DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER:-0xACB0BC74E1686D62dE7DC6414C999EA60C09F0eA}