Set up CICD for QP Driver 10/2810/6
authorTommy Carpenter <tc677g@att.com>
Mon, 16 Mar 2020 15:09:38 +0000 (11:09 -0400)
committerTommy Carpenter <tc677g@att.com>
Mon, 16 Mar 2020 18:28:06 +0000 (14:28 -0400)
Issue-ID: RICAPP-47
Change-Id: I044363c6f02a4cab1c7adefaf6dc25423019ca14
Signed-off-by: Tommy Carpenter <tc677g@att.com>
jjb/ric-app-qp-driver/ric-app-qp-driver.yaml

index 2d27cb1..7c74a02 100644 (file)
@@ -5,10 +5,84 @@
     views:
       - project-view
 
-- project:
-    name: ric-app-qp-driver-info
+- qpd_common: &qpd_common
+    # required even though overridden everywhere
+    name: qpdcommon
+    # git repo
     project: ric-app/qp-driver
+    # jenkins job name prefix
     project-name: ric-app-qp-driver
+    # maven settings file has docker credentials
+    mvn-settings: ric-app-qp-driver-settings
+
+- qpd_python: &qpd_python
+    # installs rmr which is needed for verify and sonar etc
+    name: qpdpy
+    # the install script assumes an ubuntu image
+    build-node: ubuntu1804-builder-2c-2g
+    pre-build-script: !include-raw-escape:
+      - ../shell/install-deb-nng-rmr.sh
+    # impt for verify and tox etc
+    python-version: python3
+    # no need to verify docs
+    tox-envs: code,flake8
+
+- project:
+    <<: *qpd_common
+    name: ric-app-qp-driver-info
     build-node: centos7-builder-1c-1g
     jobs:
       - gerrit-info-yaml-verify
+
+- project:
+    <<: *qpd_common
+    name: ric-app-qp-driver-docker
+    # image name
+    docker-name: 'o-ran-sc/{name}'
+    # source of docker tag
+    container-tag-method: yaml-file
+    # use host network
+    docker-build-args: '--network=host'
+    build-node: ubuntu1804-docker-4c-4g
+    jobs:
+      - '{project-name}-gerrit-docker-jobs'
+    stream:
+      - master:
+          branch: master
+
+- project:
+    <<: *qpd_common
+    <<: *qpd_python
+    name: ric-app-qp-driver-verify
+    jobs:
+      - gerrit-tox-verify
+    stream:
+      # run verify on all branches
+      # the ANT pattern is **/{branch}, we are exploiting that.
+      - all:
+          branch: '*'
+
+- project:
+    <<: *qpd_common
+    name: ric-app-qp-driver-release
+    # maven release requires sigul which requires centos
+    # container release requires docker
+    build-node: centos7-docker-2c-8g
+    jobs:
+      - '{project-name}-gerrit-release-jobs'
+
+- project:
+    <<: *qpd_common
+    <<: *qpd_python
+    name: ric-app-qp-driver-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=qpdriver
+        sonar.python.coverage.reportPaths=coverage.xml
+    jobs:
+      - gerrit-tox-sonarqube