diff --git a/.gitignore b/.gitignore index a0408f81..15b5df4a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ service-configs/* +!service-configs/.gitkeep diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 07fb8b8e..c81e998b 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 428002b8..982bfa76 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 36c31ed6..b31f8d18 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 cb2ba6cc..b8190a4c 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 fdb05153..3b7d40ad 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 6e2d2a9c..2f3592d8 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 00000000..e69de29b