From 7c5f6826aed75ee06330abe4ee901d6ab3758a0e Mon Sep 17 00:00:00 2001 From: Blair Vanderlugt Date: Thu, 5 Aug 2021 16:28:10 -0700 Subject: [PATCH] builds for swarm --- .gitlab-ci.yml | 41 +++++++++++++++++++++++++++---------- docker-compose.yml | 50 +++++++++++++--------------------------------- 2 files changed, 44 insertions(+), 47 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52f8ffd6..0492f27e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,14 +1,33 @@ -include: - - local: 'ci_templates/.cic-template.yml' - - local: 'apps/contract-migration/.gitlab-ci.yml' - - local: 'apps/cic-eth/.gitlab-ci.yml' - - local: 'apps/cic-ussd/.gitlab-ci.yml' - - local: 'apps/cic-notify/.gitlab-ci.yml' - - local: 'apps/cic-meta/.gitlab-ci.yml' - - local: 'apps/cic-cache/.gitlab-ci.yml' - - local: 'apps/data-seeding/.gitlab-ci.yml' +#include: +# - local: 'ci_templates/.cic-template.yml' +# - local: 'apps/contract-migration/.gitlab-ci.yml' +# - local: 'apps/cic-eth/.gitlab-ci.yml' +# - local: 'apps/cic-ussd/.gitlab-ci.yml' +# - local: 'apps/cic-notify/.gitlab-ci.yml' +# - local: 'apps/cic-meta/.gitlab-ci.yml' +# - local: 'apps/cic-cache/.gitlab-ci.yml' +# - local: 'apps/data-seeding/.gitlab-ci.yml' + +image: tiangolo/docker-with-compose + +before_script: + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY stages: - build - - test - - release + - deploy + +build-prod: + stage: build + script: + - docker-compose build + only: + - bvander/integration-tests-on-docker + +deplok-prod: + stage: deploy + script: + - docker stack deploy -c docker-compose.yml --with-registry-auth my-stack + only: + - bvander/integration-tests-on-docker + diff --git a/docker-compose.yml b/docker-compose.yml index 187fa8b4..7f43eb58 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,25 +8,10 @@ volumes: bloxberg-data: {} contract-config: {} -networks: - default: - name: cic-network services: - # eth: - # image: trufflesuite/ganache-cli - # ports: - # - ${HTTP_PORT_ETH:-8545} - # - ${WS_PORT_ETH:-8546} - # # Note! -e switch doesnt work, whatever you put there, it will be 100 - # command: "-i 8996 -e 1000 -l 90000000 \ - # -m '${DEV_MNEMONIC:-\"history stumble mystery avoid embark arrive mom foil pledge keep grain dice\"}' \ - # -v --db /tmp/cic/ganache/ganache.db \ - # --noVMErrorsOnRPCResponse --allowUnlimitedContractSize" - # volumes: - # - ganache-db:/tmp/cic/ganache - eth: + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/bloxberg-node build: context: apps/bloxbergValidatorSetup restart: unless-stopped @@ -71,8 +56,7 @@ services: - bee-data:/tmp/cic/bee contract-migration: - profiles: - - migrations + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/contract-migration build: context: apps/contract-migration dockerfile: docker/Dockerfile @@ -126,8 +110,7 @@ services: - contract-config:/tmp/cic/config cic-cache-tracker: - profiles: - - cache + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-cache build: context: apps/cic-cache dockerfile: docker/Dockerfile @@ -164,8 +147,7 @@ services: - contract-config:/tmp/cic/config/:ro cic-cache-tasker: - profiles: - - cache + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-cache build: context: apps/cic-cache dockerfile: docker/Dockerfile @@ -203,8 +185,7 @@ services: - contract-config:/tmp/cic/config/:ro cic-cache-server: - profiles: - - cache + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-cache build: context: apps/cic-cache dockerfile: docker/Dockerfile @@ -236,10 +217,10 @@ services: cic-eth-tasker: + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-eth build: context: apps/cic-eth dockerfile: docker/Dockerfile - target: dev environment: CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER @@ -286,10 +267,10 @@ services: # command: [/bin/sh, "./start_tasker.sh", -q, cic-eth, -vv ] cic-eth-tracker: + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-eth build: context: apps/cic-eth dockerfile: docker/Dockerfile - target: dev environment: ETH_PROVIDER: http://eth:8545 DATABASE_USER: ${DATABASE_USER:-grassroots} @@ -325,10 +306,10 @@ services: cic-eth-dispatcher: + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-eth build: context: apps/cic-eth dockerfile: docker/Dockerfile - target: dev environment: ETH_PROVIDER: http://eth:8545 DATABASE_USER: ${DATABASE_USER:-grassroots} @@ -365,10 +346,10 @@ services: cic-eth-retrier: + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-eth build: context: apps/cic-eth dockerfile: docker/Dockerfile - target: dev environment: ETH_PROVIDER: http://eth:8545 DATABASE_USER: ${DATABASE_USER:-grassroots} @@ -408,6 +389,7 @@ services: cic-notify-tasker: + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-notify build: context: apps/cic-notify dockerfile: docker/Dockerfile @@ -436,8 +418,7 @@ services: cic-meta-server: - profiles: - - custodial-meta + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-meta hostname: meta build: context: apps/cic-meta @@ -471,8 +452,7 @@ services: # command: "/root/start_server.sh -vv" cic-user-ussd-server: - profiles: - - custodial-ussd + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-ussd build: context: apps/cic-ussd dockerfile: docker/Dockerfile @@ -502,8 +482,7 @@ services: command: "/root/start_cic_user_ussd_server.sh -vv" cic-user-server: - profiles: - - custodial-ussd + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-ussd build: context: apps/cic-ussd dockerfile: docker/Dockerfile @@ -526,8 +505,7 @@ services: command: "/root/start_cic_user_server.sh -vv" cic-user-tasker: - profiles: - - custodial-ussd + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-ussd build: context: apps/cic-ussd/ dockerfile: docker/Dockerfile