Commit bd0ee5d3 authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

fix_artifacts: simplify .post stage copying the public folder to build.

parent ddd3b042
Loading
Loading
Loading
Loading
Loading
+14 −25
Original line number Diff line number Diff line
@@ -74,19 +74,22 @@ pages:
      #update coverage o the last release
    - pip3 install --upgrade coverage     
    - ls -lR
    - cp -R $COMMON_PATH/build/ build
    - cp -R $MIDCSP_PATH/build/* build
    # copy the content of packages folders in public
    # path to  all files is relative to the repository
    # that has been cloned during the build
    - cp -R $COMMON_PATH/build/ public
    - cp -R $MIDCSP_PATH/build/* public
    - ls -lR 
    - junitparser merge build/reports/csp-lmc-common-unit-tests.xml build/reports/csp-lmc-mid-unit-tests.xml build/reports/unit-tests.xml
    - junitparser merge public/reports/csp-lmc-common-unit-tests.xml public/reports/csp-lmc-mid-unit-tests.xml public/reports/unit-tests.xml
    - ls -lR 
    - junitparser merge build/reports/csp-lmc-common-linting.xml build/reports/csp-lmc-mid-linting.xml build/reports/linting.xml
    - rm build/reports/csp-lmc-common-unit-tests.xml build/reports/csp-lmc-mid-unit-tests.xml
    - rm build/reports/csp-lmc-common-linting.xml build/reports/csp-lmc-mid-linting.xml
    - coverage combine build/csp-lmc-common_coverage build/csp-lmc-mid_coverage
    - junitparser merge public/reports/csp-lmc-common-linting.xml public/reports/csp-lmc-mid-linting.xml public/reports/linting.xml
    - rm public/reports/csp-lmc-common-unit-tests.xml public/reports/csp-lmc-mid-unit-tests.xml
    - rm public/reports/csp-lmc-common-linting.xml public/reports/csp-lmc-mid-linting.xml
    - cd public
    - coverage combine csp-lmc-common_coverage csp-lmc-mid_coverage
    - coverage xml -i
     # rename file because bagdges creation looks for code-coverage.xml file
    - mv coverage.xml build/reports/code-coverage.xml
    - cp -R build public
    - mv coverage.xml ./reports/code-coverage.xml
  artifacts:
    paths:
      - public 
@@ -99,25 +102,11 @@ create ci metrics:
  tags:
    - docker-executor
  script:
    - pwd
    - pip3 install junitparser
      #update coverage o the last release
    - pip3 install --upgrade coverage     
    - ls -lR
    - cp -R csp-lmc-common/docker/build build
    - cp -R csp-lmc-mid/docker/build/* build
    # copy public in build because ci-metrics scripts look for files in build
    - cp -R public build
    - ls -lR 
    - junitparser merge ./build/reports/csp-lmc-common-unit-tests.xml ./build/reports/csp-lmc-mid-unit-tests.xml ./build/reports/unit-tests.xml
    - junitparser merge ./build/reports/csp-lmc-common-linting.xml ./build/reports/csp-lmc-mid-linting.xml ./build/reports/linting.xml
    - ls -lR 
    - rm ./build/reports/csp-lmc-common-unit-tests.xml ./build/reports/csp-lmc-mid-unit-tests.xml
    - rm ./build/reports/csp-lmc-common-linting.xml ./build/reports/csp-lmc-mid-linting.xml
    - coverage combine ./build/csp-lmc-common_coverage ./build/csp-lmc-mid_coverage
    - coverage xml -i
     # rename file because bagdges creation looks for code-coverage.xml file
    - mv coverage.xml ./build/reports/code-coverage.xml
    # Gitlab CI badges creation: START
    - ls -alR 
    - apt-get -y update
    - apt-get install -y curl --no-install-recommends
    - curl -s https://gitlab.com/ska-telescope/ci-metrics-utilities/raw/master/scripts/ci-badges-func.sh | sh