Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cwinter ext attest #7

Open
wants to merge 548 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
548 commits
Select commit Hold shift + click to select a range
1d405b5
Use actual oeedger8r binary instead of symlink
andyleejordan Oct 3, 2019
753807a
Add dune and esy dependencies to CMake
andyleejordan Oct 4, 2019
e129746
Be explicit in the files copied to the build tree
andyleejordan Oct 9, 2019
528fac4
Add ocamlformat esy/dune support
andyleejordan Oct 4, 2019
4deac89
Use esy/dune generated .merlin files
andyleejordan Oct 4, 2019
ef08e69
Run ocamlformat 0.11 on edger8r
andyleejordan Oct 4, 2019
bf8e25f
Commit esy.lock to lock dependencies
andyleejordan Oct 4, 2019
1394c42
Install esy with Ansible (instead of OCaml etc.)
andyleejordan Sep 30, 2019
3cfaeff
Update Windows prereqs script to install esy via npm
andyleejordan Oct 4, 2019
21a06fe
Remove ocamlformat
andyleejordan Nov 1, 2019
f3ab363
Add Ansible playbook for installing esy
andyleejordan Nov 5, 2019
3a66d48
Install esy in CI containers on-the-fly
andyleejordan Oct 11, 2019
564c504
Move host verification tests into a container
andyleejordan Nov 5, 2019
6f3a316
Update documentation for new build systems
andyleejordan Nov 5, 2019
c0b2e21
Bump oeedger8r version number
andyleejordan Nov 5, 2019
bf21d8c
Merge #2221
oeciteam Nov 5, 2019
1b025f0
Bump ansible from 2.8.0 to 2.8.2 in /scripts/ansible
dependabot[bot] Nov 5, 2019
402c833
Merge #2292
oeciteam Nov 6, 2019
885aabe
Update project to use DCO instead of CLA
Nov 7, 2019
e3d9d5f
Merge #2295
oeciteam Nov 8, 2019
02428b8
Update copyright headers to include all Open Enclave SDK contributors
Nov 6, 2019
5f7f007
Update CHANGELOG.md with DCO and copyright changes
Nov 8, 2019
71edd2c
Merge #2260
oeciteam Nov 8, 2019
3ec32ae
Add ocamlformat 0.12
andyleejordan Nov 7, 2019
d1ea477
Run `esy dune build @fmt --auto-promote` with new ocamlformat
andyleejordan Nov 7, 2019
930c129
Make `esy` run `ocamlformat` as part of the build
andyleejordan Nov 7, 2019
1b50381
Merge #2296
oeciteam Nov 9, 2019
e55b91a
Publish location of CGC minutes
andyleejordan Nov 11, 2019
da6384f
Proposal: Enforcing full EDL serialization
mikbras Sep 13, 2019
73da3d6
Extend specification for updates to edger8r warning system
andyleejordan Nov 11, 2019
ed4bed3
Add malloc_usable_size
thomasten Nov 12, 2019
c3b469a
Update Commiters.md email address for johnkord.
johnkord Nov 12, 2019
317d490
Merge #2300
oeciteam Nov 12, 2019
19f2d46
Update dependency graph
andyleejordan Nov 12, 2019
5fa89aa
Merge #2304
oeciteam Nov 12, 2019
7945b44
Replace `List.exists` with `List.find_opt`
andyleejordan Nov 12, 2019
dc4dcc4
Bump OCaml to 4.08
andyleejordan Nov 12, 2019
0f7d978
Fix `filter_map` helper now that `Seq.filter_map` is available
andyleejordan Nov 12, 2019
c7298ec
Merge #2306
oeciteam Nov 12, 2019
cb8b53a
Initial design document draft.
jazzybluesea Nov 5, 2019
9659de0
Review comments.
jazzybluesea Nov 12, 2019
2167919
Changing oe_tcb_level_status_t to a bitfield.
jazzybluesea Nov 12, 2019
025a3b0
Add Parallel in try catch finally. Added call to oe.emailJobStatus be…
Nov 13, 2019
7496e80
Removed new line. Added copyright.
Nov 13, 2019
6c2be06
Added documentation for attestation plugin.
gupta-ak Oct 9, 2019
3d8e81f
Remove esy on-the-fly installation from CI containers
oprinmarius Nov 13, 2019
d83bfcc
Added try catch finally and use of oe.emailJobStatus for statrted and…
Nov 13, 2019
08059a1
Fix whitespace & newline issues per PR comments
Nov 13, 2019
c96cff4
Fixed extra newline per comment on PR.
Nov 13, 2019
0de5a75
Fix code formatting in Windows Getting Started doc
jhand2 Nov 13, 2019
b6d930b
Initial round of changes to update references (scripts and documentat…
Nov 13, 2019
e4d42d7
Updated reference to SGX DCAP PSW in PowerShell script.
Nov 13, 2019
aebd477
Updated motivation section.
jazzybluesea Nov 13, 2019
229809b
Removed trailing whitespace on hash.
Nov 13, 2019
2c068e6
Merge #2293
oeciteam Nov 13, 2019
42543c9
Merge #2312
oeciteam Nov 13, 2019
12e330a
Merge #2310
oeciteam Nov 14, 2019
46b573c
Merge #2309
oeciteam Nov 14, 2019
b02516d
Merge #2305
oeciteam Nov 14, 2019
83cd7f8
Merge #2262
oeciteam Nov 14, 2019
3dbeed1
Merge #2253
oeciteam Nov 14, 2019
0240401
Adopt Contributors Covenant v1.4 Code of Conduct
Nov 14, 2019
b0cd032
Make sure the latest versions of dependencies is present
achamayou Nov 15, 2019
3c3d5ef
Merge #2316
oeciteam Nov 15, 2019
b7e1944
add a design doc for switchless
jxyang Nov 8, 2019
3df0b89
Merge #2297
oeciteam Nov 15, 2019
f1a6f00
Added attestation plugin runtime implementation.
gupta-ak Nov 4, 2019
0488253
Added tests for plugin implementation.
gupta-ak Nov 6, 2019
9de3dd4
Optimization/Security: Reduce TCB via gc-sections.
anakrish Nov 18, 2019
31a06d1
Fix clang-format version parser
jhand2 Nov 18, 2019
565f37c
Merge #2324
oeciteam Nov 19, 2019
d2202e3
Added support for new endorsement structure and SGX plug-in internal …
jazzybluesea Oct 17, 2019
0016d68
Added SGX plugin implementation.
gupta-ak Nov 8, 2019
b82dfce
Added test for SGX plugin.
gupta-ak Nov 8, 2019
0ac95d7
Fix CI breaks.
gupta-ak Nov 13, 2019
363945f
Added memcpy bounds fix to endorsements.
yentsanglee Nov 16, 2019
8623fdc
Skip attestation plugin test in CI.
gupta-ak Nov 16, 2019
502d200
Optimized verify_evidence path and addressed feedback.
gupta-ak Nov 19, 2019
a2298b9
Added test for local attestation.
gupta-ak Nov 19, 2019
e6d4372
Merge #2321
oeciteam Nov 19, 2019
0e04467
Merge #2298
oeciteam Nov 19, 2019
52b8fb2
Plumb pointer type through `oe_gen_set_pointers`
andyleejordan Nov 13, 2019
add5ab8
Add `deepcopy_in` test
andyleejordan Nov 13, 2019
25b8b3c
Merge #2326
oeciteam Nov 19, 2019
857924e
Update oe_prereqs folder install path to reflect recent changes
oprinmarius Nov 19, 2019
fdd6f0d
Port tls_e2e test host from pthread to std::thread
jhand2 Nov 15, 2019
f4afb1b
Release lock when done in tls_e2e test
jhand2 Nov 18, 2019
bb72e95
Fix some code style and change return type in client/server functions
jhand2 Nov 19, 2019
e17cbf7
Fix build errors associated with missing done label
jhand2 Nov 19, 2019
c7a383e
Merge #2322
oeciteam Nov 19, 2019
97b36f3
Merge #2319
oeciteam Nov 20, 2019
9404cc3
Update Windows esy install path
oprinmarius Nov 20, 2019
b87fa2d
Merge #2327
oeciteam Nov 20, 2019
a2a3f0c
Update bors badge to point to public bors instance
andyleejordan Nov 20, 2019
bdfb66c
Change PR Status requirement from CLA bot to DCO bot
andyleejordan Nov 20, 2019
f6208da
Implement oe_enter, oe_enter_sim in C
anakrish Nov 9, 2019
5202016
Remove OE_DEBUGRT_PATH
anakrish Nov 20, 2019
d5772cc
Document ABI specified callee-saved register lists
anakrish Nov 20, 2019
e00609c
Merge #2301
oeciteam Nov 20, 2019
338255a
Update 3rdparty/mbedtls/config.h with 2.16 options
Nov 8, 2019
a9f623c
Remove fixed dependency on MBEDTLS_DEBUG_C in samples and tests
Nov 20, 2019
b97c121
Merge #2299
oeciteam Nov 21, 2019
500c902
Add master.Jenkinsfile
oprinmarius Nov 21, 2019
12c0a9d
Merge #2323
oeciteam Nov 21, 2019
46c40fb
Remove debug.h support statement from MbedtlsSupport.md
Nov 21, 2019
5805b6e
Merge #2329
oeciteam Nov 21, 2019
5ed5dfd
Merge #2176 #2334 #2337
oeciteam Nov 21, 2019
990b5a8
Adjust instructions for Windows
andyleejordan Nov 14, 2019
158bcd9
Remove workaround in dune build of Intel sources
andyleejordan Nov 21, 2019
27065dc
Merge #2338
oeciteam Nov 21, 2019
aa0b5e3
Merge #2320
oeciteam Nov 22, 2019
eee13d4
Fix broken link
dthaler Nov 23, 2019
2726e94
Merge #2341
oeciteam Nov 25, 2019
c45d2d7
Enable socket test on windows
anakrish Nov 7, 2019
81491bd
Refactor socket syscalls
jhand2 Nov 20, 2019
932b270
Fill out socket stubs on host side for Windows and unify socket error
jhand2 Nov 23, 2019
fc85204
Add more socket syscalls to windows to support mbedtls
jhand2 Nov 25, 2019
a16e372
Fix error code reporting and fix a couple places where unsafe functio…
jhand2 Nov 25, 2019
f9b95e1
Adjust CODEOWNERS based on CGC consensus.
johnkord Nov 26, 2019
caea613
Add Radhika to CGC
andyleejordan Nov 26, 2019
cae02fd
Add Jordan Hand to Committers
andyleejordan Nov 26, 2019
bd01f60
Split out Common code
andyleejordan Nov 22, 2019
563b5b7
Refactor Emitter into multiple files
andyleejordan Nov 23, 2019
3f822fd
Fix polymorphic exceptions caught by value
jhand2 Sep 5, 2019
a25a31e
Merge #2346
oeciteam Nov 26, 2019
dce501f
Build attested_tls sample for Windows
jhand2 Nov 26, 2019
77ed62b
Rename `oe_gen_t_h` to `Headers.generate_trusted` etc.
andyleejordan Nov 25, 2019
912d3f1
Clean up names in `Headers.ml`
andyleejordan Nov 25, 2019
c1c07fd
Clean up and fix names in `Sources.ml`
andyleejordan Nov 25, 2019
6cc4038
Make `get_deepcopy_members` a higher order function
andyleejordan Nov 26, 2019
7af4e3e
Rename functions in `Common.ml`
andyleejordan Nov 26, 2019
701bf76
Refine functions in `Common.ml`
andyleejordan Nov 26, 2019
6f52474
Merge #2345
oeciteam Nov 26, 2019
9943151
Update Company for johnkord.
johnkord Nov 26, 2019
4d6249f
Build attested_tls sample for Windows
jhand2 Nov 26, 2019
d512e7d
Merge #2340
oeciteam Nov 26, 2019
aeb8d39
Merge #2149
oeciteam Nov 26, 2019
388f5dc
Removed code related to deprecation of strftime
vtikoo Nov 27, 2019
8dad574
Remove libc/time.c from oelibc sources
vtikoo Nov 27, 2019
00329b5
Merge #2344
oeciteam Nov 29, 2019
7f6ede6
Fix oe_accept not returning peer addr
thomasten Nov 29, 2019
336036a
oecert dump
yentsanglee Nov 27, 2019
e6ff52c
format fix
yentsanglee Nov 27, 2019
e1c9047
includ eopenssl
yentsanglee Nov 27, 2019
3de7b31
Exclude openssl from Windows build
yentsanglee Nov 27, 2019
83b3e1a
CR feedback revision
yentsanglee Nov 28, 2019
af4656a
fixed typo
yentsanglee Nov 28, 2019
3fe04f2
Make poller epoll test debuggable
thomasten Dec 2, 2019
386dbd2
Fix race condition in epoll
thomasten Dec 2, 2019
a16b874
Ensure sample works for both enc and non_enc
jhand2 Nov 27, 2019
7144e6a
Better return message
yentsanglee Dec 2, 2019
13bdaa4
Only build tls_e2e tests of enclaves are built
jhand2 Dec 2, 2019
a945221
Fix opendir() does not return NULL on error
thomasten Dec 3, 2019
3ab92ee
Add guidance on disabling doxygen comments.
mikbras Dec 3, 2019
28672ca
Fix memory leak in attested_tls sample
jhand2 Dec 3, 2019
8728043
Don't build socket test enclave when BUILD_ENCLAVES is set to FALSE
jhand2 Dec 4, 2019
b3a65d7
Updated README.md to contain a link to API docs
radhikaj Dec 4, 2019
68d2ec8
Add @experimental annotation support to doxygen
dthaler Dec 4, 2019
311f7d8
Fix bash linter error for attested_tls sample
jhand2 Dec 4, 2019
7d54157
Move more uncommon code out of `Common.ml`
andyleejordan Dec 4, 2019
c95cc20
Add module interfaces to edger8r
andyleejordan Dec 4, 2019
9f69e29
add 1604 host verification tests
BRMcLaren Dec 4, 2019
2e5c280
Merge #2365
oeciteam Dec 4, 2019
f5dd492
Merge #2363
oeciteam Dec 4, 2019
76249a3
Merge #2357
oeciteam Dec 5, 2019
1134228
Merge #2348 #2364
oeciteam Dec 5, 2019
c89207d
Merge #2342
oeciteam Dec 5, 2019
0bc7c23
Address review comments
thomasten Dec 5, 2019
35321e7
Add parentheses to sizeof
thomasten Dec 5, 2019
c00e90a
Merge #2356
oeciteam Dec 5, 2019
8979cfd
Merge #2351
oeciteam Dec 5, 2019
585ef80
Add sleep to tls_server_enc signing to allow header to be generated in
jhand2 Dec 5, 2019
d86f842
change required reviewers from 1 to 2
BRMcLaren Dec 6, 2019
e798a7d
Merge #2366
oeciteam Dec 6, 2019
d4e27a4
Merge #2368
oeciteam Dec 6, 2019
3ac4515
Fix oegdb on Ubuntu with German locale
thomasten Dec 6, 2019
3efe80f
Merge #2371
oeciteam Dec 7, 2019
0589b8a
Fix some of the memory safety issues reported by scan-build static
jhand2 Dec 5, 2019
b7fd129
Merge #2369
oeciteam Dec 9, 2019
25b88a0
Fix Windows warnings exposed by /W1 accross the codebase
jhand2 Dec 3, 2019
8cc07f6
Provide details for default MSVC compiler flags in cmake
jhand2 Dec 10, 2019
11090df
Merge #2374
oeciteam Dec 11, 2019
de72995
Remove extra openenclave/
deeglaze Aug 30, 2019
8efed10
typo fix in documentation
BRMcLaren Dec 12, 2019
be92f0d
Add instructions for running scan-build on Linux
jhand2 Dec 12, 2019
99c60f3
Address review comments
thomasten Dec 14, 2019
9b0c727
Merge #2379
oeciteam Dec 16, 2019
c520221
Remove path resolution for source in mounting external hostfs. The en…
jhand2 Dec 16, 2019
5d4ea1d
Merge #2353
oeciteam Dec 17, 2019
b0d000b
Merge #2380
oeciteam Dec 17, 2019
033fc62
Merge #2349
oeciteam Dec 17, 2019
7d3b6e8
Modify oegdb to more relaibly find the oegdb libdir using readlink
jhand2 Dec 17, 2019
94dedf7
Add test for reading from relative filepath
jhand2 Dec 17, 2019
537d584
Fix typo for specifying Ninja generator in cmake
mingweishih Dec 18, 2019
1a8cd14
Merge #2387
oeciteam Dec 18, 2019
f45476c
Fix document typo on windows build
mingweishih Dec 23, 2019
2c08fd2
Enable test/ecall_ocall on windows
mingweishih Dec 23, 2019
526d113
Merge #2393
oeciteam Jan 3, 2020
4866e1c
Merge #2384
oeciteam Jan 3, 2020
6a689d7
Previously, oe_mount did not work for any target other than "/".
jhand2 Jan 3, 2020
528c5e9
Allow versions of clang-format other than 7, simply emit a warning
jhand2 Dec 17, 2019
d18333c
Close opened file descriptors in tests/fs2
jhand2 Jan 3, 2020
51744e5
Merge #2382
oeciteam Jan 3, 2020
2f859e3
V2 SGX collateral parsing. No verification applied.
jazzybluesea Nov 6, 2019
7d6efc8
Avoid data race with variable _capacity
jxyang Jan 6, 2020
449b83a
Merge #2308
oeciteam Jan 6, 2020
76b6db0
Merge #2143
oeciteam Jan 6, 2020
9dcaf15
Clang 9 (and potentially other compilers) may generate code which relies
jhand2 Dec 18, 2019
fc3ced6
Merge #2385
oeciteam Jan 7, 2020
554888f
oe_enter_sim manages GS and FS registers
anakrish Jan 7, 2020
e50b97b
Merge #2411
oeciteam Jan 7, 2020
df33a01
Mark oe_setjmp as returns_twice. This prevents clang from adding
jhand2 Jan 8, 2020
05a0710
Update OE SDK contact alias to [email protected]
Jan 8, 2020
a5e1217
fix error message
Jan 8, 2020
36cf132
`Use atomic store for shared variable _capacity
jxyang Jan 8, 2020
9588f1d
Merge #2395
oeciteam Jan 8, 2020
2e5349d
Add namespace to dl and crypto libraries
mingweishih Dec 19, 2019
456f3a2
The stack guard for enclave on SGX is turned on.
nonpolarity Nov 2, 2019
a4129f6
Merge #2307
oeciteam Jan 9, 2020
6d9a0d3
Merge #2413
oeciteam Jan 9, 2020
55e3acb
Fix oe_random for size > 1024
thomasten Jan 8, 2020
2d9624a
Merge #2370
oeciteam Jan 9, 2020
5201d2a
Merge #2406
oeciteam Jan 9, 2020
f5627ea
Merge #2415
oeciteam Jan 9, 2020
f6de2fb
Replace VLA with fixed length in random_tests.c
thomasten Jan 11, 2020
73bd71b
Merge #2416
oeciteam Jan 13, 2020
c255ab8
Merge #2391
oeciteam Jan 13, 2020
b40a5b7
Enable /W2 to treat W2 warnings as errors for Windows builds.
jhand2 Dec 19, 2019
347a1f2
Merge #2389
oeciteam Jan 14, 2020
b87af1e
Mark setjmp as returns_twice
jhand2 Jan 8, 2020
5ff92bd
Merge #2303
oeciteam Jan 14, 2020
a19accf
Add copyright header to setjmp.h
jhand2 Jan 14, 2020
8911dfd
Merge #2388
oeciteam Jan 14, 2020
f7e1397
Query registered attesters/verifiers
yentsanglee Jan 3, 2020
d4aa3af
Merge #2402
oeciteam Jan 18, 2020
6af0e52
Add draft of extended attestation with user data and example
Jan 23, 2020
aec1baa
Add extended remote attestation sample
Jan 24, 2020
9f62119
Rename user data to extended enclave initialization data (EEID)
Jan 24, 2020
78dbf14
Add proper datatype for extended enclave initialization data
Jan 24, 2020
199ca73
Fix enclave creation without EEID
Jan 27, 2020
fda16fe
Add EEID-enabled attestation tests
Jan 27, 2020
8b3c5e2
EEID checkpoint
Jan 30, 2020
35aa00d
EEID improvements and partial report verification.
Jan 31, 2020
38a3748
EEID: Fixes and verification of extended reports
Feb 4, 2020
d126970
EEID signature verification via openssl
Feb 5, 2020
69a01e8
Reenabled debug check
Feb 5, 2020
c20bc80
EEID: resigning with new memory size settings
Feb 5, 2020
0f08e1f
EEID: cleanup
Feb 6, 2020
3f754f5
Add EEID serialization
Feb 7, 2020
593f9ad
Fix EEID report tests
Feb 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyReturnTypeOnItsOwnLine: 300
PointerAlignment: Left
SpacesInContainerLiterals: false
SpacesInSquareBrackets: false
TabWidth: 4
...
4 changes: 2 additions & 2 deletions .jenkins/Dockerfile.deploy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Copyright (c) Open Enclave SDK contributors.
# Licensed under the MIT License.

FROM ubuntu:18.04
Expand All @@ -20,7 +20,7 @@ RUN apt-get update && \
apt-key add microsoft.asc && \
apt-get update && \
apt-get -y install apt-transport-https azure-cli unzip && \
curl https://oejenkins.blob.core.windows.net/oejenkins/oe-engine -o /usr/bin/oe-engine && \
curl https://oejenkinsciartifacts.blob.core.windows.net/oe-engine/latest/bin/oe-engine -o /usr/bin/oe-engine && \
chmod +x /usr/bin/oe-engine && \
wget https://releases.hashicorp.com/packer/1.4.2/packer_1.4.2_linux_amd64.zip && \
unzip packer_1.4.2_linux_amd64.zip -d /usr/sbin && \
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/Dockerfile.full
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Copyright (c) Open Enclave SDK contributors.
# Licensed under the MIT License.

#
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/Dockerfile.minimal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Copyright (c) Open Enclave SDK contributors.
# Licensed under the MIT License.

ARG ubuntu_version=18.04
Expand Down
127 changes: 70 additions & 57 deletions .jenkins/Jenkinsfile

Large diffs are not rendered by default.

55 changes: 38 additions & 17 deletions .jenkins/Packaging.Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// Copyright (c) Open Enclave SDK contributors.
// Licensed under the MIT License.

@Library("OpenEnclaveCommon") _
oe = new jenkins.common.Openenclave()

GLOBAL_TIMEOUT_MINUTES = 240
CTEST_TIMEOUT_SECONDS = 480
GLOBAL_ERROR = null

def packageUpload(String version, String build_type) {
def LinuxPackaging(String version, String build_type) {
stage("Ubuntu${version} SGX1FLC Package ${build_type}") {
node("ACC-${version}") {
timeout(GLOBAL_TIMEOUT_MINUTES) {
Expand All @@ -14,7 +18,8 @@ def packageUpload(String version, String build_type) {
cmake ${WORKSPACE} -DCMAKE_BUILD_TYPE=${build_type} -DCMAKE_INSTALL_PREFIX:PATH='/opt/openenclave' -DCPACK_GENERATOR=DEB
make
ctest --output-on-failure --timeout ${CTEST_TIMEOUT_SECONDS}
make package
cpack
cpack -D CPACK_DEB_COMPONENT_INSTALL=ON -DCPACK_COMPONENTS_ALL=OEHOSTVERIFY
"""
oe.Run("clang-7", task)
azureUpload(storageCredentialId: 'oe_jenkins_storage_account', filesPath: 'build/*.deb', storageType: 'blobstorage', virtualPath: "master/${BUILD_NUMBER}/ubuntu/${version}/${build_type}/SGX1FLC/", containerName: 'oejenkins')
Expand All @@ -24,28 +29,44 @@ def packageUpload(String version, String build_type) {
}
}

def WindowsUpload() {
stage('Windows Release') {
node('SGXFLC-Windows') {
def WindowsPackaging(String build_type) {
stage('Windows SGX1FLC ${build_type}') {
node('SGXFLC-Windows-DCAP') {
timeout(GLOBAL_TIMEOUT_MINUTES) {
cleanWs()
checkout scm
dir('build') {
bat """vcvars64.bat x64 && \
cmake.exe ${WORKSPACE} -G \"Visual Studio 15 2017 Win64\" && \
msbuild tools\\oeedger8r\\oeedger8r_target.vcxproj -p:Configuration=Release"""
bat """
vcvars64.bat x64 && \
cmake.exe ${WORKSPACE} -G Ninja -DCMAKE_BUILD_TYPE=${build_type} -DBUILD_ENCLAVES=ON -DHAS_QUOTE_PROVIDER=ON -DNUGET_PACKAGE_PATH=C:/oe_prereqs -DCPACK_GENERATOR=NuGet -Wdev && \
ninja.exe && \
ctest.exe -V -C RELEASE --timeout ${CTEST_TIMEOUT_SECONDS} && \
cpack && \
cpack -D CPACK_NUGET_COMPONENT_INSTALL=ON -DCPACK_COMPONENTS_ALL=OEHOSTVERIFY
"""
}
azureUpload(storageCredentialId: 'oe_jenkins_storage_account', filesPath: 'build/tools/oeedger8r/oeedger8r.exe', storageType: 'blobstorage', virtualPath: "master/${BUILD_NUMBER}/windows/", containerName: 'oejenkins')
azureUpload(storageCredentialId: 'oe_jenkins_storage_account', filesPath: 'build/tools/oeedger8r/oeedger8r.exe', storageType: 'blobstorage', virtualPath: "master/latest/windows/", containerName: 'oejenkins')
azureUpload(storageCredentialId: 'oe_jenkins_storage_account', filesPath: 'build/*.nupkg', storageType: 'blobstorage', virtualPath: "master/${BUILD_NUMBER}/windows/${build_type}/SGX1FLC/", containerName: 'oejenkins')
azureUpload(storageCredentialId: 'oe_jenkins_storage_account', filesPath: 'build/*.nupkg', storageType: 'blobstorage', virtualPath: "master/latest/windows/${build_type}/SGX1FLC/", containerName: 'oejenkins')
}
}
}
}

parallel "1604 SGX1FLC Package Debug" : { packageUpload('1604', 'Debug') },
"1604 SGX1FLC Package Release" : { packageUpload('1604', 'Release') },
"1604 SGX1FLC Package RelWithDebInfo" : { packageUpload('1604', 'RelWithDebInfo') },
"1804 SGX1FLC Package Debug" : { packageUpload('1804', 'Debug') },
"1804 SGX1FLC Package Release" : { packageUpload('1804', 'Release') },
"1804 SGX1FLC Package RelWithDebInfo" : { packageUpload('1804', 'RelWithDebInfo') },
"Windows Release" : { WindowsUpload() }
try{
oe.emailJobStatus('STARTED')
parallel "1604 SGX1FLC Package Debug" : { LinuxPackaging('1604', 'Debug') },
"1604 SGX1FLC Package Release" : { LinuxPackaging('1604', 'Release') },
"1604 SGX1FLC Package RelWithDebInfo" : { LinuxPackaging('1604', 'RelWithDebInfo') },
"1804 SGX1FLC Package Debug" : { LinuxPackaging('1804', 'Debug') },
"1804 SGX1FLC Package Release" : { LinuxPackaging('1804', 'Release') },
"1804 SGX1FLC Package RelWithDebInfo" : { LinuxPackaging('1804', 'RelWithDebInfo') },
"Windows Debug" : { WindowsPackaging('DEBUG') },
"Windows Release" : { WindowsPackaging('RELEASE') }
} catch(Exception e) {
println "Caught global pipeline exception :" + e
GLOBAL_ERROR = e
throw e
} finally {
currentBuild.result = (GLOBAL_ERROR != null) ? 'FAILURE' : "SUCCESS"
oe.emailJobStatus(currentBuild.result)
}
62 changes: 33 additions & 29 deletions .jenkins/build_vhd.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,37 @@ GLOBAL_TIMEOUT_MINUTES = 240

def buildVHD(String os_type, String version, String imageName) {
node("nonSGX") {
timeout(GLOBAL_TIMEOUT_MINUTES) {
cleanWs()
checkout scm
stage("${os_type}-${version}") {
timeout(GLOBAL_TIMEOUT_MINUTES) {
cleanWs()
checkout scm

withCredentials([azureStorage(credentialsId: 'oe_jenkins_storage_account',
storageAccountKeyVariable: 'EASTUS_STORAGE_ACCOUNT_KEY',
storageAccountNameVariable: 'EASTUS_STORAGE_ACCOUNT_NAME'),
azureStorage(credentialsId: 'oe_jenkins_storage_account_westeurope',
storageAccountKeyVariable: 'WESTEUROPE_STORAGE_ACCOUNT_KEY',
storageAccountNameVariable: 'WESTEUROPE_STORAGE_ACCOUNT_NAME')]) {
withEnv(["REGION=eastus", "DEST_VHD_NAME=${VHD_NAME_PREFIX}-${os_type}-${version}.vhd", "CONTAINER_NAME=disks"]) {
dir("${WORKSPACE}/.jenkins/provision") {
oe.azureEnvironment("""
packer build -var-file=templates/packer/${os_type}-${version}-variables.json templates/packer/packer-${os_type}.json 2>&1 | tee packer.log
export SOURCE_URI=\$(cat packer.log | grep OSDiskUri: | awk '{print \$2}')
az storage blob copy start --source-uri \$SOURCE_URI --destination-blob \$DEST_VHD_NAME --destination-container \$CONTAINER_NAME --account-key \$EASTUS_STORAGE_ACCOUNT_KEY --account-name \$EASTUS_STORAGE_ACCOUNT_NAME
az storage blob copy start --source-uri \$SOURCE_URI --destination-blob \$DEST_VHD_NAME --destination-container \$CONTAINER_NAME --account-key \$WESTEUROPE_STORAGE_ACCOUNT_KEY --account-name \$WESTEUROPE_STORAGE_ACCOUNT_NAME
blob_status=\$(az storage blob show --name \$DEST_VHD_NAME --container-name \$CONTAINER_NAME \
--account-key \$WESTEUROPE_STORAGE_ACCOUNT_KEY --account-name \$WESTEUROPE_STORAGE_ACCOUNT_NAME \
--output json | jq -r .properties.copy.status)
while [ "\${blob_status}" != "success" ]
do
echo Waiting for \$DEST_VHD_NAME to finish copying ...
sleep 10
blob_status=\$(az storage blob show --name \$DEST_VHD_NAME --container-name \$CONTAINER_NAME \
--account-key \$WESTEUROPE_STORAGE_ACCOUNT_KEY --account-name \$WESTEUROPE_STORAGE_ACCOUNT_NAME \
--output json | jq -r .properties.copy.status)
done
""", imageName)
withCredentials([azureStorage(credentialsId: 'oe_jenkins_storage_account',
storageAccountKeyVariable: 'EASTUS_STORAGE_ACCOUNT_KEY',
storageAccountNameVariable: 'EASTUS_STORAGE_ACCOUNT_NAME'),
azureStorage(credentialsId: 'oe_jenkins_storage_account_westeurope',
storageAccountKeyVariable: 'WESTEUROPE_STORAGE_ACCOUNT_KEY',
storageAccountNameVariable: 'WESTEUROPE_STORAGE_ACCOUNT_NAME')]) {
withEnv(["REGION=eastus", "DEST_VHD_NAME=${VHD_NAME_PREFIX}-${os_type}-${version}.vhd", "CONTAINER_NAME=disks"]) {
dir("${WORKSPACE}/.jenkins/provision") {
oe.azureEnvironment("""
packer build -var-file=templates/packer/${os_type}-${version}-variables.json templates/packer/packer-${os_type}.json 2>&1 | tee packer.log
export SOURCE_URI=\$(cat packer.log | grep OSDiskUri: | awk '{print \$2}')
az storage blob copy start --source-uri \$SOURCE_URI --destination-blob \$DEST_VHD_NAME --destination-container \$CONTAINER_NAME --account-key \$EASTUS_STORAGE_ACCOUNT_KEY --account-name \$EASTUS_STORAGE_ACCOUNT_NAME
az storage blob copy start --source-uri \$SOURCE_URI --destination-blob \$DEST_VHD_NAME --destination-container \$CONTAINER_NAME --account-key \$WESTEUROPE_STORAGE_ACCOUNT_KEY --account-name \$WESTEUROPE_STORAGE_ACCOUNT_NAME
blob_status=\$(az storage blob show --name \$DEST_VHD_NAME --container-name \$CONTAINER_NAME \
--account-key \$WESTEUROPE_STORAGE_ACCOUNT_KEY --account-name \$WESTEUROPE_STORAGE_ACCOUNT_NAME \
--output json | jq -r .properties.copy.status)
while [ "\${blob_status}" != "success" ]
do
echo Waiting for \$DEST_VHD_NAME to finish copying ...
sleep 10
blob_status=\$(az storage blob show --name \$DEST_VHD_NAME --container-name \$CONTAINER_NAME \
--account-key \$WESTEUROPE_STORAGE_ACCOUNT_KEY --account-name \$WESTEUROPE_STORAGE_ACCOUNT_NAME \
--output json | jq -r .properties.copy.status)
done
""", imageName)
}
}
}
}
Expand All @@ -42,4 +44,6 @@ def buildVHD(String os_type, String version, String imageName) {
}

parallel "Build Ubuntu 16.04" : { buildVHD("ubuntu", "16.04", OE_DEPLOY_IMAGE) },
"Build Ubuntu 18.04" : { buildVHD("ubuntu", "18.04", OE_DEPLOY_IMAGE) }
"Build Ubuntu 18.04" : { buildVHD("ubuntu", "18.04", OE_DEPLOY_IMAGE) },
"Build Windows 2016" : { buildVHD("win", "2016", OE_DEPLOY_IMAGE) },
"Build Windows 2016 DCAP" : { buildVHD("win", "dcap", OE_DEPLOY_IMAGE) }
62 changes: 54 additions & 8 deletions .jenkins/custom_label.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,30 @@ def ACCContainerTest(String label, String version) {
ninja -v
ctest --output-on-failure --timeout ${CTEST_TIMEOUT_SECONDS}
"""
oe.ContainerRun("oetools-full-${version}", "clang-7", task, "--cap-add=SYS_PTRACE --device /dev/sgx:/dev/sgx")
oe.ContainerRun("oetools-full-${version}:${DOCKER_TAG}", "clang-7", task, "--cap-add=SYS_PTRACE --device /dev/sgx:/dev/sgx")
}
}
}
}

def win2016CrossCompile(String build_type, String use_libsgx = 'OFF') {
stage("Windows ${build_type} with SGX ${use_libsgx}") {
node(WINDOWS_2016_CUSTOM_LABEL) {
def win2016CrossCompile(String build_type, String has_quote_provider = 'OFF') {
def node_label = WINDOWS_2016_CUSTOM_LABEL
if (has_quote_provider == "ON") {
node_label = WINDOWS_DCAP_CUSTOM_LABEL
}
stage("Windows ${build_type} with SGX ${has_quote_provider}") {
node(node_label) {
timeout(GLOBAL_TIMEOUT_MINUTES) {
cleanWs()
checkout scm
dir("build/X64-${build_type}") {

/* We need to copy nuget into the expected location
https://github.com/microsoft/openenclave/blob/a982b46cf440def8fb66e94f2622a4f81e2b350b/host/CMakeLists.txt#L188-L197 */
powershell 'Copy-Item -Recurse C:\\openenclave\\prereqs\\nuget ${env:WORKSPACE}\\prereqs'
https://github.com/openenclave/openenclave/blob/a982b46cf440def8fb66e94f2622a4f81e2b350b/host/CMakeLists.txt#L188-L197 */

bat """
vcvars64.bat x64 && \
cmake.exe ${WORKSPACE} -G Ninja -DCMAKE_BUILD_TYPE=${build_type} -DBUILD_ENCLAVES=ON -DUSE_LIBSGX=${use_libsgx} -Wdev && \
cmake.exe ${WORKSPACE} -G Ninja -DCMAKE_BUILD_TYPE=${build_type} -DBUILD_ENCLAVES=ON -DHAS_QUOTE_PROVIDER=${has_quote_provider} -DNUGET_PACKAGE_PATH=C:/oe_prereqs -Wdev && \
ninja.exe && \
ctest.exe -V -C ${build_type} --timeout ${CTEST_TIMEOUT_SECONDS}
"""
Expand All @@ -62,14 +65,57 @@ def win2016CrossCompile(String build_type, String use_libsgx = 'OFF') {
}
}

def win2016LinuxElfBuild(String version, String compiler, String build_type) {
def ubuntu_label = UBUNTU_1604_CUSTOM_LABEL
if ( version == "18.04" ) {
ubuntu_label = UBUNTU_1804_CUSTOM_LABEL
}
stage("Ubuntu ${version} SGX1 ${compiler} ${build_type}}") {
node(ubuntu_label) {
timeout(GLOBAL_TIMEOUT_MINUTES) {
cleanWs()
checkout scm
def task = """
cmake ${WORKSPACE} -G Ninja -DCMAKE_BUILD_TYPE=${build_type} -DHAS_QUOTE_PROVIDER=ON -Wdev
ninja -v
"""
oe.ContainerRun("oetools-full-${version}:${DOCKER_TAG}", compiler, task, "--cap-add=SYS_PTRACE")
stash includes: 'build/tests/**', name: "linux-${compiler}-${build_type}-${version}-${BUILD_NUMBER}"
}
}
}
stage("Windows ${build_type}") {
node(WINDOWS_DCAP_CUSTOM_LABEL) {
timeout(GLOBAL_TIMEOUT_MINUTES) {
cleanWs()
checkout scm
unstash "linux-${compiler}-${build_type}-${version}-${BUILD_NUMBER}"
bat 'move build linuxbin'
dir('build') {
bat """
vcvars64.bat x64 && \
cmake.exe ${WORKSPACE} -G Ninja -DADD_WINDOWS_ENCLAVE_TESTS=ON -DBUILD_ENCLAVES=OFF -DHAS_QUOTE_PROVIDER=ON -DCMAKE_BUILD_TYPE=${build_type} -DLINUX_BIN_DIR=${WORKSPACE}\\linuxbin\\tests -DNUGET_PACKAGE_PATH=C:/oe_prereqs -Wdev && \
ninja -v && \
ctest.exe -V -C ${build_type} --timeout ${CTEST_TIMEOUT_SECONDS}
"""
}
}
}
}
}

properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '90',
artifactNumToKeepStr: '180',
daysToKeepStr: '90',
numToKeepStr: '180')),
[$class: 'JobRestrictionProperty']])

parallel "ACC1604 clang-7 RelWithDebInfo" : { ACCTest(UBUNTU_1604_CUSTOM_LABEL, 'clang-7', 'RelWithDebInfo') },
parallel "Win2016 Release Cross Compile with DCAP libs" : { win2016CrossCompile('Release', 'ON') },
"Win2016 Debug Cross Compile" : { win2016CrossCompile('Debug') },
"Win2016 Ubuntu1604 clang-7 Debug Linux-Elf-build" : { win2016LinuxElfBuild('16.04', 'clang-7', 'Debug') },
"Win2016 Ubuntu1804 clang-7 Release Linux-Elf-build" : { win2016LinuxElfBuild('18.04', 'clang-7', 'Release') },
"Win2016 Ubuntu1804 gcc Debug Linux-Elf-build" : { win2016LinuxElfBuild('18.04', 'gcc', 'Debug') },
"ACC1604 clang-7 RelWithDebInfo" : { ACCTest(UBUNTU_1604_CUSTOM_LABEL, 'clang-7', 'RelWithDebInfo') },
"ACC1604 gcc RelWithDebInfo" : { ACCTest(UBUNTU_1604_CUSTOM_LABEL, 'gcc', 'RelWithDebInfo') },
"ACC1604 Container RelWithDebInfo" : { ACCContainerTest(UBUNTU_1604_CUSTOM_LABEL, '16.04') },
"ACC1804 clang-7 RelWithDebInfo" : { ACCTest(UBUNTU_1804_CUSTOM_LABEL, 'clang-7', 'RelWithDebInfo') },
Expand Down
3 changes: 3 additions & 0 deletions .jenkins/deploy_agent.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def generateVariablesFile() {
echo ansible_ssh_private_key_file: inventory/id-rsa-oe-test
} > ${var_file} """
}
if (DCAP_TESTING_NODE == "true") {
sh "echo dcap_testing_node: true >> ${var_file}"
}
}

def registerJenkinsSlave() {
Expand Down
Loading