Commit 5b46ff7a authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

CT-220: Login to nexuss before pulling the image.

parent 105da686
Loading
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -3,28 +3,25 @@
# 
# Build csp-lmc-mid python packages
# 

.build_python:
build:csp-lmc-mid_pkg:
  stage: build
  image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest
  dependencies: []
  tags:
    - k8srunner
  artifacts:
    paths:
      - ./$BUILD_PATH/dist/

build:csp-lmc-mid_pkg:
  extends: .build_python
  script:
    - cd $BUILD_PATH
    - python3 setup.py egg_info -b+$CI_COMMIT_SHORT_SHA sdist bdist_wheel
  variables:
    BUILD_PATH: csp-lmc-mid
  only: [master]
  artifacts:
    paths:
      - ./$BUILD_PATH/dist/
  only: 
    - tags

#
# Build and push csp-lmc-mid image on the gitlab repository.
# Build and push csp-lmc-mid image on the gitlab Container Registry.
# Use the csp-lmc-common package stored in the gitlab Package Registry.
# The image is used to run the integration tests running in k8s environment.
#
@@ -32,7 +29,6 @@ build:csp-lmc-mid_pkg:
build:csp-lmc-mid_image:
  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
  - cd $COMMON_PATH      
  - export COMMON_VER=$(python3 setup.py --version)
  - echo $COMMON_VER
@@ -128,6 +124,7 @@ linting:csp-lmc-mid:

#
# Publish csp-lmc-mid python package
# This stage runs only for tags.
#
publish:csp-lmc-mid:
  stage: publish
@@ -170,8 +167,11 @@ publish_chart:

#
# Build and release csp-lmc-mid image on nexus
# This stage runs only for tags.
#
release csp-lmc-mid image:
  before_script:
  - docker login -u $DOCKER_REGISTRY_USERNAME -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_HOST
  tags:
    - k8srunner
  stage: release