Add autotools jobs for ric-plt/sdl

Use new global-jjb templates to verify, stage and analyze with sonar.
Split into separate packagecloud-stage jobs for deb and rpm packages.

Drop docker-based CI jobs that built and published to PackageCloud.

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I2ccb26b82b64069d6ef95e442c6c76be6a3fd507
diff --git a/jjb/ric-plt-sdl/ric-plt-sdl.yaml b/jjb/ric-plt-sdl/ric-plt-sdl.yaml
index ea198f4..13481a2 100644
--- a/jjb/ric-plt-sdl/ric-plt-sdl.yaml
+++ b/jjb/ric-plt-sdl/ric-plt-sdl.yaml
@@ -13,37 +13,91 @@
     jobs:
       - gerrit-info-yaml-verify
 
-- sdl_docker_common: &sdl_docker_common
-    # values apply to all ric-plt/sdl docker projects
-    name: sdl-docker-common
+- sdl_common: &sdl_common
+    # values apply to all ric-plt/sdl projects
+    name: sdl-common
     # git repo
     project: ric-plt/sdl
     # jenkins job name prefix
     project-name: ric-plt-sdl
-    # maven settings file has docker credentials
+    # maven settings file has credentials
     mvn-settings: ric-plt-sdl-settings
 
+# compile code and run tests
 - project:
-    <<: *sdl_docker_common
-    name: ric-plt-sdl
-    # use host network to clone from our gerrit
-    docker-build-args: '--network=host -f ci/Dockerfile'
-    # image name
-    docker-name: '{name}'
-    # image tag, use a fixed value
-    container-tag-method: latest
+    <<: *sdl_common
+    name: ric-plt-sdl-lib
+    pre-build: !include-raw-escape: setup-sdl-build-deb.sh
+    build-node: ubuntu1804-builder-2c-2g
+    make-opts: -j 2 test
     jobs:
-      - gerrit-docker-verify
-      - oran-gerrit-docker-ci-pc-merge
+      - gerrit-autotools-verify
     stream:
       - master:
           branch: master
 
+# common settings for building DEB and RPM packages
+- sdl_pkg_common: &sdl_pkg_common
+    name: ric-plt-pkg-cmn
+    pre-build: !include-raw-escape: setup-sdl-build-deb.sh
+    # directory with package files
+    build-dir: pkg
+    # docker image has the package_cloud gem
+    build-node: ubuntu1804-docker-4c-4g
+    jobs:
+      - gerrit-autotools-packagecloud-stage
+    stream:
+      - master:
+          branch: master
+
+# build DEB package files
 - project:
+    <<: *sdl_common
+    <<: *sdl_pkg_common
+    name: ric-plt-sdl-deb
+    project-name: '{name}'
+    configure-opts: --with-deb-dir={build-dir}
+    make-opts: -j4 deb-pkg
+
+# build RPM package files
+- project:
+    <<: *sdl_common
+    <<: *sdl_pkg_common
+    name: ric-plt-sdl-rpm
+    project-name: '{name}'
+    configure-opts: --with-rpm-dir={build-dir}
+    # parallel jobs (option -j) fail on rpm build
+    # https://bugzilla.redhat.com/show_bug.cgi?id=1398405
+    make-opts: rpm-pkg
+
+# analyze C code and test coverage
+- project:
+    <<: *sdl_common
+    name: ric-plt-lib-sdl-sonarqube
+    pre-build: !include-raw-escape: setup-sdl-build-deb.sh
+    build-node: ubuntu1804-docker-4c-4g
+    # set appropriate CXXFLAGS
+    configure-opts: --with-gcov-report-dir=gcov_report
+    # use all cores
+    make-opts: -j4 test_gcov
+    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
+        sonar.cfamily.build-wrapper-output=$WORKSPACE/bw-output
+        sonar.cfamily.cache.enabled=false
+        sonar.cfamily.gcov.reportsPath=gcov_report
+        sonar.cfamily.threads=4
+    jobs:
+      - gerrit-autotools-sonarqube
+
+- project:
+    <<: *sdl_common
     name: ric-plt-sdl-release
-    project: ric-plt/sdl
-    project-name: ric-plt-sdl
-    build-node: centos7-builder-1c-1g
     jobs:
       - gerrit-packagecloud-release-verify
       - gerrit-packagecloud-release-merge