Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 91 additions & 63 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,18 @@
* to use the software.
*/

def runBuildStage(String buildMode, String linkMode) {
def cmd = "python3 ${env.WORKSPACE}/resources/ci_cd/linux_build.py"
cmd += " --build-mode ${buildMode}"
cmd += " --link-mode ${linkMode}"
cmd += " --build-dir ${get_build_directory(buildMode, linkMode)}"
sh(cmd)
}

def get_build_directory(String buildMode, String linkMode) {
return "build_${buildMode}_${linkMode}"
}
/**
* Hold information about the pipeline.
*/
Map pipelineInfo = [:]

pipeline {
agent none
agent {
label "${runInsideExecutor.labelFromJobName()}"
}

options {
skipDefaultCheckout()
disableConcurrentBuilds()
/*
To avoid excessive resource usage in server, we limit the number
Expand All @@ -48,70 +44,102 @@ pipeline {
}

stages {
stage('Build sequence') {
agent {
dockerfile {
filename 'resources/docker/Dockerfile.linux'
label 'docker'
stage('Configuration') {
steps {
script {
checkoutCommunityRepoBranch(
'rticonnextdds-examples',
env.BRANCH_NAME,
false,
)
pipelineInfo.dockerDir = "${env.WORKSPACE}/resources/docker/"
pipelineInfo.staticAnalysisDir = "${env.WORKSPACE}/static_analysis_report"
runInsideExecutor(
'',
pipelineInfo.dockerDir,
) {
pipelineInfo.connextArch = getEnvVar('CONNEXTDDS_ARCH')
}
}
}

environment {
RTI_INSTALLATION_PATH = "${env.WORKSPACE}"
}
stage('Download Packages') {
steps {
runInsideExecutor(
'',
pipelineInfo.dockerDir,
) {
script {
def version = readFile('VERSION').readLines()[0].trim()
pipelineInfo.connextDir = installConnext(
pipelineInfo.connextArch,
env.WORKSPACE,
version
)
}
}
}

stages {
stage('Download Packages') {
steps {
sh 'pip3 install -r resources/ci_cd/requirements.txt'

withAWSCredentials {
withCredentials([
string(credentialsId: 's3-bucket', variable: 'RTI_AWS_BUCKET'),
string(credentialsId: 's3-path', variable: 'RTI_AWS_PATH'),
]) {
sh 'python3 resources/ci_cd/linux_install.py -a $CONNEXTDDS_ARCH'
}
}
}
stage('Build all modes') {
matrix {
axes {
axis {
name 'buildMode'
values 'release', 'debug'
}
axis {
name 'linkMode'
values 'static', 'dynamic'
}
}

stage('Build all modes') {
matrix {
axes {
axis {
name 'buildMode'
values 'release', 'debug'
}
axis {
name 'linkMode'
values 'static', 'dynamic'
}
}
stages {
stage('Build single mode') {
steps {
echo("Build ${buildMode}/${linkMode}")
runBuildStage(buildMode, linkMode)
}
stages {
stage('Build single mode') {
steps {
runInsideExecutor(
'',
pipelineInfo.dockerDir,
) {
echo("Building ${buildMode}/${linkMode}")
buildExamples(
pipelineInfo.connextArch,
pipelineInfo.connextDir,
buildMode,
linkMode,
env.WORKSPACE,
)
}
}
}
}

stage('Static Analysis') {
steps {
sh "python3 resources/ci_cd/linux_static_analysis.py --build-dir ${get_build_directory('release', 'dynamic')}"
}
}
}

post {
cleanup {
cleanWs()
}
stage('Static Analysis') {
steps {
runInsideExecutor(
'',
pipelineInfo.dockerDir,
) {
runStaticAnalysis(
buildExamples.getBuildDirectory('release', 'dynamic'),
pipelineInfo.connextDir,
pipelineInfo.staticAnalysisDir,
)
}
publishHTML(target: [
allowMissing: true,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: pipelineInfo.staticAnalysisDir,
reportFiles: 'index.html',
reportName: 'LLVM Scan build static analysis',
])
}
}
}
post {
cleanup {
cleanWs()
}
}
}

9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ automatically be included in the [RTI Community Portal Examples
Section](http://community.rti.com). See [CONTRIBUTING.md](https://github.com/rticommunity/rticonnextdds-examples/blob/master/CONTRIBUTING.md)
for further information about how to contribute with new examples to this repository.

The examples contained in the
[master](https://github.com/rticommunity/rticonnextdds-examples/tree/master)
branch of this repository have been built and tested against RTI Connext DDS
7.3.0. If you need examples that have been built and tested against older
versions of RTI Connext DDS, please check out the appropriate branch:
The examples contained in this branch were built and tested against **RTI Connext DDS
7.3.1**. If you need examples that have been built and tested against previous
versions of RTI Connext DDS, please check out the corresponding release branch:

- [release/7.3.0](https://github.com/rticommunity/rticonnextdds-examples/tree/release/7.3.0)
- [release/7.2.0](https://github.com/rticommunity/rticonnextdds-examples/tree/release/7.2.0)
- [release/7.1.0](https://github.com/rticommunity/rticonnextdds-examples/tree/release/7.1.0)
- [release/7.0.0](https://github.com/rticommunity/rticonnextdds-examples/tree/release/7.0.0)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.3.0
7.3.1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Rti.ConnextDds.Extra" Version="7.3.0" />
<PackageReference Include="Rti.ConnextDds.Extra" Version="7.3.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Rti.ConnextDds.Extra" Version="7.3.0" />
<PackageReference Include="Rti.ConnextDds.Extra" Version="7.3.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Rti.ConnextDds" Version="7.3.0" />
<PackageReference Include="Rti.ConnextDds" Version="7.3.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ connextdds_configure_cmake_utils()
# Find the RTI Connext DDS libraries
if(NOT RTIConnextDDS_FOUND)
find_package(RTIConnextDDS
"7.3.0"
"7.3.1"
REQUIRED
COMPONENTS
core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Rti.ConnextDds.Extra" Version="7.3.0" />
<PackageReference Include="Rti.ConnextDds.Extra" Version="7.3.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Rti.ConnextDds.Extra" Version="7.3.0" />
<PackageReference Include="Rti.ConnextDds.Extra" Version="7.3.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Rti.ConnextDds.Extra" Version="7.3.0" />
<PackageReference Include="Rti.ConnextDds.Extra" Version="7.3.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1"/>
<PackageReference Include="System.Linq.Async" Version="5.0.0-*" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion examples/connext_dds/request_reply/cs/Primes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Rti.ConnextDds.RequestReply" Version="7.3.0"/>
<PackageReference Include="Rti.ConnextDds.RequestReply" Version="7.3.1"/>
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion examples/connext_secure/cds/c++11/USER_QOS_PROFILES.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ any incidental or consequential damages arising out of the use or inability
to use the software. -->

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.0/rti_dds_profiles.xsd">
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.1/rti_dds_profiles.xsd">
<!-- QoS Library containing the QoS profile used in the generated example.

A QoS library is a named set of QoS profiles.
Expand Down
2 changes: 1 addition & 1 deletion examples/connext_secure/cds/cds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ any incidental or consequential damages arising out of the use or inability
to use the software. -->

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.0/rti_cloud_discovery_service.xsd">
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.1/rti_cloud_discovery_service.xsd">

<cloud_discovery_service name="secure_cds">
<transport>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ any incidental or consequential damages arising out of the use or inability
to use the software. -->

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.0/rti_dds_profiles.xsd">
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.1/rti_dds_profiles.xsd">
<qos_library name="full_library">

<qos_profile name="peer1" base_name="BuiltinQosSnippetLib::Feature.Security.Enable" is_default_qos="true">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.0/dds_security_governance.xsd">
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.1/dds_security_governance.xsd">
<domain_access_rules>
<domain_rule>
<domains>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.0/dds_security_permissions.xsd">
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.1/dds_security_permissions.xsd">
<permissions>
<grant name="CrlParticipantA">
<subject_name>C = US, ST = CA, L = Santa Clara, O = Real Time Innovations, emailAddress = [email protected], CN = Crl Participant A</subject_name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ any incidental or consequential damages arising out of the use or inability
to use the software. -->

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.0/rti_dds_profiles.xsd">
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.1/rti_dds_profiles.xsd">
<qos_library name="full_library">

<qos_profile name="peer1">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.0/dds_security_governance.xsd">
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.1/dds_security_governance.xsd">
<domain_access_rules>
<domain_rule>
<domains>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.0/dds_security_permissions.xsd">
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.3.1/dds_security_permissions.xsd">
<permissions>
<grant name="LightParticipantA">
<subject_name>/C=US/ST=CA/L=Santa Clara/O=Real Time Innovations/[email protected]/CN=Lightweight Participant A</subject_name>
Expand Down
33 changes: 20 additions & 13 deletions resources/docker/Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,27 @@

FROM ubuntu:20.04

ENV CONNEXTDDS_ARCH="x64Linux4gcc7.3.0"
ARG USER_NAME=jenkins
ARG USER_UID

ENV DEBIAN_FRONTEND="noninteractive"
ENV CONNEXTDDS_ARCH="x64Linux4gcc7.3.0"

RUN apt-get update && apt-get install -y \
gcc \
g++ \
clang \
libssl-dev \
make \
cmake \
python3 \
python3-pip \
clang-tools-10 \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -u 789 -m jenkins
gcc \
g++ \
clang \
clang-tools-10 \
make \
cmake \
libssl-dev \
python3 \
python3-pip \
python3-venv \
python3-distutils \
&& rm -rf /var/lib/apt/lists/*

RUN useradd -u ${USER_UID} -m ${USER_NAME}
ENV PATH=/home/$USER_NAME/.local/bin:$PATH

ENV PATH=/usr/share/clang/scan-build-py-10/bin:${PATH}
USER $USER_NAME
Loading