Skip to content
Snippets Groups Projects
Commit e96aea6d authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

Merge branch 'publish-u20-image' into 'develop'

chore(ci): switching to U20 for published images

See merge request !30
parents b88c6054 b0e4ba8f
No related branches found
No related tags found
1 merge request!30chore(ci): switching to U20 for published images
Pipeline #37202 passed
# RELEASE NOTES: #
## v1.5.1 -- May 2023 ##
* Add HTTP/2 support
* Code Refactoring for:
* Logging mechanism (runtime log level selection)
* Installation / build scripts
* Continuous Integration scripts
* Published image on Docker-Hub is using now Ubuntu-20 as base image
* We will soon obsolete the build system for Ubuntu18.04
## v1.5.0 -- January 2023 ##
* Initial release
......
......@@ -15,6 +15,19 @@ Please refer to the steps described on our website: [How to contribute to OAI](h
* The Continuous Integration will reject your pull request.
- All pull requests SHALL have **`develop`** branch as target branch.
## Synchronizing GIT sub-modules ##
We are using nested GIT submodules. To synchronize them, the 2 most important commands to know are :
1. `git submodule deinit --force .`
2. `git submodule update --init --recursive`
If you have non-tracked files or modified files within git submodules, these commands may not work.
Use the `--verbose` option to see the execution of each command.
If the synchronization fails, you may need to go into the path of the failing git-submodule(s) and clean the workspace from non-tracked/modified files.
## Coding Styles ##
We are using `clang-format` as formatting tool on the C/C++ code.
......
......@@ -186,6 +186,8 @@ check_install_pcf_deps() {
install_nghttp2_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
# latest usage of yaml-cpp suggests that we should be using 0.7+ version
# To be sure, let's install from source all the time for the moment
if [[ $OS_DISTRO == "ubuntu" ]]; then
case "$(get_distribution_release)" in
"ubuntu18.04")
......@@ -193,14 +195,22 @@ check_install_pcf_deps() {
ret=$?;[[ $ret -ne 0 ]] && return $ret
;;
"ubuntu20.04")
$SUDO $INSTALLER install $OPTION libyaml-cpp0.6 libyaml-cpp-dev
# definitely, 0.6.2 as PPA installed is not enough
install_libyaml_cpp_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
;;
"ubuntu22.04")
$SUDO $INSTALLER install $OPTION libyaml-cpp0.7 libyaml-cpp-dev
# not sure about 0.7.0
#$SUDO $INSTALLER install $OPTION libyaml-cpp0.7 libyaml-cpp-dev
install_libyaml_cpp_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
;;
esac
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
$SUDO $INSTALLER install $OPTION yaml-cpp yaml-cpp-devel
# definitely, 0.6.2 as PPA installed is not enough
# $SUDO $INSTALLER install $OPTION yaml-cpp yaml-cpp-devel
install_libyaml_cpp_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
fi
$SUDO ldconfig
......
......@@ -213,7 +213,7 @@ pipeline {
script {
sh "sudo podman image prune --force"
sh "rm -Rf ./etc-pki-entitlement ./rhsm-conf ./rhsm-ca"
stash includes: 'archives/pcf_podman_image_build.log', name: 'podmanBuildLog'
stash allowEmpty: true, includes: 'archives/pcf_podman_image_build.log', name: 'podmanBuildLog'
}
}
}
......@@ -248,7 +248,7 @@ pipeline {
}
cleanup {
script {
stash includes: 'archives/cppcheck*.*', name: 'cppcheckLogs'
stash allowEmpty: true, includes: 'archives/cppcheck*.*', name: 'cppcheckLogs'
// no need to keep the cppcheck container
sh 'docker rm -f pcf-ci-cppcheck || true'
sh 'docker rmi pcf-cppcheck:test || true'
......@@ -285,7 +285,7 @@ pipeline {
post {
cleanup {
script {
stash includes: 'src/oai_rules_result*.txt', name: 'formatCheckLogs'
stash allowEmpty: true, includes: 'src/oai_rules_result*.txt, archives/clang_format_install.log', name: 'formatCheckLogs'
sh 'docker rm -f pcf-ci-clang-format || true'
sh 'docker rmi pcf-clang-format-check:test || true'
}
......
Subproject commit 99747a00750c678b24b72a2c377ae65086910077
Subproject commit b9ca1e67d3e4b4fee5075d90e98015698ab1f0a1
......@@ -58,7 +58,7 @@ class HtmlReport():
with open(os.path.join(cwd, REPORT_NAME), 'w') as wfile:
wfile.write(generate_header(args))
wfile.write(generate_git_info(args))
wfile.write(build_summary(args, 'pcf', '18', '8'))
wfile.write(build_summary(args, 'pcf', '20', '8'))
wfile.write(coding_formatting_log_check(args))
wfile.write(analyze_sca_log_check())
wfile.write(generate_footer())
......
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
---
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: "oai-pcf"
namespace: oaicicd-core
spec:
runPolicy: "Serial"
source:
type: "Binary"
secrets:
- secret:
name: etc-pki-entitlement
destinationDir: etc-pki-entitlement
configMaps:
- configMap:
name: rhsm-conf
destinationDir: rhsm-conf
- configMap:
name: rhsm-ca
destinationDir: rhsm-ca
strategy:
dockerStrategy:
dockerfilePath: "docker/Dockerfile.pcf.rhel8"
output:
to:
kind: "ImageStreamTag"
name: "oai-pcf:develop"
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: oai-pcf
namespace: oaicicd-core
spec:
lookupPolicy:
local: true
status:
tag: develop
......@@ -127,9 +127,7 @@ COPY --from=oai-pcf-builder \
/usr/local/lib/libnghttp2_asio.so.1 \
/usr/local/lib64/libspdlog.so \
/usr/local/lib64/libfmt.so \
# libyaml-cpp is installed via epel-8
# and epel-8 cannot be installed on ubi-minimal
/lib64/libyaml-cpp.so.0.6 \
/usr/local/lib64/libyaml-cpp.so.0.* \
/usr/lib64/
RUN ldconfig && \
......
......@@ -31,7 +31,7 @@
#---------------------------------------------------------------------
# BASE IMAGE
#---------------------------------------------------------------------
ARG BASE_IMAGE=ubuntu:bionic
ARG BASE_IMAGE=ubuntu:focal
FROM $BASE_IMAGE as oai-pcf-base
ENV DEBIAN_FRONTEND=noninteractive
......@@ -104,10 +104,6 @@ RUN apt-get update && \
libcurl?-gnutls \
librtmp1 \
libpsl5 \
# Ubuntu 18 --> won't install anything
# Ubuntu 20 --> libyaml-cpp 0.6
# Ubuntu 22 --> libyaml-cpp 0.7
libyaml-cpp0.? \
&& rm -rf /var/lib/apt/lists/* \
/lib/x86_64-linux-gnu/libboost_system.so.1.6*.0 \
/lib/x86_64-linux-gnu/ibboost_filesystem.so.1.6*.0
......
......@@ -117,6 +117,6 @@ class IndividualSMPolicyDocumentApi {
Pistache::Http::ResponseWriter& response) = 0;
};
} // namespace oai
} // namespace oai::pcf::api
#endif /* IndividualSMPolicyDocumentApi_H_ */
......@@ -42,4 +42,4 @@ struct api_response {
std::string body;
};
}
\ No newline at end of file
} // namespace oai::pcf::api
\ No newline at end of file
......@@ -30,7 +30,6 @@
#include "individual_sm_policy_document_api_handler.h"
#include "ProblemDetails.h"
namespace oai::pcf::api {
using namespace oai::pcf::model;
......@@ -118,7 +117,7 @@ api_response individual_sm_policy_document_api_handler::get_sm_policy(
to_json(json_data, problem_details);
}
response.status_code = http_code;
response.body = json_data.dump();
response.body = json_data.dump();
response.headers.add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType(content_type));
......@@ -131,7 +130,7 @@ api_response individual_sm_policy_document_api_handler::update_sm_policy(
api_response response;
ProblemDetails problem_details;
std::string problem_description;
std::string content_type = "application/problem+json";
std::string content_type = "application/problem+json";
nlohmann::json json_data;
http_status_code_e http_code;
......@@ -177,8 +176,8 @@ api_response individual_sm_policy_document_api_handler::update_sm_policy(
response.headers.add<Pistache::Http::Header::ContentType>(
Pistache::Http::Mime::MediaType(content_type));
response.body = json_data.dump();
response.body = json_data.dump();
response.status_code = http_code;
return response;
}
}
} // namespace oai::pcf::api
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment