blob: 60c2f2b9feb5bd0bc20f6fa413c9cfe82c301d58 [file] [log] [blame]
# The ric-plt/lib/rmr repository contains two projects:
# 1) C shared library published as deb/rpm to PackageCloud.io
# 2) Python bindings published as package to PyPI.org
---
- project:
name: ric-plt-lib-rmr-project-view
project-name: ric-plt-lib-rmr
views:
- project-view
- project:
name: ric-plt-lib-rmr-info
project: ric-plt/lib/rmr
project-name: ric-plt-lib-rmr
build-node: centos7-builder-1c-1g
jobs:
- gerrit-info-yaml-verify
- rmr_common: &rmr_common
name: rmr-common
# git repo
project: ric-plt/lib/rmr
# maven settings file has credentials to archive artifacts
mvn-settings: ric-plt-lib-rmr-settings
### RMR C LIBRARY ###
- rmr_c_common: &rmr_c_common
name: rmr-c-common
# jenkins job name prefix
project-name: ric-plt-lib-rmr-c
# test scripts depend on this name
build-dir: $WORKSPACE/build
# use an ubuntu for its modern compiler
build-node: ubuntu1804-builder-2c-2g
# verify and sonar use cmake
cmake-opts: -DDEV_PKG=1
make-opts: install test ARGS=-V
# exclude irrelevant changes
gerrit_trigger_file_paths:
- compare-type: REG_EXP
pattern: '^((?!src/bindings|\/COMMIT_MSG).)*$'
# verify c changes on every branch
- project:
name: ric-plt-lib-rmr-c-verify
<<: *rmr_common
<<: *rmr_c_common
jobs:
- gerrit-cmake-verify
stream:
- all:
branch: '*'
# build deb/rpm using Docker and publish to PackageCloud.io
# on merge to master branch
- project:
<<: *rmr_common
<<: *rmr_c_common
name: ric-plt-lib-rmr-c-package
# need docker
build-node: ubuntu1804-docker-4c-4g
# image is not pushed, use simple name and tag
docker-name: '{name}'
container-tag-method: latest
# use host network for network resources
docker-build-args: '--network=host -f ci/Dockerfile'
jobs:
- oran-gerrit-docker-ci-pc-merge
stream:
- master:
branch: master
# promote deb/rpm from staging to release at PackageCloud.io
- project:
<<: *rmr_common
<<: *rmr_c_common
name: ric-plt-lib-rmr-c-release
# release uses sigul which requires centos
build-node: centos7-builder-1c-1g
jobs:
- gerrit-packagecloud-release-verify
- gerrit-packagecloud-release-merge
# analyze C code and test coverage
- project:
name: ric-plt-lib-rmr-c-sonar
<<: *rmr_common
<<: *rmr_c_common
sonar-project-file: ""
sonar-properties: |
sonar.login={sonarcloud_api_token}
sonar.projectKey={sonarcloud_project_organization}_{project-name}
sonar.projectName={project-name}
sonar.organization={sonarcloud_project_organization}
sonar.build.sourceEncoding=UTF-8
sonar.sources=src/rmr
sonar.cfamily.build-wrapper-output=$WORKSPACE/bw-output
sonar.cfamily.gcov.reportsPath=test
jobs:
- gerrit-cmake-sonarqube
### RMR PYTHON PACKAGE ###
- rmr_py_common: &rmr_py_common
name: rmr-py-common
# jenkins job name prefix
project-name: ric-plt-lib-rmr-py
# the pre-build-script installs RHEL packages
build-node: centos7-builder-1c-1g
# install prereqs
pre-build-script: !include-raw-escape: ../shell/install-rpm-nng-rmr.sh
python-version: python3.6
# bindings live in a subdirectory
tox-dir: src/bindings/rmr-python
gerrit_trigger_file_paths:
- compare-type: REG_EXP
pattern: 'src/bindings/rmr-python/.*'
# verify py changes on every branch
- project:
<<: *rmr_common
<<: *rmr_py_common
name: ric-plt-lib-rmr-py-verify
stream:
- all:
branch: '*'
jobs:
- gerrit-pypi-verify
# build and publish distributions to test.pypi.org from master
- project:
<<: *rmr_common
<<: *rmr_py_common
name: ric-plt-lib-rmr-py-merge
stream:
- master:
branch: master
jobs:
- gerrit-pypi-merge
# promote package from test.pypi.org to pypi.org
- project:
<<: *rmr_common
<<: *rmr_py_common
name: ric-plt-lib-rmr-py-release
jobs:
- '{project-name}-gerrit-pypi-release-jobs'
# analyze Py code and test coverage
- project:
<<: *rmr_common
<<: *rmr_py_common
name: ric-plt-lib-rmr-py-sonarqube
sonar-project-file: ""
sonar-properties: |
sonar.login={sonarcloud_api_token}
sonar.projectKey={sonarcloud_project_organization}_{project-name}
sonar.projectName={project-name}
sonar.organization={sonarcloud_project_organization}
sonar.build.sourceEncoding=UTF-8
sonar.sources=src/bindings/rmr-python
sonar.exclusions=setup.py,tests/*.py
sonar.python.coverage.reportPaths=coverage.xml
jobs:
- gerrit-tox-sonarqube