Update apps/contract-migration/docker/Dockerfile, apps/cic-eth/.gitlab-ci.yml, ci_templates/.cic-template.yml, apps/contract-migration/.gitlab-ci.yml files
This commit is contained in:
parent
db4eb31de0
commit
8cdd405122
@ -4,25 +4,20 @@
|
|||||||
DOCKERFILE_PATH: docker/Dockerfile_ci
|
DOCKERFILE_PATH: docker/Dockerfile_ci
|
||||||
CONTEXT: $CI_PROJECT_DIR/apps/$APP_NAME
|
CONTEXT: $CI_PROJECT_DIR/apps/$APP_NAME
|
||||||
|
|
||||||
.cic_eth_changes_target:
|
build-mr-cic-eth:
|
||||||
|
extends:
|
||||||
|
- .cic_eth_variables
|
||||||
|
- .py_build_target_dev
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
changes:
|
changes:
|
||||||
- $CONTEXT/**/*
|
- $CONTEXT/**/*
|
||||||
when: always
|
when: always
|
||||||
- when: never
|
|
||||||
|
|
||||||
build-mr-cic-eth:
|
|
||||||
extends:
|
|
||||||
- .cic_eth_variables
|
|
||||||
- .cic_eth_changes_target
|
|
||||||
- .py_build_target_dev
|
|
||||||
|
|
||||||
test-mr-cic-eth:
|
test-mr-cic-eth:
|
||||||
stage: test
|
stage: test
|
||||||
extends:
|
extends:
|
||||||
- .cic_eth_variables
|
- .cic_eth_variables
|
||||||
- .cic_eth_changes_target
|
|
||||||
cache:
|
cache:
|
||||||
key:
|
key:
|
||||||
files:
|
files:
|
||||||
@ -35,8 +30,18 @@ test-mr-cic-eth:
|
|||||||
- pip install -r test_requirements.txt
|
- pip install -r test_requirements.txt
|
||||||
- export PYTHONPATH=. && pytest -x --cov=cic_eth --cov-fail-under=90 --cov-report term-missing tests
|
- export PYTHONPATH=. && pytest -x --cov=cic_eth --cov-fail-under=90 --cov-report term-missing tests
|
||||||
needs: ["build-mr-cic-eth"]
|
needs: ["build-mr-cic-eth"]
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
changes:
|
||||||
|
- $CONTEXT/**/*
|
||||||
|
when: always
|
||||||
|
|
||||||
build-push-cic-eth:
|
build-push-cic-eth:
|
||||||
extends:
|
extends:
|
||||||
- .py_build_push
|
- .py_build_push
|
||||||
- .cic_eth_variables
|
- .cic_eth_variables
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == "master"
|
||||||
|
changes:
|
||||||
|
- $CONTEXT/**/*
|
||||||
|
when: always
|
||||||
|
@ -2,26 +2,24 @@
|
|||||||
variables:
|
variables:
|
||||||
APP_NAME: contract-migration
|
APP_NAME: contract-migration
|
||||||
DOCKERFILE_PATH: $APP_NAME/docker/Dockerfile_ci
|
DOCKERFILE_PATH: $APP_NAME/docker/Dockerfile_ci
|
||||||
|
CONTEXT: $CI_PROJECT_DIR/apps/$APP_NAME
|
||||||
# .contract_migration_changes_target:
|
|
||||||
# rules:
|
|
||||||
# - changes:
|
|
||||||
# - $CONTEXT/$APP_NAME/*
|
|
||||||
|
|
||||||
.contract_migration_changes_target:
|
|
||||||
rules:
|
|
||||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
||||||
changes:
|
|
||||||
- apps/contract-migration/**/*
|
|
||||||
when: always
|
|
||||||
|
|
||||||
build-mr-contract-migration:
|
build-mr-contract-migration:
|
||||||
extends:
|
extends:
|
||||||
- .contract_migration_changes_target
|
|
||||||
- .py_build_merge_request
|
- .py_build_merge_request
|
||||||
- .contract_migration_variables
|
- .contract_migration_variables
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||||
|
changes:
|
||||||
|
- $CONTEXT/**/*
|
||||||
|
when: always
|
||||||
|
|
||||||
build-push-contract-migration:
|
build-push-contract-migration:
|
||||||
extends:
|
extends:
|
||||||
- .py_build_push
|
- .py_build_push
|
||||||
- .contract_migration_variables
|
- .contract_migration_variables
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == "master"
|
||||||
|
changes:
|
||||||
|
- $CONTEXT/**/*
|
||||||
|
when: always
|
||||||
|
@ -39,6 +39,4 @@ RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
|
|||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
|
|
||||||
COPY contract-migration/ .
|
COPY contract-migration/ .
|
||||||
RUN chmod +x *.sh
|
RUN chmod +x *.sh
|
||||||
|
|
||||||
RUN echo "TEST THE RULESSSS"
|
|
@ -37,9 +37,6 @@ variables:
|
|||||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > "/kaniko/.docker/config.json"
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > "/kaniko/.docker/config.json"
|
||||||
# - /kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE_PATH $KANIKO_CACHE_ARGS --destination $IMAGE_TAG
|
# - /kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE_PATH $KANIKO_CACHE_ARGS --destination $IMAGE_TAG
|
||||||
- /kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE_PATH $KANIKO_CACHE_ARGS --destination $IMAGE_TAG --destination $CI_REGISTRY_IMAGE/$APP_NAME:latest
|
- /kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE_PATH $KANIKO_CACHE_ARGS --destination $IMAGE_TAG --destination $CI_REGISTRY_IMAGE/$APP_NAME:latest
|
||||||
rules:
|
|
||||||
- if: $CI_COMMIT_BRANCH == "master"
|
|
||||||
when: always
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user