Update apps/cic-eth/.gitlab-ci.yml, ci_templates/.cic-template.yml files

This commit is contained in:
Blair Vanderlugt 2021-05-23 00:04:05 +00:00
parent 830297d352
commit e442f0399a
2 changed files with 8 additions and 14 deletions

View File

@ -14,8 +14,8 @@ build-mr-unittest-cic-eth:
- .py_build_unittest_merge_request
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- $CONTEXT/$APP_NAME/**/*
# changes:
# - $CONTEXT/$APP_NAME/**/*
when: always
test-mr-unittest-cic-eth:
@ -24,8 +24,8 @@ test-mr-unittest-cic-eth:
- .py_unittest_merge_request
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- $CONTEXT/$APP_NAME/**/*
# changes:
# - $CONTEXT/$APP_NAME/**/*
when: always

View File

@ -22,26 +22,20 @@ variables:
stage: build
variables:
CI_DEBUG_TRACE: "true"
artifacts:
paths:
- $APP_NAME-test-image.tar
expire_in: 1 day
when: on_success
script:
- mkdir -p /kaniko/.docker
- 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 --cache-repo $CI_REGISTRY_IMAGE --target test --tarPath $APP_NAME-test-image.tar --no-push --destination $CI_REGISTRY_IMAGE/$APP_NAME:latest
- /kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE_PATH $KANIKO_CACHE_ARGS --cache-repo $CI_REGISTRY_IMAGE --target test --tarPath $APP_NAME-test-image.tar --destination $CI_REGISTRY_IMAGE/$APP_NAME-test:latest
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always
.py_unittest_merge_request:
image: docker:latest
stage: test
script:
- docker load -i $APP_NAME-test-image.tar
- docker images
image: $CI_REGISTRY_IMAGE/$APP_NAME-test:latest
script:
- pytest
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always