Commit 7bedb7d6 authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

Split csp-lmc-common package built and publish stages in CI pipelines.

Changes to mid-csp-lmc Dockerfile and setup.py to install the csp-lmc-common
package generated by the previous pipeline stage
parent acdb4681
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ cache:
# publish:      publish on nexus the mid and low images and the  common python package
# pages:        create the badges
stages:
  - build-common
  - test-common
  - publish-common
  - build
  - test
  - linting
+27 −3
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
# 

.build_python:
  stage: build
  stage: build-common
  dependencies: []
  image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest
  tags:
@@ -49,19 +49,43 @@ build:csp-lmc-common_image:
  tags:
    - docker-executor
    - engageska
  stage: build
  stage: build-common
  script:
    - cd $BUILD_PATH      
    - make build
  variables:
    BUILD_PATH: csp-lmc-common/docker

#  
# Test csp-lmc-common project
#

.test:
  image: nexus.engageska-portugal.pt/ska-docker/tango-builder:latest
  before_script:
    - docker login -u $DOCKER_REGISTRY_USERNAME -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_HOST
  tags:
    - docker-executor
    - engageska
  artifacts:
    paths:
      - build
  variables:
    BUILD_PATH: csp-lmc-common/docker

test:csp-lmc-common:
  extends: .test
  stage: test-common
  script:
    - cd $BUILD_PATH  
    - make test

#
# Publish csp-lmc-common python package
#

.publish_python:
  stage: publish
  stage: publish-common
  image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest
  variables:
    TWINE_USERNAME: $TWINE_USERNAME
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ name = "nexus-hosted"
numpy = "==1.17.2"
pytango = "==9.3.1"
lmcbaseclasses = ">=0.4.0"
csp-lmc-common = ">=0.4.0"
# itango is added to make it easier to exercise the device in a CLI session,
# but it's not mandatory. If you remove itango, you should also remove the
# 'RUN ipython profile create' line from Dockerfile.
+5 −2
Original line number Diff line number Diff line
@@ -5,7 +5,10 @@ FROM nexus.engageska-portugal.pt/ska-docker/ska-python-runtime:latest AS runtime
RUN ipython profile create
#install lmc-base-classes
USER root
#RUN DEBIAN_FRONTEND=noninteractive pip3 install https://nexus.engageska-portugal.pt/repository/pypi/packages/lmcbaseclasses/0.4.0+5bdedbed/lmcbaseclasses-0.4.0+5bdedbed.tar.gz
RUN DEBIAN_FRONTEND=noninteractive pip3 install https://www.arcetri.astro.it/~egiani/csp-lmc-common-0.3.1.tar.gz

#RUN DEBIAN_FRONTEND=noninteractive pip3 install https://nexus.engageska-portugal.pt/repository/pypi/packages/ska-logging/0.2.1/ska_logging-0.2.1.tar.gz
#RUN DEBIAN_FRONTEND=noninteractive pip3 install https://nexus.engageska-portugal.pt/repository/pypi/packages/lmcbaseclasses/0.4.1+14ff4f1b/lmcbaseclasses-0.4.1+14ff4f1b.tar.gz
#RUN DEBIAN_FRONTEND=noninteractive pip3 install https://nexus.engageska-portugal.pt/repository/pypi/packages/csp-lmc-common/0.3.1/csp-lmc-common-0.3.1.tar.gz
RUN python3 -m pip install -e . --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple

CMD ["/venv/bin/python","/app/csp_lmc_mid/MidCspMaster.py"]
+2 −1
Original line number Diff line number Diff line
@@ -37,7 +37,8 @@ setup(
        include_package_data=True,
        install_requires = [
            'pytango >=9.3.1',
            'future'
            'future',
            'csp-lmc-common >=0.4.0'
        ],
        setup_requires=[
            'pytest-runner',