From 7083045a741853d0c15f805ede8168b32bd23f00 Mon Sep 17 00:00:00 2001 From: Blair Vanderlugt Date: Thu, 4 Feb 2021 04:36:32 +0000 Subject: [PATCH] Update apps/cic-eth/.gitlab-ci.yml, ci_templates/.cic-template.yml, apps/contract-migration/.gitlab-ci.yml files --- .gitignore | 1 + .gitlab-ci.yml | 8 +------- apps/cic-eth/.gitlab-ci.yml | 5 +++-- apps/contract-migration/.gitlab-ci.yml | 4 ++-- apps/contract-migration/docker/Dockerfile | 12 ++++++------ ci_templates/.cic-template.yml | 4 +++- docker-compose.yml | 2 +- service-configs/.gitkeep | 0 8 files changed, 17 insertions(+), 19 deletions(-) create mode 100644 service-configs/.gitkeep diff --git a/.gitignore b/.gitignore index a0408f8..15b5df4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ service-configs/* +!service-configs/.gitkeep diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 07fb8b8..c81e998 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,7 @@ -variables: - GIT_SUBMODULE_STRATEGY: recursive -before_script: - - git submodule sync --recursive - - git submodule update --init --recursive - include: - local: 'ci_templates/.cic-template.yml' - local: 'apps/contract-migration/.gitlab-ci.yml' - # - local: 'apps/cic-eth/.gitlab-ci.yml' + - local: 'apps/cic-eth/.gitlab-ci.yml' stages: - build diff --git a/apps/cic-eth/.gitlab-ci.yml b/apps/cic-eth/.gitlab-ci.yml index 428002b..982bfa7 100644 --- a/apps/cic-eth/.gitlab-ci.yml +++ b/apps/cic-eth/.gitlab-ci.yml @@ -1,11 +1,12 @@ .contract-migration-changes-target: rules: - changes: - - $CONTEXT/* + - $CONTEXT/cic-eth/* build-cic-eth: extends: - .contract-migration-changes-target - .py-build variables: - CONTEXT: apps/cic-eth \ No newline at end of file + DOCKERFILE_PATH: cic-eth/docker/Dockerfile + diff --git a/apps/contract-migration/.gitlab-ci.yml b/apps/contract-migration/.gitlab-ci.yml index 36c31ed..b31f8d1 100644 --- a/apps/contract-migration/.gitlab-ci.yml +++ b/apps/contract-migration/.gitlab-ci.yml @@ -1,11 +1,11 @@ .contract-migration-changes-target: rules: - changes: - - $CONTEXT/* + - $CONTEXT/contract-migration/* build-contract-migration: extends: - .contract-migration-changes-target - .py-build variables: - CONTEXT: apps/contract-migration + DOCKERFILE_PATH: contract-migration/docker/Dockerfile diff --git a/apps/contract-migration/docker/Dockerfile b/apps/contract-migration/docker/Dockerfile index cb2ba6c..b8190a4 100644 --- a/apps/contract-migration/docker/Dockerfile +++ b/apps/contract-migration/docker/Dockerfile @@ -52,7 +52,7 @@ RUN apt-get update && \ RUN echo installing nodejs tooling -COPY ./dev/nvm.sh /root/ +COPY contract-migration/dev/nvm.sh /root/ # Install nvm with node and npm # https://stackoverflow.com/questions/25899912/how-to-install-nvm-in-docker @@ -141,18 +141,18 @@ RUN pip install --extra-index-url $pip_extra_index_url \ crypto-dev-signer==0.4.13b9 -COPY testdata/pgp testdata/pgp +COPY contract-migration/testdata/pgp testdata/pgp RUN mkdir -vp /tmp/cic/pgp -COPY testdata/pgp/* /tmp/cic/pgp/ +COPY contract-migration/testdata/pgp/* /tmp/cic/pgp/ # COPY .env_config_template .env_config_template # COPY .env_dockercompose_template .env_dockercompose_template -COPY reset.sh . +COPY contract-migration/reset.sh . # COPY data.sh data.sh -COPY keystore keystore -COPY wait-for-it.sh . +COPY contract-migration/keystore keystore +COPY contract-migration/wait-for-it.sh . RUN chmod +x reset.sh wait-for-it.sh LABEL version="4" diff --git a/ci_templates/.cic-template.yml b/ci_templates/.cic-template.yml index fdb0515..3b7d40a 100644 --- a/ci_templates/.cic-template.yml +++ b/ci_templates/.cic-template.yml @@ -11,12 +11,14 @@ # https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4125 DOCKER_TLS_VERIFY: 1 DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client" - DOCKERFILE_PATH: docker/ + CONTEXT: apps/ services: - docker:19.03.13-dind before_script: - docker info - cd $CONTEXT + - pwd + - ls -la script: - 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 6e2d2a9..2f3592d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -75,7 +75,7 @@ services: contract-migration: build: - context: apps/contract-migration + context: apps dockerfile: apps/contract-migration/docker/ environment: # ETH_PROVIDER should be broken out into host/port but cic-eth expects this diff --git a/service-configs/.gitkeep b/service-configs/.gitkeep new file mode 100644 index 0000000..e69de29