-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split release pipeline and add signing (#5954)
- Loading branch information
Showing
5 changed files
with
234 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
trigger: | ||
batch: true | ||
branches: | ||
include: | ||
- main | ||
- "refs/tags/ccf-*" | ||
|
||
pr: | ||
autoCancel: true | ||
branches: | ||
include: | ||
- main | ||
- "release/*" | ||
paths: | ||
include: | ||
- "*" | ||
|
||
schedules: | ||
- cron: "0 3 * * Mon-Fri" | ||
displayName: Daily morning build | ||
branches: | ||
include: | ||
- main | ||
- "release/*" | ||
exclude: | ||
- "release/[0-2].x" | ||
always: true | ||
|
||
resources: | ||
containers: | ||
- container: virtual | ||
image: ccfmsrc.azurecr.io/ccf/ci:07-12-2023-virtual-clang15 | ||
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro | ||
|
||
- container: snp | ||
image: ccfmsrc.azurecr.io/ccf/ci:07-12-2023-snp-clang15 | ||
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro | ||
|
||
- container: sgx | ||
image: ccfmsrc.azurecr.io/ccf/ci:07-12-2023-sgx | ||
options: --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --device /dev/sgx_enclave:/dev/sgx_enclave --device /dev/sgx_provision:/dev/sgx_provision -v /dev/sgx:/dev/sgx -v /lib/modules:/lib/modules:ro | ||
|
||
variables: | ||
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/ccf-') }}: | ||
perf_or_release: release | ||
perf_tests: no_run | ||
${{ if not(startsWith(variables['Build.SourceBranch'], 'refs/tags/ccf-')) }}: | ||
perf_or_release: perf | ||
perf_tests: run | ||
|
||
jobs: | ||
- template: .azure-pipelines-templates/configure.yml | ||
|
||
- template: .azure-pipelines-templates/release-matrix.yml | ||
parameters: | ||
perf_or_release: ${{ variables['perf_or_release'] }} | ||
perf_tests: ${{ variables['perf_tests'] }} | ||
|
||
- job: CredScan | ||
variables: | ||
Codeql.SkipTaskAutoInjection: true | ||
skipComponentGovernanceDetection: true | ||
pool: | ||
vmImage: "ubuntu-20.04" | ||
steps: | ||
# Scan for credentials in the repo | ||
- task: CredScan@3 | ||
inputs: | ||
suppressionsFile: .gdn/CredScanSuppressions.json | ||
# To suppress folders, rather than individual files, we require both of the following options | ||
debugMode: true | ||
folderSuppression: true | ||
|
||
# Break the build if any credentials (or other Guardian scans) find issues | ||
- task: PostAnalysis@2 | ||
inputs: | ||
GdnBreakAllTools: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
parameters: | ||
target: ["Virtual", "SGX"] | ||
|
||
env: | ||
Hosted: | ||
container: virtual | ||
pool: | ||
vmImage: ubuntu-20.04 | ||
Virtual: | ||
container: virtual | ||
pool: ado-virtual-release | ||
SGX: | ||
container: sgx | ||
pool: ado-sgx-release | ||
SNPCC: | ||
container: snp | ||
pool: ado-virtual-release | ||
|
||
build: | ||
common: | ||
cmake_args: "" | ||
cmake_env: "" | ||
ninja_targets: "default" | ||
Virtual: | ||
cmake_args: "-DCOMPILE_TARGET=virtual" | ||
cmake_env: "CC=`which clang-15` CXX=`which clang++-15`" | ||
ninja_targets: "default" | ||
SGX: | ||
cmake_args: "-DCOMPILE_TARGET=sgx" | ||
cmake_env: "" | ||
ninja_targets: "default" | ||
SNPCC: | ||
cmake_args: "-DCOMPILE_TARGET=snp -DLVI_MITIGATIONS=OFF -DLONG_TESTS=OFF" | ||
cmake_env: "CC=`which clang-15` CXX=`which clang++-15`" | ||
ninja_targets: "default" | ||
release: | ||
cmake_args: "-DCLIENT_PROTOCOLS_TEST=ON -DLONG_TESTS=ON" | ||
cmake_env: "" | ||
ninja_targets: "default" | ||
unsafe: | ||
cmake_args: "-DLVI_MITIGATIONS=OFF -DVERBOSE_LOGGING=ON -DUNSAFE_VERSION=ON" | ||
cmake_env: "" | ||
ninja_targets: "default" | ||
|
||
test: | ||
Virtual: | ||
ctest_args: '-LE "benchmark|perf|protocolstest|vegeta|suite"' | ||
SGX: | ||
ctest_args: '-LE "benchmark|perf|protocolstest|vegeta|suite"' | ||
perf: | ||
ctest_args: '-L "benchmark|perf|vegeta"' | ||
release: | ||
ctest_args: '-LE "benchmark|perf"' | ||
|
||
jobs: | ||
- template: checks.yml | ||
parameters: | ||
env: ${{ parameters.env.Hosted }} | ||
|
||
- template: common.yml | ||
parameters: | ||
target: SGX | ||
env: ${{ parameters.env.SGX }} | ||
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.release.cmake_args }} ${{ parameters.build.SGX.cmake_args }}" | ||
suffix: "Release" | ||
artifact_name: "SGX_Release" | ||
ctest_filter: "${{ parameters.test.release.ctest_args }}" | ||
depends_on: configure | ||
installExtendedTestingTools: true | ||
|
||
- template: common.yml | ||
parameters: | ||
target: SNPCC | ||
env: ${{ parameters.env.SNPCC }} | ||
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.release.cmake_args }} ${{ parameters.build.SNPCC.cmake_args }}" | ||
cmake_env: "${{ parameters.build.SNPCC.cmake_env }}" | ||
suffix: "Release" | ||
artifact_name: "SNPCC_Release" | ||
ctest_filter: "${{ parameters.test.release.ctest_args }}" | ||
depends_on: configure | ||
installExtendedTestingTools: true | ||
|
||
- template: common.yml | ||
parameters: | ||
target: Virtual | ||
env: ${{ parameters.env.Virtual }} | ||
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.release.cmake_args }} ${{ parameters.build.Virtual.cmake_args }}" | ||
cmake_env: "${{ parameters.build.Virtual.cmake_env }}" | ||
suffix: "Release" | ||
artifact_name: "Virtual_Release" | ||
ctest_filter: "${{ parameters.test.release.ctest_args }}" | ||
depends_on: configure | ||
installExtendedTestingTools: true | ||
|
||
# Build that produces unsafe binaries for troubleshooting purposes | ||
- template: common.yml | ||
parameters: | ||
target: SGX | ||
env: ${{ parameters.env.SGX }} | ||
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.unsafe.cmake_args }} ${{ parameters.build.SGX.cmake_args }}" | ||
suffix: "Unsafe" | ||
artifact_name: "SGX_Unsafe" | ||
ctest_filter: "${{ parameters.test.release.ctest_args }}" | ||
depends_on: configure | ||
installExtendedTestingTools: false | ||
|
||
- template: release.yml | ||
parameters: | ||
env: ${{ parameters.env.Hosted }} | ||
depends_on: | ||
- Checks | ||
- SGX_Release | ||
- Virtual_Release | ||
- SNPCC_Release | ||
- SGX_Unsafe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters