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 - .py_build_unittest_merge_request
rules: rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes: # changes:
- $CONTEXT/$APP_NAME/**/* # - $CONTEXT/$APP_NAME/**/*
when: always when: always
test-mr-unittest-cic-eth: test-mr-unittest-cic-eth:
@ -24,8 +24,8 @@ test-mr-unittest-cic-eth:
- .py_unittest_merge_request - .py_unittest_merge_request
rules: rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes: # changes:
- $CONTEXT/$APP_NAME/**/* # - $CONTEXT/$APP_NAME/**/*
when: always when: always

View File

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