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

Commit 6c7443e

Browse files
authored
Merge branch 'master' into v2
2 parents d6db3c3 + e06d4cb commit 6c7443e

19 files changed

+288
-184
lines changed

.github/workflows/build_all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Create Build Dir
2525
run: mkdir build
2626
- name: Clone
27-
run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git
27+
run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
2828
- name: Build VCPKG
2929
run: cd vcpkg && bootstrap-vcpkg.bat
3030
shell: cmd
@@ -71,7 +71,7 @@ jobs:
7171
- name: Create Build Dir
7272
run: mkdir build
7373
- name: Clone
74-
run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git
74+
run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
7575
- name: Build VCPKG
7676
run: cd vcpkg && ./bootstrap-vcpkg.sh
7777
shell: bash

.github/workflows/changelog.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Changelog Generator
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
workflow_dispatch:
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
- run: docker run -v $PWD:/workdir quay.io/git-chglog/git-chglog --next-tag vNext --output CHANGELOG-new.md vNext..
15+
- name: GitHub Upload Release Artifacts
16+
uses: actions/upload-artifact@v2
17+
with:
18+
name: CHANGELOG-new.md
19+
path: |
20+
./CHANGELOG-new.md

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Create Build Dir
2222
run: mkdir build
2323
- name: Clone
24-
run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git
24+
run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
2525
- name: Build VCPKG
2626
run: cd vcpkg && bootstrap-vcpkg.bat
2727
shell: cmd
@@ -54,7 +54,7 @@ jobs:
5454
- name: Create Build Dir
5555
run: mkdir build
5656
- name: Clone
57-
run: git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git
57+
run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
5858
- name: Build VCPKG
5959
run: cd vcpkg && ./bootstrap-vcpkg.sh
6060
shell: bash

Build.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ sudo apt install git cmake build-essential curl zip unzip tar pkg-config
2525
Open a Terminal window.
2626

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

7071
```
71-
git clone -b 2020.11-1 https://github.com/microsoft/vcpkg.git
72+
git clone https://github.com/microsoft/vcpkg.git
7273
cd vcpkg
74+
git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
7375
bootstrap-vcpkg.bat
7476
vcpkg install cpprestsdk[websockets]:x64-windows-static
7577
```

CHANGELOG.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
### Ci
99
- update scanning
10-
- remove Jenkins chron
11-
- **changelog:** add automation for changelog generation
1210

1311
### Docs
1412
- **readme:** wording
@@ -25,9 +23,23 @@
2523

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

28+
<a name="v1.2.2"></a>
29+
## [v1.2.2] - 2021-06-22
30+
### Ci
31+
- remove Jenkins chron
32+
- **changelog:** add automation for changelog generation
33+
34+
### Fix
35+
- update examples text and version
36+
37+
<a name="v1.2.1"></a>
38+
## [v1.2.1] - 2021-05-06
39+
40+
### Fix
41+
**docker:** add missing ca-certs
42+
3143
<a name="v1.2.0"></a>
3244
## v1.2.0
3345

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required (VERSION 3.1)
22

3-
project (rpc VERSION 1.2.0)
3+
project (rpc VERSION 2.0.0)
44

55
set (CMAKE_CXX_STANDARD 11)
66

CentOS7.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ export PATH=/home/user/Downloads/git:$PATH
5050
Using a Terminal window with the PATH and devtoolset enabled per the Dependencies.
5151

5252
```
53-
git clone -b 2020.11-1 https://github.com/microsoft/vcpkg.git
53+
git clone https://github.com/microsoft/vcpkg.git
5454
cd vcpkg
55+
git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
5556
./bootstrap-vcpkg.sh
5657
./vcpkg install cpprestsdk[websockets]
5758
```

CentOS8.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ sudo yum install cmake
2828
Using a Terminal window with the PATH and devtoolset enabled per the Dependencies.
2929

3030
```
31-
git clone -b 2020.11-1 https://github.com/microsoft/vcpkg.git
31+
git clone https://github.com/microsoft/vcpkg.git
3232
cd vcpkg
33+
git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
3334
./bootstrap-vcpkg.sh
3435
./vcpkg install cpprestsdk[websockets]
3536
```

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN \
1515
RUN git clone https://github.com/open-amt-cloud-toolkit/rpc.git
1616
WORKDIR /rpc
1717
RUN mkdir -p build
18-
RUN git clone --branch 2020.11-1 https://github.com/microsoft/vcpkg.git
18+
RUN git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 772d435ba18bf2f342458e0187ab7b48b84fe3f0
1919
RUN cd vcpkg && ./bootstrap-vcpkg.sh
2020
RUN ./vcpkg/vcpkg install cpprestsdk[websockets]
2121

Jenkinsfile

Lines changed: 87 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,33 @@
11
pipeline {
2-
agent none
3-
triggers {cron '@daily'}
2+
agent {
3+
label 'docker-amt'
4+
}
45
options {
56
buildDiscarder(logRotator(numToKeepStr: '5', daysToKeepStr: '30'))
67
timestamps()
78
timeout(unit: 'HOURS', time: 2)
89
}
910

11+
1012
stages {
11-
stage ('Parallel') {
12-
parallel {
13-
stage ('Linux') {
14-
agent { label 'docker-amt' }
15-
stages {
16-
stage ('Cloning Repository') {
17-
steps {
18-
script {
19-
scmCheckout {
20-
clean = true
21-
}
22-
}
23-
}
24-
}
25-
}
26-
}
27-
stage ('Windows') {
28-
agent { label 'openamt-win' }
29-
stages {
30-
stage ('Cloning Repository') {
31-
steps {
32-
script {
33-
scmCheckout {
34-
clean = true
35-
}
36-
}
37-
}
38-
}
13+
stage ('Cloning Repository') {
14+
steps {
15+
script {
16+
scmCheckout {
17+
clean = true
3918
}
4019
}
4120
}
4221
}
43-
stage ('Static Code Scan - Protex') {
44-
agent { label 'docker-amt' }
22+
stage('Static Code Scan - Protex') {
23+
environment{
24+
PROJECT_NAME = 'OpenAMT - RPC'
25+
SCANNERS = 'protex'
26+
}
4527
steps {
46-
script {
47-
staticCodeScan {
48-
// generic
49-
scanners = ['protex']
50-
scannerType = ['c','c++']
51-
52-
protexProjectName = 'OpenAMT - RPC'
53-
// internal, do not change
54-
protexBuildName = 'rrs-generic-protex-build'
55-
}
56-
}
28+
rbheStaticCodeScan()
5729
}
5830
}
59-
6031
stage ('Parallel Builds') {
6132
parallel {
6233
stage ('Linux') {
@@ -72,14 +43,14 @@ pipeline {
7243
steps {
7344
sh './scripts/jenkins-pre-build.sh'
7445
sh './scripts/jenkins-build.sh'
46+
stash includes: 'build/rpc', name: 'linux-rpc-app'
7547
}
7648
}
7749
stage ('Archive') {
7850
steps {
7951
archiveArtifacts allowEmptyArchive: true, artifacts: 'build/rpc', caseSensitive: false, onlyIfSuccessful: true
8052
}
8153
}
82-
8354
}
8455
}
8556
stage ('Windows') {
@@ -90,7 +61,7 @@ pipeline {
9061
bat 'scripts\\jenkins-pre-build.cmd'
9162
bat 'scripts\\jenkins-build.cmd'
9263
// prepare stash for the binary scan
93-
stash includes: "**/*.exe", name: 'rpc-app'
64+
stash includes: '**/*.exe', name: 'win-rpc-app'
9465
}
9566
}
9667
stage ('Archive') {
@@ -102,71 +73,82 @@ pipeline {
10273
}
10374
}
10475
}
105-
stage ('Parallel Scans') {
106-
parallel {
107-
stage ('Static Code Scan Linux') {
108-
agent { label 'docker-amt' }
109-
steps {
110-
script {
111-
staticCodeScan {
112-
// generic
113-
scanners = ['bdba','klocwork']
114-
scannerType = 'c++'
11576

116-
protecodeGroup = '25'
117-
protecodeScanName = 'rpc-zip'
118-
protecodeDirectory = './build/rpc'
119-
120-
klockworkPreBuildScript = './scripts/jenkins-pre-build.sh'
121-
klockworkBuildCommand = './scripts/jenkins-build.sh'
122-
klockworkProjectName = 'Panther Point Creek'
123-
klockworkIgnoreCompileErrors = true
124-
}
125-
}
126-
}
77+
stage('Prep Binary') {
78+
steps {
79+
sh 'mkdir -p ./bin'
80+
dir('./bin') {
81+
unstash 'linux-rpc-app'
82+
unstash 'win-rpc-app'
12783
}
128-
stage ('Static Code Scan Windows') {
129-
stages {
130-
stage ('Static Code Scan Windows - Klockwork') {
131-
agent { label 'openamt-win' }
132-
steps {
133-
script {
134-
staticCodeScan {
135-
// generic
136-
scanners = ['klocwork']
137-
scannerType = 'c++'
138-
139-
klockworkPreBuildScript = 'scripts\\jenkins-pre-build.cmd'
140-
klockworkBuildCommand = 'scripts\\jenkins-build.cmd'
141-
klockworkProjectName = 'Panther Point Creek'
142-
klockworkIgnoreCompileErrors = true
143-
}
144-
}
145-
}
146-
}
147-
stage ('Static Code Scan Windows - BDBA') {
148-
agent { label 'docker-amt' }
149-
steps {
150-
script {
151-
sh "mkdir -p bdbaScanDir"
152-
dir("bdbaScanDir") {
153-
unstash 'rpc-app'
154-
}
155-
staticCodeScan {
156-
// generic
157-
scanners = ['bdba']
158-
scannerType = 'c++'
159-
160-
protecodeGroup = '25'
161-
protecodeScanName = 'rpc-zip'
162-
protecodeDirectory = 'bdbaScanDir'
163-
}
164-
}
165-
}
84+
}
85+
}
86+
stage('Linux Scans') {
87+
environment{
88+
PROJECT_NAME = 'OpenAMT - RPC - Linux'
89+
SCANNERS = 'bdba,klocwork'
90+
91+
// protecode details
92+
PROTECODE_BIN_DIR = './bin'
93+
PROTECODE_INCLUDE_SUB_DIRS = true
94+
95+
// klocwork details
96+
KLOCWORK_SCAN_TYPE = 'c++'
97+
KLOCWORK_PRE_BUILD_SCRIPT = './scripts/jenkins-pre-build.sh'
98+
KLOCWORK_BUILD_COMMAND = './scripts/jenkins-build.sh'
99+
KLOCWORK_IGNORE_COMPILE_ERRORS = true
100+
101+
// publishArtifacts details
102+
PUBLISH_TO_ARTIFACTORY = true
103+
}
104+
steps {
105+
rbheStaticCodeScan()
106+
dir('artifacts/Klockwork'){
107+
sh 'cp kw_report.html kw_report_linux.html'
108+
sh 'cp kw_report.csv kw_report_linux.csv'
109+
archiveArtifacts allowEmptyArchive: true, artifacts: 'kw_report_linux.html'
110+
archiveArtifacts allowEmptyArchive: true, artifacts: 'kw_report_linux.csv'
111+
}
112+
113+
}
114+
}
115+
stage('Windows Scans'){
116+
agent { label 'openamt-win' }
117+
stages{
118+
stage ('Windows Scans - klocwork') {
119+
environment {
120+
PROJECT_NAME = 'OpenAMT - RPC - Windows'
121+
SCANNERS = 'klocwork'
122+
123+
// klocwork details
124+
KLOCWORK_SCAN_TYPE = 'c++'
125+
KLOCWORK_PRE_BUILD_SCRIPT = 'scripts\\jenkins-pre-build.cmd'
126+
KLOCWORK_BUILD_COMMAND = 'scripts\\jenkins-build.cmd'
127+
KLOCWORK_IGNORE_COMPILE_ERRORS = true
128+
129+
// publishArtifacts details
130+
PUBLISH_TO_ARTIFACTORY = true
131+
}
132+
steps {
133+
rbheStaticCodeScan()
134+
dir('artifacts\\Klockwork'){
135+
bat 'copy kw_report.html kw_report_windows.html'
136+
bat 'copy kw_report.csv kw_report_windows.csv'
137+
stash includes: 'kw_report_windows.*', name: 'win-kwreports'
138+
archiveArtifacts allowEmptyArchive: true, artifacts: 'kw_report_windows.html'
139+
archiveArtifacts allowEmptyArchive: true, artifacts: 'kw_report_windows.csv'
166140
}
167141
}
168142
}
169143
}
170144
}
145+
stage('Publish Artifacts'){
146+
steps{
147+
dir('artifacts/Klockwork'){
148+
unstash 'win-kwreports'
149+
}
150+
publishArtifacts()
151+
}
152+
}
171153
}
172154
}

0 commit comments

Comments
 (0)