-
Notifications
You must be signed in to change notification settings - Fork 24
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
Adapt PR and release jobs to enable testing of the Framework repo #170
Conversation
169671d
to
5c04cf3
Compare
60272b5
to
4eec09e
Compare
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.
Looks ok overall, with some minor comments.
To my understanding this change will make the ci do two checkous per branch? One for mbedtls and then the framework indipendantly?
Looking at the combinations of MBEDTLS_BRANCH
, FRAMEWORK_BRANCH
times the number of branches, that can cause a significant overhead.
Could we download a non shallow copy of MBEDTLS_REPO
and share it between jobs, by simply changing the appropriate branch?
Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
Pass the branch name along the call chain instead. This is in preparation for testing multiple branches in the same job. Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
Each branch listed in MBED_TLS_BRANCH (separated by commas) will be checked out and tested in parallel. Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
IllegalAccessError doesn't match the semantics used here. Signed-off-by: Bence Szépkúti <[email protected]>
This fixes checkouts for productions jobs that target the framework repo. Signed-off-by: Bence Szépkúti <[email protected]>
This commit also refactors failed_builds and outcome_stashes to be per-branch values by moving them inside BranchInfo. Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
a06714d
to
fbd6e4c
Compare
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.
LGTM
fbd6e4c
to
8d9b2b7
Compare
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.
LGTM
@bensze01 Are the labels needs-ci and needs-work still relevant? |
@mpg Needs work is not, needs CI is. |
Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
@minosgalanakis @mpg All the CI runs have passed successfully, please (re-)review! |
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.
LGTM
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.
Review in progress; next dc9d984
@@ -4,27 +4,27 @@ class BranchInfo { | |||
/** The name of the branch */ | |||
public String branch | |||
|
|||
/* Map from component name to chosen platform to run it, or to null | |||
* if no platform has been chosen yet. */ | |||
/** Map from component name to chosen platform to run it, or to null |
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.
Out of curiosity: are we running javadoc on this? If so, where's the output? If not how would we go about it?
@@ -45,6 +45,10 @@ void set_pr_environment(String target_repo, boolean is_production) { | |||
|
|||
def set_common_pr_production_environment() { | |||
env.CHECKOUT_METHOD = 'scm' | |||
/* The credentials here are the SSH credentials for accessing the repositories. | |||
They are defined at {JENKINS_URL}/credentials | |||
This is a temporary workaround, this should really be set in the Jenkins job configs */ |
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.
Do we have plans to remove this temporary work-around then? Is it tracked somewhere?
@@ -41,9 +41,6 @@ import net.sf.json.JSONObject | |||
import org.mbed.tls.jenkins.BranchInfo | |||
import org.mbed.tls.jenkins.JobTimestamps | |||
|
|||
// A static field has its content preserved across stages. |
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.
Sorry if this should be obvious, but I'm not seeing how the info is preserved accross stages now that it's stored as part of BranchInfo.
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 can see from the test runs that it is preserved, I just can't understand how from looking at the code.)
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.
LGTM, thanks! None of my questions are blockers, so I'm approving this.
This PR enables the testing of the framework repo, by adapting the existing jobs to allow overriding the version of the framework checked out by the CI, as well as enabling the testing of multiple branches of Mbed TLS in a single job.
The framework version is controlled by the newly defined parameters
FRAMEWORK_REPO
andFRAMEWORK_BRANCH
, whileMBEDTLS_BRANCH
has been extended to allow specifying multiple branches separated by,
.For automatic PR testing,
mbedtls.run_framework_pr_job()
is added as an entrypoint, which is called by the Jenkinsfile added by the companion PR Mbed-TLS/mbedtls-framework#33Tests: