X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=jjb%2Fshell%2Finstall-rpm-nng-rmr.sh;h=af7d05a04cd603c8ebfcab0a7ddd579f4523010b;hb=557b88a5631820d0b09d20d993778d802cc5005b;hp=146df4d75083d452419fb299799925b99d3ed2af;hpb=33af9fdc6a5235d89ca1a8dfb6172511a3bd676f;p=ci-management.git diff --git a/jjb/shell/install-rpm-nng-rmr.sh b/jjb/shell/install-rpm-nng-rmr.sh index 146df4d7..af7d05a0 100644 --- a/jjb/shell/install-rpm-nng-rmr.sh +++ b/jjb/shell/install-rpm-nng-rmr.sh @@ -16,7 +16,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Installs NNG from source and RMR from PackageCloud on CentOS +# Installs NNG from source and RMR from PackageCloud on CentOS7 +# Reads RMR version number from repo file rmr-version.yaml echo "---> install-rpm-nng-rmr.sh" @@ -27,17 +28,42 @@ sudo yum install -y \ cmake3 \ ninja-build +echo "INFO: cd to tox-dir $TOX_DIR" +cd "$WORKSPACE/$TOX_DIR" + +version_file=rmr-version.yaml +if [[ -f $version_file ]]; then + # pipeline is less elegant than yq but that requires venv and pip install + ver=$(grep "^version:" "$version_file" | cut -d: -f2 | xargs ) +else + echo "File $version_file not found." + exit 1 +fi +if [[ -z $ver ]]; then + echo "Failed to get RMR version string from file $version_file" + exit 1 +else + echo "RMR version string is ${ver}" +fi + +# NNG repo is not frequently tagged so it's pinned to a commit hash. +# This commit provides fix to the proxy-reconnect +# bug that we identified: https://github.com/nanomsg/nng/issues/970 echo "Clone and build NNG" -git clone --branch v1.1.1 https://github.com/nanomsg/nng.git +git clone https://github.com/nanomsg/nng.git (cd nng \ + && git checkout e618abf8f3db2a94269a79c8901a51148d48fcc2 \ && mkdir build \ && cd build \ && cmake3 -DBUILD_SHARED_LIBS=1 -G Ninja .. \ && ninja-build \ && sudo ninja-build install) -ver="1.4.0-1" -echo "Download RMR library ${ver}" -wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/el/5/rmr-${ver}.x86_64.rpm/download.rpm -echo "Install RMR library ${ver}" -sudo rpm -vi rmr-${ver}.x86_64.rpm +# RPM packager adds suffix "-1" to version +rpm="rmr-${ver}-1.x86_64.rpm" +echo "Download RMR library ${ver} as file ${rpm}" +wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/el/5/${rpm}/download.rpm +echo "Install RMR library file ${rpm}" +sudo rpm -iv ${rpm} + +echo "---> install-rpm-nng-rmr.sh ends"