diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88eb50eb..52f8ffd6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,6 @@ include: - local: 'apps/data-seeding/.gitlab-ci.yml' stages: - # - build + - build - test - release diff --git a/apps/cic-eth/.gitlab-ci.yml b/apps/cic-eth/.gitlab-ci.yml index edbbb4d3..780317c8 100644 --- a/apps/cic-eth/.gitlab-ci.yml +++ b/apps/cic-eth/.gitlab-ci.yml @@ -21,12 +21,16 @@ build-mr-unittest-cic-eth: test-mr-cic-eth: extends: - .cic_eth_variables - - .py_unittest_merge_request + stage: test + image: $CI_REGISTRY_IMAGE/$APP_NAME-test:latest + script: + - cd apps/$APP_NAME/ + - pytest tests/unit/ rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" # changes: # - $CONTEXT/$APP_NAME/**/* - when: always + when: always build-push-cic-eth: diff --git a/ci_templates/.cic-template.yml b/ci_templates/.cic-template.yml index d025be91..dbfca295 100644 --- a/ci_templates/.cic-template.yml +++ b/ci_templates/.cic-template.yml @@ -18,17 +18,17 @@ variables: - if: $CI_PIPELINE_SOURCE == "merge_request_event" when: always -.py_build_unittest_merge_request: - stage: build - variables: - CI_DEBUG_TRACE: "true" - 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 --destination $CI_REGISTRY_IMAGE/$APP_NAME-test:latest - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - when: always +# .py_build_unittest_merge_request: +# stage: build +# variables: +# CI_DEBUG_TRACE: "true" +# 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 --destination $CI_REGISTRY_IMAGE/$APP_NAME-test:latest +# rules: +# - if: $CI_PIPELINE_SOURCE == "merge_request_event" +# when: always .py_unittest_merge_request: