-
Notifications
You must be signed in to change notification settings - Fork 30
Run Crypto abi-check in TF-PSA-Crypto PRs #241
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
base: main
Are you sure you want to change the base?
Changes from all commits
67cb2b3
1d08642
24c454d
cd02e62
b739688
d3d4a4f
bfa3990
f271e51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,14 @@ | |
| * This script takes the following parameters: | ||
| * | ||
| * Repos and branches | ||
| * - TARGET_REPO | ||
gilles-peskine-arm marked this conversation as resolved.
Show resolved
Hide resolved
gilles-peskine-arm marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that this is new and currently only available in the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need to push a change to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| * Tells the parametrized job to behave like a PR targeting the specified repo. | ||
| * At the moment, it affects one thing in release jobs: | ||
| * - TF-PSA-Crypto all.sh components are skipped if set to 'mbedtls' | ||
| * Possible values: | ||
| * - mbedtls | ||
| * - TF-PSA-Crypto | ||
| * - mbedtls-framework | ||
| * - MBED_TLS_REPO | ||
| * - MBED_TLS_BRANCH | ||
| * - FRAMEWORK_REPO | ||
|
|
@@ -35,7 +43,6 @@ | |
| * - RUN_BASIC_BUILD_TEST | ||
| * - RUN_FREEBSD | ||
| * - RUN_WINDOWS_TEST | ||
| * - RUN_TF_PSA_CRYPTO_ALL_SH | ||
| * | ||
| * Other parameters | ||
| * - PUSH_COVERITY | ||
|
|
@@ -49,4 +56,5 @@ | |
|
|
||
| /* main job */ | ||
| library identifier: 'mbedtls-test@master', retriever: legacySCM(scm) | ||
| mbedtls.run_release_job(env.MBED_TLS_BRANCH, env.RUN_TF_PSA_CRYPTO_ALL_SH == 'true' ? env.TF_PSA_CRYPTO_BRANCH : '') | ||
| String target_repo = env.TARGET_REPO ?: 'mbedtls' | ||
| mbedtls.run_release_job(target_repo, env.MBED_TLS_BRANCH, target_repo == 'mbedtls' ? '' : env.TF_PSA_CRYPTO_BRANCH) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ void run_tls_tests(Collection<BranchInfo> infos) { | |
| infos.each { info -> | ||
| jobs << gen_jobs.gen_release_jobs(info, false) | ||
|
|
||
| if (env.RUN_ABI_CHECK == "true" && info.repo == 'tls') { | ||
| if (env.RUN_ABI_CHECK == 'true' && info.repo == env.TARGET_REPO) { | ||
| jobs << gen_jobs.gen_abi_api_checking_job(info, 'ubuntu-18.04-amd64') | ||
| } | ||
| } | ||
|
|
@@ -153,29 +153,29 @@ void run_pr_job(String target_repo, boolean is_production, Collection<String> tl | |
| /* main job */ | ||
| void run_job() { | ||
| // CHANGE_BRANCH is not set in "branch" jobs, eg. in the merge queue | ||
| run_pr_job('tls', true, env.CHANGE_BRANCH ?: env.BRANCH_NAME, '') | ||
| run_pr_job('mbedtls', true, env.CHANGE_BRANCH ?: env.BRANCH_NAME, '') | ||
| } | ||
|
|
||
| void run_framework_pr_job() { | ||
| environ.parse_scm_repo() | ||
| run_pr_job( | ||
| 'framework', true, | ||
| 'mbedtls-framework', true, | ||
| env.IS_RESTRICTED ? ['development-restricted', 'mbedtls-3.6-restricted'] : ['development', 'mbedtls-3.6'], | ||
| env.IS_RESTRICTED ? ['development-restricted'] : ['development'] | ||
| ) | ||
| } | ||
|
|
||
| void run_release_job(String tls_branches, String tf_psa_crypto_branches) { | ||
| void run_release_job(String target_repo, String tls_branches, String tf_psa_crypto_branches) { | ||
| def (tls_split, tf_psa_crypto_split) = | ||
| [tls_branches, tf_psa_crypto_branches].collect({branches -> branches.split(',').findAll()}) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a blocker but would it make sense to filter out whitespace?
|
||
| run_release_job(tls_split, tf_psa_crypto_split) | ||
| run_release_job(target_repo, tls_split, tf_psa_crypto_split) | ||
| } | ||
|
|
||
| void run_release_job(Collection<String> tls_branches, Collection<String> tf_psa_crypto_branches) { | ||
| void run_release_job(String target_repo, Collection<String> tls_branches, Collection<String> tf_psa_crypto_branches) { | ||
| analysis.main_record_timestamps('run_release_job') { | ||
| List<BranchInfo> infos = [] | ||
| try { | ||
| environ.set_tls_release_environment() | ||
| environ.set_tls_release_environment(target_repo) | ||
| common.init_docker_images() | ||
|
|
||
| stage('branch-info') { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| void run_pr_job() { | ||
| environ.parse_scm_repo() | ||
| mbedtls.run_pr_job('tf-psa-crypto', true, env.IS_RESTRICTED ? 'development-restricted' : 'development', env.CHANGE_BRANCH ?: env.BRANCH_NAME) | ||
| mbedtls.run_pr_job('TF-PSA-Crypto', true, env.IS_RESTRICTED ? 'development-restricted' : 'development', env.CHANGE_BRANCH ?: env.BRANCH_NAME) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking it up in https://review.trustedfirmware.org/plugins/gitiles/ci/mbedtls/mbed-tls-job-configs/+/refs/heads/openci-migration/mbed-tls-restricted-pr-test-parametrized.yaml the possible values of
TARGET_REPOaretls,tf-psa-cryptoandframework. Can we make them consistently the actual repo names, or consistently short versions? Eithermbedtls, TF-PSA-Crypto, mbedtls-frameworkortls, crypto, framework.And how do restricted repos fit into this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to move us to using
enums(perhaps in a separate PR), but unfortunately-is not valid in groovy identifiers.Just to orient myself towards the eventual goal - would you prefer the style
RepoType.cryptoorRepoType.TF_PSA_CRYPTO?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not something we'll have to type on a daily basis, so I'd prefer to just use the repository name.
I don't really mind if it's a string. We don't really need the whole Groovy code to know about all the possible repositories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would advise against enums at this stage with groovy. I agree with Gilles to keep in String format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST_BRANCHspecifies the "type" of the repo, ie. the value of which variable we use out ofMBED_TLS_REPO,TF_PSA_CRYPTO_REPOandFRAMEWORK_REPO.I've detailed the exact effects it has at the moment in the Jenkinsfiles.