You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/05/19 21:16:27 UTC

[GitHub] [tvm] driazati opened a new pull request, #11380: [ci] Restructure Jenkinsfile

driazati opened a new pull request, #11380:
URL: https://github.com/apache/tvm/pull/11380

   It was getting pretty long so this breaks out every stage into its own file with the relevant definitions. This should make it more clear where the globals are coming from and how jobs flow through CI.
   
   Thanks for contributing to TVM!   Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @ them in the pull request thread.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] driazati commented on a diff in pull request #11380: [ci] Restructure Jenkinsfile

Posted by GitBox <gi...@apache.org>.
driazati commented on code in PR #11380:
URL: https://github.com/apache/tvm/pull/11380#discussion_r878530550


##########
jenkins/Jenkinsfile.j2:
##########
@@ -407,503 +99,29 @@ def make(docker_type, path, make_flag) {
 {% set microtvm_template_projects = ['build/microtvm_template_projects',] %}
 s3_prefix = "tvm-jenkins-artifacts-prod/tvm/${env.BRANCH_NAME}/${env.BUILD_NUMBER}"
 
+// General note: Jenkins has limits on the size of a method (or top level code)
+// that are pretty strict, so most usage of groovy methods in these templates
+// are purely to satisfy the JVM
+{% include "jenkins/Prepare.groovy.j2" %}

Review Comment:
   this is a template file, not a generated one (`.j2` == Jinja2), it get used in the same way as the main jenkinsfile, `include` just means copy in the contents after running it through the template enginge:
   
   ```bash
   python jenkins/generate.py
   ```
   
   all the paths in the templates are relative to the repo root though due to how that script calls Jinja2:
   
   https://github.com/apache/tvm/blob/85e42b6af38ea3bd0c99c8208d7baed5086a8959/jenkins/generate.py#L89



##########
jenkins/Jenkinsfile.j2:
##########
@@ -407,503 +99,29 @@ def make(docker_type, path, make_flag) {
 {% set microtvm_template_projects = ['build/microtvm_template_projects',] %}
 s3_prefix = "tvm-jenkins-artifacts-prod/tvm/${env.BRANCH_NAME}/${env.BUILD_NUMBER}"
 
+// General note: Jenkins has limits on the size of a method (or top level code)
+// that are pretty strict, so most usage of groovy methods in these templates
+// are purely to satisfy the JVM
+{% include "jenkins/Prepare.groovy.j2" %}

Review Comment:
   this is a template file, not a generated one (`.j2` == Jinja2), it get used in the same way as the main jenkinsfile, `include` just means copy in the contents after running it through the template engine:
   
   ```bash
   python jenkins/generate.py
   ```
   
   all the paths in the templates are relative to the repo root though due to how that script calls Jinja2:
   
   https://github.com/apache/tvm/blob/85e42b6af38ea3bd0c99c8208d7baed5086a8959/jenkins/generate.py#L89



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] areusch commented on a diff in pull request #11380: [ci] Restructure Jenkinsfile

Posted by GitBox <gi...@apache.org>.
areusch commented on code in PR #11380:
URL: https://github.com/apache/tvm/pull/11380#discussion_r878528822


##########
jenkins/Jenkinsfile.j2:
##########
@@ -407,503 +99,29 @@ def make(docker_type, path, make_flag) {
 {% set microtvm_template_projects = ['build/microtvm_template_projects',] %}
 s3_prefix = "tvm-jenkins-artifacts-prod/tvm/${env.BRANCH_NAME}/${env.BUILD_NUMBER}"
 
+// General note: Jenkins has limits on the size of a method (or top level code)
+// that are pretty strict, so most usage of groovy methods in these templates
+// are purely to satisfy the JVM
+{% include "jenkins/Prepare.groovy.j2" %}

Review Comment:
   is there a script you run to regenerate this file? i always invoke from a venv inside of jenkins (though I guess maybe that's not necessary now that we've added it to the docker containers). in any case, now that we have paths involved, i think it would be good to fully capture the build recipe here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] driazati commented on a diff in pull request #11380: [ci] Restructure Jenkinsfile

Posted by GitBox <gi...@apache.org>.
driazati commented on code in PR #11380:
URL: https://github.com/apache/tvm/pull/11380#discussion_r878530550


##########
jenkins/Jenkinsfile.j2:
##########
@@ -407,503 +99,29 @@ def make(docker_type, path, make_flag) {
 {% set microtvm_template_projects = ['build/microtvm_template_projects',] %}
 s3_prefix = "tvm-jenkins-artifacts-prod/tvm/${env.BRANCH_NAME}/${env.BUILD_NUMBER}"
 
+// General note: Jenkins has limits on the size of a method (or top level code)
+// that are pretty strict, so most usage of groovy methods in these templates
+// are purely to satisfy the JVM
+{% include "jenkins/Prepare.groovy.j2" %}

Review Comment:
   this is a template file, not a generated one (`.j2` == Jinja2), it get used in the same way as the main jenkinsfile:
   
   ```bash
   python jenkins/generate.py
   ```
   
   all the paths in the templates are relative to the repo root though due to how that script calls Jinja2:
   
   https://github.com/apache/tvm/blob/85e42b6af38ea3bd0c99c8208d7baed5086a8959/jenkins/generate.py#L89



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] areusch merged pull request #11380: [ci] Restructure Jenkinsfile

Posted by GitBox <gi...@apache.org>.
areusch merged PR #11380:
URL: https://github.com/apache/tvm/pull/11380


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] driazati commented on a diff in pull request #11380: [ci] Restructure Jenkinsfile

Posted by GitBox <gi...@apache.org>.
driazati commented on code in PR #11380:
URL: https://github.com/apache/tvm/pull/11380#discussion_r878530550


##########
jenkins/Jenkinsfile.j2:
##########
@@ -407,503 +99,29 @@ def make(docker_type, path, make_flag) {
 {% set microtvm_template_projects = ['build/microtvm_template_projects',] %}
 s3_prefix = "tvm-jenkins-artifacts-prod/tvm/${env.BRANCH_NAME}/${env.BUILD_NUMBER}"
 
+// General note: Jenkins has limits on the size of a method (or top level code)
+// that are pretty strict, so most usage of groovy methods in these templates
+// are purely to satisfy the JVM
+{% include "jenkins/Prepare.groovy.j2" %}

Review Comment:
   this is a template file, not a generated one (`.j2` == Jinja2), it get used in the same way as the main jenkinsfile, `include` just means copy in the contents after running it through the template engine, so generation is just
   
   ```bash
   python jenkins/generate.py
   ```
   
   all the paths in the templates are relative to the repo root though due to how that script calls Jinja2:
   
   https://github.com/apache/tvm/blob/85e42b6af38ea3bd0c99c8208d7baed5086a8959/jenkins/generate.py#L89



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org