
Using Jenkinsfiles for Continuous Deployment Pipelines - jpswade
https://wade.be/development/2018/04/30/jenkinsfiles.html
======
vorg
Is it possible to write the pipeline code in another language with better
formatting, e.g. Python or Jython, instead of having 15 lines with nothing but
'}' on it? Here's a possible rewrite of the sample from the posting:

    
    
        #!/usr/bin/env someotherlanguage
        pipeline:
            agent any
            stages:
                stage('Build') :
                    steps:
                        sh './build.sh'
                stage('Test') :
                    steps :
                        sh './test.sh'
                stage('Deploy') :
                    steps :
                        sh './deploy.sh'
                stage('Deploy - Staging') :
                    steps :
                        sh './deploy.sh staging'
                        sh './run-smoke-tests.sh'
                stage('Sanity check') :
                    steps :
                        input "Does the staging environment look ok?"
                stage('Deploy - Production') :
                    steps :
                        sh './deploy.sh production'
    
    

Now _that_ can better fit on one page. Coming to think of it, are all those
'steps:', 'stages:', and 'pipeline:' clauses really necessary?

