Skip to content

Commit c6796ec

Browse files
authored
v23.3 external release (#43)
* V23.3 external release * delete sgx files * Update setup-terraform.md
1 parent 05887f3 commit c6796ec

File tree

371 files changed

+15353
-2218
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+15353
-2218
lines changed

CMakeLists.txt

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ if (RELEASE MATCHES "^:?v?[0-9]+[.][0-9]+[.]*[0-9]*$")
4545
if ((status EQUAL 0) AND (tmp MATCHES "${release1}"))
4646
if((NOT DEFINED REGISTRY) OR (NOT REGISTRY))
4747
set(REGISTRY "${DEFAULT_REGISTRY}")
48-
elseif((NOT REGISTRY STREQUAL "${DEFAULT_REGISTRY}") AND DEFAULT_REGISTRY)
49-
message(WARNING "Issue 'cmake -DREGISTRY=${DEFAULT_REGISTRY} ..' to use the official ${RELEASE} images.")
5048
endif()
5149
endif()
52-
else ()
53-
string(REGEX REPLACE ".*\n" "" tmp "${tmp}")
54-
string(REGEX REPLACE "(v?[0-9]*[.][0-9]*)[.].*" "\\1" mtmp "${tmp}")
55-
if (tmp AND (status EQUAL 0))
50+
endif()
51+
52+
string(REGEX REPLACE ".*\n" "" tmp "${tmp}")
53+
string(REGEX REPLACE "(v?[0-9]*[.][0-9]*)[.].*" "\\1" mtmp "${tmp}")
54+
if (tmp AND (status EQUAL 0))
55+
if ((NOT RELEASE STREQUAL ":${tmp}") AND (NOT RELEASE STREQUAL "${tmp}"))
5656
message("")
5757
message("*************************************************************")
5858
message("")
@@ -62,25 +62,24 @@ else ()
6262
message("${green}INFO:${reset} Detected major release ${mtmp} and minor releases up to ${tmp}.")
6363
message("${green}INFO:${reset} Minor releases do not cover all workloads. See workload README.")
6464
endif()
65-
message("")
6665
message("${green}INFO:${reset} Switch to a major/minor release as follows:")
6766
message("${green}INFO:${reset} git checkout tags/${mtmp}")
6867
message("${green}INFO:${reset} cmake -DRELEASE=${mtmp} ..")
6968
message("")
7069
message("*************************************************************")
7170
message("")
72-
else()
73-
message("")
74-
message("****************************************************************************")
75-
message("")
76-
message("${red}WARNING:${reset} Failed to detect any official release.")
77-
message(" Switch to any release as follows:")
78-
message("")
79-
message("git checkout <VERSION>")
80-
message("cmake -DREGISTRY=${DEFAULT_REGISTRY} -DRELEASE=v<VERSION> ..")
81-
message("")
82-
message("****************************************************************************")
8371
endif()
72+
else()
73+
message("")
74+
message("****************************************************************************")
75+
message("")
76+
message("${red}WARNING:${reset} Failed to detect any official release.")
77+
message(" Switch to any release as follows:")
78+
message("")
79+
message("git checkout <VERSION>")
80+
message("cmake -DREGISTRY=${DEFAULT_REGISTRY} -DRELEASE=v<VERSION> ..")
81+
message("")
82+
message("****************************************************************************")
8483
endif()
8584

8685
if (NOT ${REGISTRY} MATCHES "/$")
@@ -95,11 +94,11 @@ if (REGISTRY STREQUAL "${DEFAULT_REGISTRY}/")
9594
endif()
9695
endif()
9796

98-
if (NOT DEFINED TIMEOUT)
97+
if ((NOT DEFINED TIMEOUT) OR (TIMEOUT STREQUAL ""))
9998
set(TIMEOUT "28800,600")
10099
endif()
101100

102-
if (NOT DEFINED RELEASE)
101+
if ((NOT DEFINED RELEASE) OR (RELEASE STREQUAL ""))
103102
set(RELEASE ":latest")
104103
elseif (NOT ${RELEASE} MATCHES "^:")
105104
set(RELEASE ":${RELEASE}")
@@ -108,7 +107,7 @@ string(TOLOWER "${RELEASE}" RELEASE)
108107

109108
if ((NOT DEFINED BENCHMARK) AND (EXISTS "${CMAKE_SOURCE_DIR}/workload/dummy"))
110109
set(BENCHMARK "dummy")
111-
message("${red}WARNING:${reset} Default to the dummy workload for quick evaluation.")
110+
message("${green}INFO:${reset} Default to the dummy workload for quick evaluation.")
112111
message(" Enable specific workload with cmake -DBENCHMARK=<name> .. or")
113112
message(" Enable all workloads with cmake -DBENCHMARK= ..")
114113
message("")
@@ -153,15 +152,34 @@ endif()
153152
if(COMMAND show_backend_settings)
154153
show_backend_settings()
155154
endif()
155+
156156
message("")
157157
if(BUILDSH_OPTIONS MATCHES "--read-only-registry")
158-
message("${red}INFO:${reset} Docker build is disabled as ${DEFAULT_REGISTRY} is readonly.")
159-
message("")
158+
message("${green}INFO:${reset} Build is disabled as ${DEFAULT_REGISTRY} is a readonly docker registry")
159+
endif()
160+
161+
if(COMMAND detect_backend_warnings)
162+
detect_backend_warnings()
163+
endif()
164+
165+
if (RELEASE MATCHES "^:v[0-9]+[.][0-9]+[.]*[0-9]*$")
166+
string(REPLACE ":" "" release1 "${RELEASE}")
167+
if((NOT REGISTRY STREQUAL "${DEFAULT_REGISTRY}") AND (NOT REGISTRY STREQUAL "${DEFAULT_REGISTRY}/") AND DEFAULT_REGISTRY)
168+
message("${red}WARNING:${reset} Issue 'cmake -DREGISTRY=${DEFAULT_REGISTRY} ..' to use official ${release1} images")
169+
endif()
170+
execute_process(COMMAND bash -c "GIT_SSH_COMMAND='ssh -o BatchMode=yes' GIT_ASKPASS=echo git show-ref -s refs/tags/${release1}" TIMEOUT 5 OUTPUT_VARIABLE tag_commit_id RESULT_VARIABLE status OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
171+
if (status EQUAL 0)
172+
execute_process(COMMAND bash -c "GIT_SSH_COMMAND='ssh -o BatchMode=yes' GIT_ASKPASS=echo git log -1 | head -n1 | cut -f2 -d' '" TIMEOUT 5 OUTPUT_VARIABLE head_commit_id RESULT_VARIABLE head_status OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
173+
if (NOT tag_commit_id STREQUAL head_commit_id)
174+
message("${red}WARNING:${reset} Issue 'git checkout tags/${release1}' to match codebase with release ${release1}")
175+
endif()
176+
endif()
160177
endif()
161178

162179
if(EXISTS "${PROJECT_SOURCE_DIR}/script/benchmark")
163180
execute_process(COMMAND bash -c "ln -s -r -f '${PROJECT_SOURCE_DIR}'/script/benchmark/*.sh ." WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
164181
endif()
165182

183+
message("")
166184
include(legalnotice OPTIONAL)
167185

doc/user-guide/executing-workload/cmake.md

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,51 @@
1-
### Customize the Build Process:
1+
# Cmake Configuration
22
#
33
# Apache v2 license
44
# Copyright (C) 2023 Intel Corporation
55
# SPDX-License-Identifier: Apache-2.0
66
#
77

8-
You can use the following build options to customize the build process:
8+
This will help to generate native build tool that uses platform independent configuration
9+
files to generate native build tool files. You can execute inside `build` directory.
910

10-
- **PLATFORM**: Specify the platform names. See [`platforms`][platforms] for the list of platforms.
11-
- **REGISTRY**: Specify the privacy docker registry URL. If specified, all built images will be pushed to given docker registry.
12-
> `REGISTRY` must end with forward slash `/`
13-
- **REGISTRY_AUTH**: Specify the registry authentication method. The only supported value is `docker`, which uses the docker configuration file.
14-
- **RELEASE**: Specify the release version. All built images will be tagged with it. Defaults to `:latest`
15-
> `RELEASE` must begin with colon `:`
16-
- **BACKEND**: Specify the validation backend: [`docker`][docker], [`kubernetes`][kubernetes], or [`terraform`][terraform].
17-
- **TERRAFORM_OPTIONS**: Specify the `terraform` options.
18-
- **TERRAFORM_SUT**: Specify the target SUT (System Under Test) list.
19-
- **TIMEOUT**: Specify the validation timeout, which contains the execution timeout and docker pull timeout. Default to 28800,300 seconds.
20-
- **BENCHMARK**: Specify a workload pattern. Workloads not matching the pattern will be disabled.
21-
- **SPOT_INSTANCE**: If specified, overwrite the `spot_instance` variable in the Cloud configuration files.
22-
23-
### Build examples:
11+
## Build examples
2412

25-
```bash
13+
```shell
2614
cd build
2715
cmake -DREGISTRY=xxyyzz.com:1234 ..
2816
```
2917

30-
### Command Make Targets
18+
## Customize the Build Process
19+
20+
You can use the following build options to customize the build process:
21+
22+
- **PLATFORM**: Specify the platform names. See [`platforms`][platforms] for the list of platforms.
23+
- **REGISTRY**: Must end with forward slash (`/`). Specify the privacy docker registry URL. If specified, all built images will be pushed to given docker registry.
24+
- **REGISTRY_AUTH**: Specify the registry authentication method. The only supported value is `docker`, which uses the docker configuration file.
25+
- **RELEASE**: Must begin with colon (`:`). Specify the release version. All built images will be tagged with it. Defaults to `:latest`
26+
- **BACKEND**: Specify the validation backend: [`docker`][docker], [`kubernetes`][kubernetes], or [`terraform`][terraform].
27+
- **TERRAFORM_OPTIONS**: Specify the `terraform` options.
28+
- **TERRAFORM_SUT**: Specify the target System Under Test (SUT) list.
29+
- **TIMEOUT**: Specify the validation timeout, which contains the execution timeout and docker pull timeout. Default to 28800,300 seconds.
30+
- **BENCHMARK**: Specify a workload pattern. Workloads not matching the pattern will be disabled.
31+
- **SPOT_INSTANCE**: If specified, overwrite the `spot_instance` variable in the Cloud configuration files.
32+
33+
```shell
34+
cmake -DPLATFORM=xyz -DREGISTRY=xxyyzz.com:1234 -DBACKEND=xxyzz ..
35+
```
36+
37+
## Command Make Targets
3138

32-
- **bom**: Print out the BOM list of each workload.
33-
- **clean**: Purge the `logs`.
39+
- **bom**: Print out the BOM list of each workload.
40+
- **clean**: Purge the `logs`.
3441

35-
```bash
42+
```shell
3643
cd build
3744
cmake ..
3845
make bom
3946
```
4047

41-
### See Also
48+
## See Also
4249

4350
- [Docker Engine][Docker Engine]
4451
- [Kubernetes Cluster][Kubernetes Cluster]

0 commit comments

Comments
 (0)