Commit 580088c1 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

CI/CD pipeline

- corrected dependencies in service component
parent 32447f07
Loading
Loading
Loading
Loading
+2 −60
Original line number Diff line number Diff line
@@ -30,40 +30,13 @@ build service:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
    - changes:
      # Common-triggers
      - src/common/**/*.py
      - proto/*.proto
      - .gitlab-ci.yml

      # Context-triggers
      - src/context/**/*.{py,in,yml}
      - src/context/Dockerfile
      - src/context/tests/*.py
      - src/context/tests/Dockerfile
      - manifests/contextservice.yaml

      # Device-triggers
      - src/device/**/*.{py,in,yml}
      - src/device/Dockerfile
      - src/device/tests/*.py
      - src/device/tests/Dockerfile
      - manifests/deviceservice.yaml

      # PathComp-triggers
      - src/pathcomp/.gitlab-ci.yml
      - src/pathcomp/frontend/**/*.{py,in,yml}
      - src/pathcomp/frontend/Dockerfile
      - src/pathcomp/frontend/tests/*.py
      - src/pathcomp/backend/**/*.{c,h,conf}
      - src/pathcomp/backend/Makefile
      - src/pathcomp/backend/Dockerfile
      - manifests/pathcompservice.yaml

      # Service-triggers
      - src/$IMAGE_NAME/**/*.{py,in,yml}
      - src/$IMAGE_NAME/Dockerfile
      - src/$IMAGE_NAME/tests/*.py
      - manifests/${IMAGE_NAME}service.yaml
      - .gitlab-ci.yml

# Apply unit test to the component
unit_test service:
@@ -73,10 +46,6 @@ unit_test service:
  stage: unit_test_stage3
  needs:
    - build service
    - unit_test context
    - unit_test device
    - unit_test pathcomp-backend
    - unit_test pathcomp-frontend
  before_script:
    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
    - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create --driver=bridge teraflowbridge; fi
@@ -214,40 +183,13 @@ unit_test service:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
    - changes:
      # Common-triggers
      - src/common/**/*.py
      - proto/*.proto
      - .gitlab-ci.yml

      # Context-triggers
      - src/context/**/*.{py,in,yml}
      - src/context/Dockerfile
      - src/context/tests/*.py
      - src/context/tests/Dockerfile
      - manifests/contextservice.yaml

      # Device-triggers
      - src/device/**/*.{py,in,yml}
      - src/device/Dockerfile
      - src/device/tests/*.py
      - src/device/tests/Dockerfile
      - manifests/deviceservice.yaml

      # PathComp-triggers
      - src/pathcomp/.gitlab-ci.yml
      - src/pathcomp/frontend/**/*.{py,in,yml}
      - src/pathcomp/frontend/Dockerfile
      - src/pathcomp/frontend/tests/*.py
      - src/pathcomp/backend/**/*.{c,h,conf}
      - src/pathcomp/backend/Makefile
      - src/pathcomp/backend/Dockerfile
      - manifests/pathcompservice.yaml

      # Service-triggers
      - src/$IMAGE_NAME/**/*.{py,in,yml}
      - src/$IMAGE_NAME/Dockerfile
      - src/$IMAGE_NAME/tests/*.py
      - manifests/${IMAGE_NAME}service.yaml
      - .gitlab-ci.yml

  artifacts:
      when: always