From: Jessica Wagantall Date: Mon, 6 Apr 2020 16:44:59 +0000 (+0000) Subject: Merge "Add PyPI stage job, drop merge for com/pylog" X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=3727978721f778f442e82b1a9ba9c4b8e2657796;hp=1e6eb5f116c4358d36bfbaecf5e576719039586a;p=ci-management.git Merge "Add PyPI stage job, drop merge for com/pylog" --- diff --git a/jenkins-config/clouds/openstack/cattle/centos8-builder-1c-1g.cfg b/jenkins-config/clouds/openstack/cattle/centos8-builder-1c-1g.cfg new file mode 100644 index 00000000..1e1fddca --- /dev/null +++ b/jenkins-config/clouds/openstack/cattle/centos8-builder-1c-1g.cfg @@ -0,0 +1,3 @@ +IMAGE_NAME=ZZCI - CentOS 8 - builder - x86_64 - 20200403-151332.560 +VOLUME_SIZE=20 +HARDWARE_ID=v2-highcpu-1 diff --git a/jjb/ci-management/ci-packer.yaml b/jjb/ci-management/ci-packer.yaml index 19d91f94..cec36e49 100644 --- a/jjb/ci-management/ci-packer.yaml +++ b/jjb/ci-management/ci-packer.yaml @@ -25,6 +25,7 @@ templates: builder platforms: - centos-7 + - centos-8 - ubuntu-18.04 - project: diff --git a/jjb/it-dev/it-dev.yaml b/jjb/it-dev/it-dev.yaml index 1f3bd094..6d9ccd66 100644 --- a/jjb/it-dev/it-dev.yaml +++ b/jjb/it-dev/it-dev.yaml @@ -85,7 +85,8 @@ pattern: 'xapp_onboarder/.*' parallel: false jobs: - - '{project-name}-gerrit-pypi-jobs' + - gerrit-pypi-verify + - gerrit-pypi-stage stream: - master: branch: master diff --git a/jjb/oran-templates/oran-c-cpp-jobs.yaml b/jjb/oran-templates/oran-c-cpp-jobs.yaml index c43e7358..2291c424 100644 --- a/jjb/oran-templates/oran-c-cpp-jobs.yaml +++ b/jjb/oran-templates/oran-c-cpp-jobs.yaml @@ -97,7 +97,7 @@ - file-id: ".packagecloud" target: "$HOME/.packagecloud" - shell: "{pre-build}" - - shell: !include-raw-escape: ../../global-jjb/shell/cmake-build.sh + - shell: !include-raw-escape: ../shell/cmake-package.sh - oran-packagecloud-push: build-dir: "{build-dir}" packagecloud-account: "{packagecloud-account}" diff --git a/jjb/portal-ric-dashboard/portal-ric-dashboard.yaml b/jjb/portal-ric-dashboard/portal-ric-dashboard.yaml index 908e5782..83c3945b 100644 --- a/jjb/portal-ric-dashboard/portal-ric-dashboard.yaml +++ b/jjb/portal-ric-dashboard/portal-ric-dashboard.yaml @@ -9,7 +9,7 @@ name: portal-ric-dashboard-info project: portal/ric-dashboard project-name: portal-ric-dashboard - build-node: centos7-builder-1c-1g + build-node: centos8-builder-1c-1g jobs: - gerrit-info-yaml-verify diff --git a/jjb/ric-app-qp-driver/ric-app-qp-driver.yaml b/jjb/ric-app-qp-driver/ric-app-qp-driver.yaml index 7c74a02e..ef4ba977 100644 --- a/jjb/ric-app-qp-driver/ric-app-qp-driver.yaml +++ b/jjb/ric-app-qp-driver/ric-app-qp-driver.yaml @@ -38,7 +38,7 @@ <<: *qpd_common name: ric-app-qp-driver-docker # image name - docker-name: 'o-ran-sc/{name}' + docker-name: 'o-ran-sc/ric-app-qp-driver' # source of docker tag container-tag-method: yaml-file # use host network diff --git a/jjb/ric-plt-e2mgr/ric-plt-e2mgr.yaml b/jjb/ric-plt-e2mgr/ric-plt-e2mgr.yaml index 5b4766f7..144b3c73 100644 --- a/jjb/ric-plt-e2mgr/ric-plt-e2mgr.yaml +++ b/jjb/ric-plt-e2mgr/ric-plt-e2mgr.yaml @@ -73,7 +73,7 @@ # Source sonar.sources=E2Manager # Unit tests - sonar.go.coverage.reportPaths=coverage.txt + sonar.go.coverage.reportPaths=E2Manager/coverage.txt # Inclusions sonar.inclusions=**/**.go # Exclusions diff --git a/jjb/ric-plt-lib-rmr/ric-plt-lib-rmr.yaml b/jjb/ric-plt-lib-rmr/ric-plt-lib-rmr.yaml index 60c2f2b9..ff3fae16 100644 --- a/jjb/ric-plt-lib-rmr/ric-plt-lib-rmr.yaml +++ b/jjb/ric-plt-lib-rmr/ric-plt-lib-rmr.yaml @@ -30,43 +30,58 @@ # 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 + build-dir: $WORKSPACE/.build + # Use ubuntu base for cmake v3 + # Use docker variant for packagecloud ruby gem + build-node: ubuntu1804-docker-4c-4g + # install alien package to build RPMS on ubuntu + pre-build: !include-raw-escape: + - ../shell/install-deb-alien.sh # exclude irrelevant changes gerrit_trigger_file_paths: - compare-type: REG_EXP pattern: '^((?!src/bindings|\/COMMIT_MSG).)*$' -# verify c changes on every branch +# verify every commit - project: - name: ric-plt-lib-rmr-c-verify <<: *rmr_common <<: *rmr_c_common + name: ric-plt-lib-rmr-c-verify + project-name: ric-plt-lib-rmr-c + cmake-opts: -DDEV_PKG=1 + make-opts: package test ARGS=-V jobs: - gerrit-cmake-verify stream: - - all: - branch: '*' + - master: + branch: master -# build deb/rpm using Docker and publish to PackageCloud.io -# on merge to master branch +# development library - package and publish - 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' + name: ric-plt-lib-rmr-c-dev + project-name: ric-plt-lib-rmr-c-dev + cmake-opts: -DDEV_PKG=1 + make-opts: package ARGS=-V + install-prefix: /usr/local + jobs: + - oran-gerrit-cmake-pc-stage + stream: + - master: + branch: master + +# runtime library - package and publish +- project: + <<: *rmr_common + <<: *rmr_c_common + name: ric-plt-lib-rmr-c-rt + project-name: ric-plt-lib-rmr-c-rt + cmake-opts: -DDEV_PKG=0 + make-opts: package ARGS=-V + install-prefix: /usr/local jobs: - - oran-gerrit-docker-ci-pc-merge + - oran-gerrit-cmake-pc-stage stream: - master: branch: master @@ -84,9 +99,10 @@ # analyze C code and test coverage - project: - name: ric-plt-lib-rmr-c-sonar + name: ric-plt-lib-rmr-c-sonarqube <<: *rmr_common <<: *rmr_c_common + make-opts: test ARGS=-V sonar-project-file: "" sonar-properties: | sonar.login={sonarcloud_api_token} diff --git a/jjb/ric-plt-sdlpy/ric-plt-sdlpy.yaml b/jjb/ric-plt-sdlpy/ric-plt-sdlpy.yaml index c165935b..59b206a7 100644 --- a/jjb/ric-plt-sdlpy/ric-plt-sdlpy.yaml +++ b/jjb/ric-plt-sdlpy/ric-plt-sdlpy.yaml @@ -33,7 +33,8 @@ pattern: 'ricsdl-package/.*' tox-dir: ricsdl-package jobs: - - '{project-name}-gerrit-pypi-jobs' + - gerrit-pypi-verify + - gerrit-pypi-stage stream: - master: branch: master diff --git a/jjb/shell/cmake-package.sh b/jjb/shell/cmake-package.sh new file mode 100644 index 00000000..021f6601 --- /dev/null +++ b/jjb/shell/cmake-package.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# SPDX-License-Identifier: EPL-1.0 +############################################################################## +# Copyright (c) 2020 The Linux Foundation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +############################################################################## + +# Creates a build directory then invokes cmake and make +# from that dir with only the specified options/targets. +# Supports projects that create DEB/RPM package files for +# upload to PackageCloud or other repository, which must +# use a system install prefix like /usr/local. Calling +# the "install" goal with a system prefix requires sudo, +# but building a package doesn't require the install step. +# Prereqs: +# The build minion has cmake, make, gcc etc. +# Environment variables: +# WORKSPACE is a non-empty path (required) +# CMAKE_INSTALL_PREFIX is a non-empty path (required) +# BUILD_DIR is a path (optional; has usable default) +# CMAKE_OPTS has options for cmake (optional, empty default) +# MAKE_OPTS has options for make (optional, empty default) + +echo "---> cmake-package.sh" + +build_dir="${BUILD_DIR:-$WORKSPACE/build}" +cmake_opts="${CMAKE_OPTS:-}" +make_opts="${MAKE_OPTS:-}" +echo "build_dir: $build_dir" +echo "cmake_opts: $cmake_opts" +echo "make_opts: $make_opts" + +# be careful and verbose +set -eux -o pipefail + +mkdir -p "$build_dir" +cd "$build_dir" || exit +cmake -version +# $cmake_opts needs to wordsplit to pass options. +# shellcheck disable=SC2086 +eval cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" $cmake_opts .. +make -version +# $make_opts needs to wordsplit to pass options. +# shellcheck disable=SC2086 +make $make_opts + +echo "---> cmake-package.sh ends" diff --git a/packer/common-packer b/packer/common-packer index da5d5cf9..6d13061d 160000 --- a/packer/common-packer +++ b/packer/common-packer @@ -1 +1 @@ -Subproject commit da5d5cf92fafcdc0f31a76d2955e8ac9c327c100 +Subproject commit 6d13061d653ffe84de00a904c6b49f4caaee2e30