Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
face378
Updated the solidity contract file path in config file
Ram-srini Aug 6, 2019
0354d59
Change __tools__ Directory to tools
danintel Aug 6, 2019
34ab4ae
Merge pull request #13 from danintel/tools
manojgop Aug 7, 2019
aaf8236
Merge pull request #9 from Ram-srini/update_path
manojgop Aug 7, 2019
d9e35e2
Added remove method to remove entry from lmdb table
Ram-srini Aug 6, 2019
926fd29
Merge pull request #12 from Ram-srini/lmdb_del_fun
manojgop Aug 7, 2019
913f641
1. Added license information to files missing it
Jucchan Aug 7, 2019
9b3f8ea
Rename __tools__ directory to tools
manojgop Aug 8, 2019
1a8c79c
Merge pull request #17 from manojgop/rename_tools
manojgop Aug 8, 2019
40a5be8
Refactor enclave, manager and utilities
Aug 4, 2019
b4d2931
Merge pull request #10 from manju956/refactor
manojgop Aug 8, 2019
0bdd8c9
Use workload_id param to identify type of workorder requests
Aug 7, 2019
09cca65
Utility to create error response is added
Aug 6, 2019
fadb9d1
Fix typo errors in tcf_connector modules
Ram-srini Aug 6, 2019
870726c
Merge pull request #8 from Ram-srini/fix_typo_errors
manojgop Aug 9, 2019
5949be1
Merge pull request #11 from manju956/listener_refactor
manojgop Aug 9, 2019
d3b127a
Merge pull request #15 from manju956/workload_id_changes
manojgop Aug 9, 2019
e8bc59b
Merge branch 'master' into license
Jucchan Aug 9, 2019
1834d96
1. Added echo result test client
Jucchan Aug 6, 2019
e7ad045
Fix Demo script for single input request
Aug 12, 2019
cd71576
Merge pull request #14 from Jucchan/echo
manojgop Aug 12, 2019
ba54532
Merge pull request #16 from Jucchan/license
manojgop Aug 12, 2019
fead0d3
Merge pull request #18 from manju956/refactor
manojgop Aug 12, 2019
81fc8dd
Restructure TCF directories
manojgop Aug 14, 2019
acd8376
Initial commit for lmdb remote access:
Jucchan Aug 8, 2019
d4d2593
1. Updated copyrights to 2019
Jucchan Aug 16, 2019
cc1fd1e
1. Updated comments
Jucchan Aug 16, 2019
730475b
Fixed comments in generic.py
Jucchan Aug 17, 2019
4041e93
Modified lmdb_request_handler to use shared_kv_interface
Jucchan Aug 17, 2019
27418d2
Merge pull request #22 from Jucchan/license_2019
manojgop Aug 19, 2019
c1c6b8e
bugfix: encryption test case
m3ngyang Aug 19, 2019
41ab2d8
1. Moved connectors to examples/common/python
Jucchan Aug 8, 2019
a771fa2
Merge pull request #21 from Jucchan/lmdb_remote
manojgop Aug 20, 2019
6db41e8
Merge pull request #26 from Jucchan/connectors_fix
manojgop Aug 20, 2019
1e85d01
Make dataHash parameter and worker encryption key as empty value
Aug 16, 2019
7d3394b
Fix worker registry crash
Aug 20, 2019
4a4076b
Merge pull request #24 from manju956/clear_datahash
manojgop Aug 21, 2019
1094766
Merge pull request #27 from m3ngyang/bugfix
manojgop Aug 21, 2019
1d11a40
Merge pull request #28 from manju956/fix_worker_registry
manojgop Aug 21, 2019
6fba55a
Enable CI/CD
Aug 12, 2019
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
4 changes: 2 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Follow the instructions below to execute a Docker-based build and execution.
3. Open a Docker container shell using following command
`sudo docker exec -it tcf bash`
4. Activate a virtual environment in the Docker shell using following command
from the Docker working directory, `$TCF_HOME/__tools__/build`,
from the Docker working directory, `$TCF_HOME/tools/build`,
which is set in the `docker-compose.yaml` file:
```
source _dev/bin/activate
Expand Down Expand Up @@ -75,7 +75,7 @@ export TCF_HOME=`pwd`

Change to the quickstart build directory:
```
cd $TCF_HOME/__tools__/build
cd $TCF_HOME/tools/build
```

Check that these variables are set before building the code:
Expand Down
99 changes: 99 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#!groovy

// Copyright 2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
//
// 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.
// ------------------------------------------------------------------------------

pipeline {
agent {
node {
label 'master'
customWorkspace "workspace/${env.BUILD_TAG}"
}
}

options {
timestamps()
buildDiscarder(logRotator(daysToKeepStr: '31'))
}

stages {
stage('Check for Signed-Off Commits') {
steps {
sh '''#!/bin/bash -l
if [ -v CHANGE_URL ] ;
then
temp_url="$(echo $CHANGE_URL |sed s#github.com/#api.github.com/repos/#)/commits"
pull_url="$(echo $temp_url |sed s#pull#pulls#)"

IFS=$'\n'
for m in $(curl -s "$pull_url" | grep "message") ; do
if echo "$m" | grep -qi signed-off-by:
then
continue
else
echo "FAIL: Missing Signed-Off Field"
echo "$m"
exit 1
fi
done
unset IFS;
fi
'''
}
}

stage('Build TCF') {
steps {
sh 'docker-compose -f ci/docker-compose-build.yaml up'
sh 'docker-compose -f ci/docker-compose-build.yaml down'
}
}

stage('Run TCF Tests') {
steps {
sh 'docker-compose -f ci/docker-compose-tests.yaml up'
sh 'docker-compose -f ci/docker-compose-tests.yaml down'
}
}

stage('Create git archive') {
steps {
sh '''
REPO=$(git remote show -n origin | grep Fetch | awk -F'[/.]' '{print $6}')
git archive HEAD --format=zip -9 --output=$REPO.zip
git archive HEAD --format=tgz -9 --output=$REPO.tgz
'''
}
}

}

post {
always {
sh 'docker-compose -f ci/docker-compose-build.yaml down'
sh 'docker-compose -f ci/docker-compose-tests.yaml down'
}
success {
archiveArtifacts '*.tgz, *.zip'
}
aborted {
error "Aborted, exiting now"
}
failure {
error "Failed, exiting now"
}
}
}

36 changes: 36 additions & 0 deletions ci/docker-compose-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.

version: '3.5'

services:
tcf:
container_name: tcf
image: tcf-ci-build

build:
context: .
dockerfile: ../docker/Dockerfile.tcf-dev
args:
- http_proxy
- https_proxy
- no_proxy
volumes:
- ../:/project/TrustedComputeFramework
working_dir: "/project/TrustedComputeFramework/tools/build"
entrypoint: "bash -c \"\
if [ ${MAKECLEAN:-1} != 0 ]; then echo \\\"Clean build\\\" && make clean; fi \
&& make \
&& echo \\\"BUILD SUCCESS\\\" \""
stop_signal: SIGKILL
36 changes: 36 additions & 0 deletions ci/docker-compose-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.

version: '3.5'

services:
tcf:
container_name: tcf
image: tcf-ci-build
build:
context: .
args:
- http_proxy
- https_proxy
- no_proxy
volumes:
- ../:/project/TrustedComputeFramework
working_dir: "/project/TrustedComputeFramework/tools/build"
entrypoint: "bash -c \"\
source _dev/bin/activate \
&& cd ../../scripts \
&& source tcs_startup.sh -y \
&& sleep 5 \
&& source ../tools/run_tests.sh \""
stop_signal: SIGKILL
81 changes: 0 additions & 81 deletions common/service_client/generic.py

This file was deleted.

41 changes: 0 additions & 41 deletions common/setup.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Intel Corporation
# Copyright 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -22,10 +22,11 @@ INCLUDE(CMakeVariables.txt)
FILE(GLOB PROJECT_HEADERS *.h)
FILE(GLOB PROJECT_SOURCES *.cpp)

SET(GENERIC_PRIVATE_INCLUDE_DIRS "." "${TCF_TOP_DIR}/tcs/core/common" "${TCF_TOP_DIR}/tcs/core/common/work_order_interface" "${TCF_TOP_DIR}/tcs/core/common/crypto" )
SET(GENERIC_PRIVATE_INCLUDE_DIRS "." "${TCF_TOP_DIR}/tc/sgx/common"
"${TCF_TOP_DIR}/tc/sgx/common/work_order_interface" "${TCF_TOP_DIR}/examples/apps")
SET(GENERIC_CXX_FLAGS ${DEBUG_FLAGS} "-Wall" "-fPIC" "-Wno-write-strings" "-std=c++11")

SET(WORKLOAD_STATIC_NAME workloads)
SET(WORKLOAD_STATIC_NAME sgx_workload)
PROJECT(${WORKLOAD_STATIC_NAME} CXX)

ADD_LIBRARY(${WORKLOAD_STATIC_NAME} STATIC ${PROJECT_HEADERS} ${PROJECT_SOURCES})
Expand All @@ -35,8 +36,6 @@ TARGET_INCLUDE_DIRECTORIES(${WORKLOAD_STATIC_NAME} PRIVATE "..")
TARGET_INCLUDE_DIRECTORIES(${WORKLOAD_STATIC_NAME} PUBLIC ${GENERIC_PUBLIC_INCLUDE_DIRS})
TARGET_INCLUDE_DIRECTORIES(${WORKLOAD_STATIC_NAME} PUBLIC "${SGX_SDK}/include/tlibc")
TARGET_INCLUDE_DIRECTORIES(${WORKLOAD_STATIC_NAME} PUBLIC "${SGX_SDK}/include/libcxx")
TARGET_INCLUDE_DIRECTORIES(${WORKLOAD_STATIC_NAME} PUBLIC "${SGX_SSL}/include")
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PRIVATE ${TCF_TOP_DIR}/tcs/core/common/packages/parson)

TARGET_COMPILE_OPTIONS(${WORKLOAD_STATIC_NAME} PRIVATE "${GENERIC_CXX_FLAGS}")
TARGET_COMPILE_OPTIONS(${WORKLOAD_STATIC_NAME} PRIVATE "-nostdinc")
Expand All @@ -46,6 +45,4 @@ TARGET_COMPILE_OPTIONS(${WORKLOAD_STATIC_NAME} PRIVATE "-fno-builtin-printf")
TARGET_COMPILE_DEFINITIONS(${WORKLOAD_STATIC_NAME} PRIVATE "-DUSE_DL=1")

################################################################################
ADD_SUBDIRECTORY(echo_work_order)
ADD_SUBDIRECTORY(heart_disease_eval)

35 changes: 35 additions & 0 deletions common/sgx_workload/CMakeVariables.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.


################################################################################
# Configure Environment
################################################################################

SET(TCF_TOP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../")

if("$ENV{DEBUG} " STREQUAL " ")
SET(DEBUG_FLAGS "-O2")
message(STATUS "Compiling with optimizations (-O2). To use debug flags, set the DEBUG environment variable.")
else()
SET(DEBUG_FLAGS "-Og" "-g" "-DDEBUG")
message(STATUS "Compiling in debug mode without optimizations (-Og -g)")
endif()

SET(SGX_SDK "$ENV{SGX_SDK}")
if("${SGX_SDK} " STREQUAL " ")
message(FATAL_ERROR "SGX_SDK environment variable not defined!")
endif()

SET(GENERIC_PUBLIC_INCLUDE_DIRS "${SGX_SDK}/include")
Loading