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 2021/09/18 08:49:03 UTC

[GitHub] [tvm] mikepapadim opened a new issue #9042: [CI Problem] Migrating Jenkinsfile from scripted to declartive pipeline style.

mikepapadim opened a new issue #9042:
URL: https://github.com/apache/tvm/issues/9042


   Currently, `Jenkinsfile` is in a scripted format. 
   Therefore, while more changes are suggested to improve the CI, like #8673, #8674 and #8675 the script will grow a lot.
   So, I suggest migrating it to declarative style to have access to Jenkins helpers directly. 
   
   ## Pipeline syntax differences
   Declarative pipelines always begin with the word pipeline. Scripted pipelines, on the other hand, always begin with the word node. Declarative pipelines break down stages into individual stages that can contain multiple steps. Scripted pipelines use Groovy code and references to the Jenkins pipeline DSL within the stage elements without the need for steps. 
   
   ## Declarative style example
   
   ```
   pipeline {
       agent any
       stages {
           stage('Deploy') {
               steps {
                   timeout(time: 3, unit: 'MINUTES') {
                       retry(5) {
                           sh ...
                       }
                   }
               }
           }
       }
   }
   ```
   
   Pros: 
   * A cleaner Jenkinsfile, easier to maintain, add features.
   * Direct access to declarative syntax, wrappers and functions from Jenkins [syntax](https://www.jenkins.io/doc/book/pipeline/syntax/). 
   * Can add `post` pipeline action to sent status on email, Slack, discord etc.
   
   @areusch


-- 
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 issue #9042: [CI] Migrating Jenkinsfile from scripted to declartive pipeline style.

Posted by GitBox <gi...@apache.org>.
areusch commented on issue #9042:
URL: https://github.com/apache/tvm/issues/9042#issuecomment-1068249600


   We tried this out, but not clear if the Jenkinsfile is cleaner/more maintainable in this format, or whether a template is needed. Going to revisit after ci.py is finished.


-- 
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