Loading csp-lmc-common/.gitlab-ci.yml +1 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ linting:csp-lmc-common: script: - cd $BUILD_PATH - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA) .publish_python_release_common: extends: .publish_python_common only: [master] Loading csp-lmc-mid/.gitlab-ci.yml +6 −1 Original line number Diff line number Diff line Loading @@ -33,17 +33,22 @@ 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 COMMMON_VER=$(python setup.py --version) - echo $COMMON_VER - cd .. tags: - k8srunner stage: build script: - cd $BUILD_PATH - echo $IMG - docker build -t $IMG --build-arg PROJECT_ID=$CI_PROJECT_ID -f Dockerfile.gitlab . - docker build -t $IMG --build-arg PROJECT_ID=$CI_PROJECT_ID --build-arg PKG_VER=$COMMON_VER --build-arg RELEASE="+dev.$CI_COMMIT_SHORT_SHA" -f Dockerfile.gitlab . - echo -n "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY - docker push "$IMG" variables: BUILD_PATH: csp-lmc-mid COMMON_PATH: csp-lmc-common IMG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" Loading csp-lmc-mid/Dockerfile.gitlab +3 −1 Original line number Diff line number Diff line Loading @@ -11,11 +11,13 @@ RUN ipython profile create ENV PATH=/home/tango/.local/bin:$PATH ARG PROJECT_ID ARG RELEASE ARG PKG_VER # install all ska packages from nexus repository before installing the dev # csp-lmc-common package. In this way the csp-lmc-common dependencies are already # in place and the package can be installed from the gitlab repo without errors. RUN python3 -m pip install -r requirements-gitlab.txt . #install RUN python3 -m pip install -U --index-url https://gitlab.com/api/v4/projects/$PROJECT_ID/packages/pypi/simple csp-lmc-common RUN python3 -m pip install -U --index-url https://gitlab.com/api/v4/projects/$PROJECT_ID/packages/pypi/simple csp-lmc-common=="$PKG_VER$RELEASE" CMD ["/venv/bin/python","/app/csp_lmc_mid/MidCspMaster.py"] Loading
csp-lmc-common/.gitlab-ci.yml +1 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ linting:csp-lmc-common: script: - cd $BUILD_PATH - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA) .publish_python_release_common: extends: .publish_python_common only: [master] Loading
csp-lmc-mid/.gitlab-ci.yml +6 −1 Original line number Diff line number Diff line Loading @@ -33,17 +33,22 @@ 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 COMMMON_VER=$(python setup.py --version) - echo $COMMON_VER - cd .. tags: - k8srunner stage: build script: - cd $BUILD_PATH - echo $IMG - docker build -t $IMG --build-arg PROJECT_ID=$CI_PROJECT_ID -f Dockerfile.gitlab . - docker build -t $IMG --build-arg PROJECT_ID=$CI_PROJECT_ID --build-arg PKG_VER=$COMMON_VER --build-arg RELEASE="+dev.$CI_COMMIT_SHORT_SHA" -f Dockerfile.gitlab . - echo -n "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY - docker push "$IMG" variables: BUILD_PATH: csp-lmc-mid COMMON_PATH: csp-lmc-common IMG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" Loading
csp-lmc-mid/Dockerfile.gitlab +3 −1 Original line number Diff line number Diff line Loading @@ -11,11 +11,13 @@ RUN ipython profile create ENV PATH=/home/tango/.local/bin:$PATH ARG PROJECT_ID ARG RELEASE ARG PKG_VER # install all ska packages from nexus repository before installing the dev # csp-lmc-common package. In this way the csp-lmc-common dependencies are already # in place and the package can be installed from the gitlab repo without errors. RUN python3 -m pip install -r requirements-gitlab.txt . #install RUN python3 -m pip install -U --index-url https://gitlab.com/api/v4/projects/$PROJECT_ID/packages/pypi/simple csp-lmc-common RUN python3 -m pip install -U --index-url https://gitlab.com/api/v4/projects/$PROJECT_ID/packages/pypi/simple csp-lmc-common=="$PKG_VER$RELEASE" CMD ["/venv/bin/python","/app/csp_lmc_mid/MidCspMaster.py"]