Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdmike authored Sep 15, 2021
2 parents d6db3c3 + e06d4cb commit 6c7443e
Show file tree
Hide file tree
Showing 19 changed files with 288 additions and 184 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Create Build Dir
run: mkdir build
- name: Clone
run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git
run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
- name: Build VCPKG
run: cd vcpkg && bootstrap-vcpkg.bat
shell: cmd
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Create Build Dir
run: mkdir build
- name: Clone
run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git
run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
- name: Build VCPKG
run: cd vcpkg && ./bootstrap-vcpkg.sh
shell: bash
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Changelog Generator

on:
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: docker run -v $PWD:/workdir quay.io/git-chglog/git-chglog --next-tag vNext --output CHANGELOG-new.md vNext..
- name: GitHub Upload Release Artifacts
uses: actions/upload-artifact@v2
with:
name: CHANGELOG-new.md
path: |
./CHANGELOG-new.md
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Create Build Dir
run: mkdir build
- name: Clone
run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git
run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
- name: Build VCPKG
run: cd vcpkg && bootstrap-vcpkg.bat
shell: cmd
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Create Build Dir
run: mkdir build
- name: Clone
run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git
run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
- name: Build VCPKG
run: cd vcpkg && ./bootstrap-vcpkg.sh
shell: bash
Expand Down
6 changes: 4 additions & 2 deletions Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ sudo apt install git cmake build-essential curl zip unzip tar pkg-config
Open a Terminal window.

```
git clone -b 2020.11-1 https://github.com/microsoft/vcpkg.git
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
./bootstrap-vcpkg.sh
./vcpkg install cpprestsdk[websockets]
```
Expand Down Expand Up @@ -68,8 +69,9 @@ Steps below are for Windows 10 and Visual Studio 2019 Professional.
Open an x64 Native Tools Command Prompt for Visual Studio 2019.

```
git clone -b 2020.11-1 https://github.com/microsoft/vcpkg.git
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
bootstrap-vcpkg.bat
vcpkg install cpprestsdk[websockets]:x64-windows-static
```
Expand Down
18 changes: 15 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

### Ci
- update scanning
- remove Jenkins chron
- **changelog:** add automation for changelog generation

### Docs
- **readme:** wording
Expand All @@ -25,9 +23,23 @@

### Fix
- klockwork reported success / failure check fix
- update examples text and version
- **spelling:** lan inteface -> lan interface in amtinfo

<a name="v1.2.2"></a>
## [v1.2.2] - 2021-06-22
### Ci
- remove Jenkins chron
- **changelog:** add automation for changelog generation

### Fix
- update examples text and version

<a name="v1.2.1"></a>
## [v1.2.1] - 2021-05-06

### Fix
**docker:** add missing ca-certs

<a name="v1.2.0"></a>
## v1.2.0

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.1)

project (rpc VERSION 1.2.0)
project (rpc VERSION 2.0.0)

set (CMAKE_CXX_STANDARD 11)

Expand Down
3 changes: 2 additions & 1 deletion CentOS7.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ export PATH=/home/user/Downloads/git:$PATH
Using a Terminal window with the PATH and devtoolset enabled per the Dependencies.

```
git clone -b 2020.11-1 https://github.com/microsoft/vcpkg.git
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
./bootstrap-vcpkg.sh
./vcpkg install cpprestsdk[websockets]
```
Expand Down
3 changes: 2 additions & 1 deletion CentOS8.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ sudo yum install cmake
Using a Terminal window with the PATH and devtoolset enabled per the Dependencies.

```
git clone -b 2020.11-1 https://github.com/microsoft/vcpkg.git
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
./bootstrap-vcpkg.sh
./vcpkg install cpprestsdk[websockets]
```
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN \
RUN git clone https://github.com/open-amt-cloud-toolkit/rpc.git
WORKDIR /rpc
RUN mkdir -p build
RUN git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git
RUN git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
RUN cd vcpkg && ./bootstrap-vcpkg.sh
RUN ./vcpkg/vcpkg install cpprestsdk[websockets]

Expand Down
192 changes: 87 additions & 105 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,62 +1,33 @@
pipeline {
agent none
triggers {cron '@daily'}
agent {
label 'docker-amt'
}
options {
buildDiscarder(logRotator(numToKeepStr: '5', daysToKeepStr: '30'))
timestamps()
timeout(unit: 'HOURS', time: 2)
}


stages {
stage ('Parallel') {
parallel {
stage ('Linux') {
agent { label 'docker-amt' }
stages {
stage ('Cloning Repository') {
steps {
script {
scmCheckout {
clean = true
}
}
}
}
}
}
stage ('Windows') {
agent { label 'openamt-win' }
stages {
stage ('Cloning Repository') {
steps {
script {
scmCheckout {
clean = true
}
}
}
}
stage ('Cloning Repository') {
steps {
script {
scmCheckout {
clean = true
}
}
}
}
stage ('Static Code Scan - Protex') {
agent { label 'docker-amt' }
stage('Static Code Scan - Protex') {
environment{
PROJECT_NAME = 'OpenAMT - RPC'
SCANNERS = 'protex'
}
steps {
script {
staticCodeScan {
// generic
scanners = ['protex']
scannerType = ['c','c++']

protexProjectName = 'OpenAMT - RPC'
// internal, do not change
protexBuildName = 'rrs-generic-protex-build'
}
}
rbheStaticCodeScan()
}
}

stage ('Parallel Builds') {
parallel {
stage ('Linux') {
Expand All @@ -72,14 +43,14 @@ pipeline {
steps {
sh './scripts/jenkins-pre-build.sh'
sh './scripts/jenkins-build.sh'
stash includes: 'build/rpc', name: 'linux-rpc-app'
}
}
stage ('Archive') {
steps {
archiveArtifacts allowEmptyArchive: true, artifacts: 'build/rpc', caseSensitive: false, onlyIfSuccessful: true
}
}

}
}
stage ('Windows') {
Expand All @@ -90,7 +61,7 @@ pipeline {
bat 'scripts\\jenkins-pre-build.cmd'
bat 'scripts\\jenkins-build.cmd'
// prepare stash for the binary scan
stash includes: "**/*.exe", name: 'rpc-app'
stash includes: '**/*.exe', name: 'win-rpc-app'
}
}
stage ('Archive') {
Expand All @@ -102,71 +73,82 @@ pipeline {
}
}
}
stage ('Parallel Scans') {
parallel {
stage ('Static Code Scan Linux') {
agent { label 'docker-amt' }
steps {
script {
staticCodeScan {
// generic
scanners = ['bdba','klocwork']
scannerType = 'c++'

protecodeGroup = '25'
protecodeScanName = 'rpc-zip'
protecodeDirectory = './build/rpc'

klockworkPreBuildScript = './scripts/jenkins-pre-build.sh'
klockworkBuildCommand = './scripts/jenkins-build.sh'
klockworkProjectName = 'Panther Point Creek'
klockworkIgnoreCompileErrors = true
}
}
}
stage('Prep Binary') {
steps {
sh 'mkdir -p ./bin'
dir('./bin') {
unstash 'linux-rpc-app'
unstash 'win-rpc-app'
}
stage ('Static Code Scan Windows') {
stages {
stage ('Static Code Scan Windows - Klockwork') {
agent { label 'openamt-win' }
steps {
script {
staticCodeScan {
// generic
scanners = ['klocwork']
scannerType = 'c++'

klockworkPreBuildScript = 'scripts\\jenkins-pre-build.cmd'
klockworkBuildCommand = 'scripts\\jenkins-build.cmd'
klockworkProjectName = 'Panther Point Creek'
klockworkIgnoreCompileErrors = true
}
}
}
}
stage ('Static Code Scan Windows - BDBA') {
agent { label 'docker-amt' }
steps {
script {
sh "mkdir -p bdbaScanDir"
dir("bdbaScanDir") {
unstash 'rpc-app'
}
staticCodeScan {
// generic
scanners = ['bdba']
scannerType = 'c++'

protecodeGroup = '25'
protecodeScanName = 'rpc-zip'
protecodeDirectory = 'bdbaScanDir'
}
}
}
}
}
stage('Linux Scans') {
environment{
PROJECT_NAME = 'OpenAMT - RPC - Linux'
SCANNERS = 'bdba,klocwork'

// protecode details
PROTECODE_BIN_DIR = './bin'
PROTECODE_INCLUDE_SUB_DIRS = true

// klocwork details
KLOCWORK_SCAN_TYPE = 'c++'
KLOCWORK_PRE_BUILD_SCRIPT = './scripts/jenkins-pre-build.sh'
KLOCWORK_BUILD_COMMAND = './scripts/jenkins-build.sh'
KLOCWORK_IGNORE_COMPILE_ERRORS = true

// publishArtifacts details
PUBLISH_TO_ARTIFACTORY = true
}
steps {
rbheStaticCodeScan()
dir('artifacts/Klockwork'){
sh 'cp kw_report.html kw_report_linux.html'
sh 'cp kw_report.csv kw_report_linux.csv'
archiveArtifacts allowEmptyArchive: true, artifacts: 'kw_report_linux.html'
archiveArtifacts allowEmptyArchive: true, artifacts: 'kw_report_linux.csv'
}

}
}
stage('Windows Scans'){
agent { label 'openamt-win' }
stages{
stage ('Windows Scans - klocwork') {
environment {
PROJECT_NAME = 'OpenAMT - RPC - Windows'
SCANNERS = 'klocwork'

// klocwork details
KLOCWORK_SCAN_TYPE = 'c++'
KLOCWORK_PRE_BUILD_SCRIPT = 'scripts\\jenkins-pre-build.cmd'
KLOCWORK_BUILD_COMMAND = 'scripts\\jenkins-build.cmd'
KLOCWORK_IGNORE_COMPILE_ERRORS = true

// publishArtifacts details
PUBLISH_TO_ARTIFACTORY = true
}
steps {
rbheStaticCodeScan()
dir('artifacts\\Klockwork'){
bat 'copy kw_report.html kw_report_windows.html'
bat 'copy kw_report.csv kw_report_windows.csv'
stash includes: 'kw_report_windows.*', name: 'win-kwreports'
archiveArtifacts allowEmptyArchive: true, artifacts: 'kw_report_windows.html'
archiveArtifacts allowEmptyArchive: true, artifacts: 'kw_report_windows.csv'
}
}
}
}
}
stage('Publish Artifacts'){
steps{
dir('artifacts/Klockwork'){
unstash 'win-kwreports'
}
publishArtifacts()
}
}
}
}
Loading

0 comments on commit 6c7443e

Please sign in to comment.