Loading csp-lmc-mid/.gitlab-ci.yml +0 −181 Original line number Diff line number Diff line # Local Gitlab-CI file for csp-lmc-mid project # # Build csp-lmc-mid python packages # .build_python: stage: build image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest dependencies: [] tags: - docker-executor - engageska artifacts: paths: - ./$BUILD_PATH/dist/ .build_python_dev: extends: .build_python dependencies: [] script: - cd $BUILD_PATH - python setup.py egg_info -b+dev.$CI_COMMIT_SHORT_SHA sdist bdist_wheel .build_python_release: extends: .build_python script: - cd $BUILD_PATH - python setup.py sdist bdist_wheel build:csp-lmc-mid_pkg_dev: # Executed on a commit extends: .build_python_dev variables: BUILD_PATH: csp-lmc-mid build:csp-lmc-mid_pkg: extends: .build_python_release variables: BUILD_PATH: csp-lmc-mid only: [master] # # Build csp-lmc-mid image # Loading @@ -48,151 +9,9 @@ build:csp-lmc-mid_image: - docker login -u $DOCKER_REGISTRY_USERNAME -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_HOST tags: - docker-executor - engageska stage: build script: - cd $BUILD_PATH - make build variables: BUILD_PATH: csp-lmc-mid/docker # test:csp-lmc-mid: # stage: 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 # - *install_pip # tags: # - docker-executor # script: # - echo $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA) # - pip3 install -U $(ls -d ./csp-lmc-mid/dist/*.whl | grep $CI_COMMIT_SHORT_SHA) --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple # - cd csp-lmc-mid/docker # - make test # artifacts: # paths: # - build # # Test csp-lmc-mid 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-mid/docker test:csp-lmc-mid: extends: .test stage: test script: - cd $BUILD_PATH - make test linting: extends: .test stage: linting script: - apt-get -y update - apt-get install -y python3-pip python3-setuptools python3-wheel --no-install-recommends - cd $BUILD_PATH - make lint # # Publish csp-lmc-mid python package # .publish_python: stage: publish image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest variables: TWINE_USERNAME: $TWINE_USERNAME TWINE_PASSWORD: $TWINE_PASSWORD tags: - docker-executor - engageska before_script: - pip install twine .publish_python_dev: extends: .publish_python except: [master] script: - cd $BUILD_PATH - twine upload --repository-url $PYPI_REPOSITORY_URL dist/* || true .publish_python_release: extends: .publish_python only: [master] script: - cd $BUILD_PATH - twine upload --repository-url $PYPI_REPOSITORY_URL dist/* || true - twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASS dist/* || true publish:csp-lmc-mid_dev: extends: .publish_python_dev dependencies: - build:csp-lmc-mid_pkg_dev variables: BUILD_PATH: csp-lmc-mid publish:csp-lmc-mid: extends: .publish_python_release dependencies: - build:csp-lmc-mid_pkg variables: BUILD_PATH: csp-lmc-mid # # Pages # pages:csp-lmc-mid: 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 stage: pages dependencies: - test:csp-lmc-mid only: - master script: - cd $BUILD_PATH - ls -la - cp -R build public - mv build/htmlcov/* public artifacts: paths: - public expire_in: 30 days variables: BUILD_PATH: csp-lmc-mid/docker # # Release csp-lmc-mid image on nexus # release csp-lmc-mid image: tags: - docker-executor - engageska stage: release dependencies: - build:csp-lmc-mid_image script: - cd $BUILD_PATH - make push when: manual only: refs: - master variables: BUILD_PATH: csp-lmc-mid/docker Loading
csp-lmc-mid/.gitlab-ci.yml +0 −181 Original line number Diff line number Diff line # Local Gitlab-CI file for csp-lmc-mid project # # Build csp-lmc-mid python packages # .build_python: stage: build image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest dependencies: [] tags: - docker-executor - engageska artifacts: paths: - ./$BUILD_PATH/dist/ .build_python_dev: extends: .build_python dependencies: [] script: - cd $BUILD_PATH - python setup.py egg_info -b+dev.$CI_COMMIT_SHORT_SHA sdist bdist_wheel .build_python_release: extends: .build_python script: - cd $BUILD_PATH - python setup.py sdist bdist_wheel build:csp-lmc-mid_pkg_dev: # Executed on a commit extends: .build_python_dev variables: BUILD_PATH: csp-lmc-mid build:csp-lmc-mid_pkg: extends: .build_python_release variables: BUILD_PATH: csp-lmc-mid only: [master] # # Build csp-lmc-mid image # Loading @@ -48,151 +9,9 @@ build:csp-lmc-mid_image: - docker login -u $DOCKER_REGISTRY_USERNAME -p $DOCKER_REGISTRY_PASSWORD $DOCKER_REGISTRY_HOST tags: - docker-executor - engageska stage: build script: - cd $BUILD_PATH - make build variables: BUILD_PATH: csp-lmc-mid/docker # test:csp-lmc-mid: # stage: 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 # - *install_pip # tags: # - docker-executor # script: # - echo $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA) # - pip3 install -U $(ls -d ./csp-lmc-mid/dist/*.whl | grep $CI_COMMIT_SHORT_SHA) --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple # - cd csp-lmc-mid/docker # - make test # artifacts: # paths: # - build # # Test csp-lmc-mid 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-mid/docker test:csp-lmc-mid: extends: .test stage: test script: - cd $BUILD_PATH - make test linting: extends: .test stage: linting script: - apt-get -y update - apt-get install -y python3-pip python3-setuptools python3-wheel --no-install-recommends - cd $BUILD_PATH - make lint # # Publish csp-lmc-mid python package # .publish_python: stage: publish image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest variables: TWINE_USERNAME: $TWINE_USERNAME TWINE_PASSWORD: $TWINE_PASSWORD tags: - docker-executor - engageska before_script: - pip install twine .publish_python_dev: extends: .publish_python except: [master] script: - cd $BUILD_PATH - twine upload --repository-url $PYPI_REPOSITORY_URL dist/* || true .publish_python_release: extends: .publish_python only: [master] script: - cd $BUILD_PATH - twine upload --repository-url $PYPI_REPOSITORY_URL dist/* || true - twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASS dist/* || true publish:csp-lmc-mid_dev: extends: .publish_python_dev dependencies: - build:csp-lmc-mid_pkg_dev variables: BUILD_PATH: csp-lmc-mid publish:csp-lmc-mid: extends: .publish_python_release dependencies: - build:csp-lmc-mid_pkg variables: BUILD_PATH: csp-lmc-mid # # Pages # pages:csp-lmc-mid: 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 stage: pages dependencies: - test:csp-lmc-mid only: - master script: - cd $BUILD_PATH - ls -la - cp -R build public - mv build/htmlcov/* public artifacts: paths: - public expire_in: 30 days variables: BUILD_PATH: csp-lmc-mid/docker # # Release csp-lmc-mid image on nexus # release csp-lmc-mid image: tags: - docker-executor - engageska stage: release dependencies: - build:csp-lmc-mid_image script: - cd $BUILD_PATH - make push when: manual only: refs: - master variables: BUILD_PATH: csp-lmc-mid/docker