-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[ci] Generate Jenkinsfile from a template #10740
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
Conversation
This is needed for #10740 Co-authored-by: driazati <driazati@users.noreply.github.com>
comaniac
left a comment
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.
Redirected to here from #9823. Overall LGTM but currently I could only see one value (i.e., images) in the template. It would be good to list all templatable values (like the goal of this PR or this and follow-up PRs).
This uses `jinja2` to generate the Jenkinsfile. This is useful since it lets us both keep common functionality easy to define (i.e. iterate over all images and do something) while keeping the output easy to debug (you can look at the `Jenkinsfile` directly instead of trying to imagine what the Groovy interpreter will do). This will become more useful as we start to make CI more configurable, such as adding dynamic test sharding. This mostly introduces the infrastructure and makes some token changes to demonstrate the generation process, but already its use is shown since the parameters was missing an entry for the `ci_hexagon` image.
|
The templated values come from code (https://github.com/apache/tvm/pull/10740/files#diff-670a379669fd3f1cde13bc32dbb2e1ea020fa2ceac1f1c43f4ecf4b6589bfa14R30) the This PR doesn't make too many actual changes so we can land it quickly to avoid having to rebase too much |
areusch
left a comment
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.
ok, let's work to merge the new images quickly
This is needed for apache#10740 Co-authored-by: driazati <driazati@users.noreply.github.com>
* [ci] Generate Jenkinsfile from a template This uses `jinja2` to generate the Jenkinsfile. This is useful since it lets us both keep common functionality easy to define (i.e. iterate over all images and do something) while keeping the output easy to debug (you can look at the `Jenkinsfile` directly instead of trying to imagine what the Groovy interpreter will do). This will become more useful as we start to make CI more configurable, such as adding dynamic test sharding. This mostly introduces the infrastructure and makes some token changes to demonstrate the generation process, but already its use is shown since the parameters was missing an entry for the `ci_hexagon` image. * Address comments, fix CI with temporary workaround Co-authored-by: driazati <driazati@users.noreply.github.com>
This uses
jinja2to generate the Jenkinsfile. This is useful since it lets us both keep common functionality easy to define (i.e. iterate over all images and do something) while keeping the output easy to debug (you can look at theJenkinsfiledirectly instead of trying to imagine what the Groovy interpreter will do). This will become more useful as we start to make CI more configurable, such as adding dynamic test sharding.This mostly introduces the infrastructure and makes some token changes to demonstrate the generation process, but already its use is shown since the parameters was missing an entry for the
ci_hexagonimage. This PR intentionally leaves more usage of the templates/variables to follow up PRs in order to keep this PR simple.cc @areusch