Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41090

Roundtrip Jenkinsfile should have nice formatting

      When this Jenkinsfile is roundtripped:

      pipeline {
          agent { docker 'java' }
          stages {
              stage ('Build') {
                  steps {
                    sh 'mvn clean source:jar package'
                  }
              }
          }
          post {
              always {
                  junit '**/target/surefire-reports/TEST-*.xml'
                  archive '**/target/*.jar'
              }
          }
      }
      

      Is formatted as:

      pipeline {
        agent {
          docker 'java'}
          
          stages {
            stage('Build') {
              steps {
                sh('mvn clean source:jar package')
              }
            }
            
          }
          
          post {
            always {
              junit('**/target/surefire-reports/TEST-*.xml')
              archive('**/target/*.jar')
              
            }
            
          }
          
        }
      

      It would be good to avoid extra new lines and consistently write out brace locations

            abayer Andrew Bayer
            jamesdumay James Dumay
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: