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

Unable to edit pipeline in blueocean when Jenkinsfile contains "withSonarQubeEnv"

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Everything is fine until I switch to edit mode. Then, OceanBlue layout is displayed but the stages are not.

      In chrome console, this error message appears :

      blueocean.js:58253 Unhandled Rejection: "Error: No parameters for: withSonarQubeEnv\n at convertStepFromJson (https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63287:27)\n at convertStageFromJson (https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63239:28)\n at convertJsonToInternalModel (https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63195:28)\n at https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:57251:96\n at https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63513:13\n at https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:64335:17\n at <anonymous>"
      logUnhandledPromiseRejection @ blueocean.js:58253

      In case it helps, this is the Jenkinsfile : 

      pipeline {
        agent any
        stages {
          stage('Server build (Java 8)') {
            agent {
              docker {
                image 'openjdk:8'
                args '-v /srv/docker/jenkins-containers/cache/gradle-java8:/root/.gradle'
              }
            }
            steps {
              sh 'cd server && ./gradlew clean && ./gradlew build'
            }
          }
          stage('Client build') {
            agent {
              docker {
                image 'node:9'
                args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/npm-node9:/root/.npm'
              }
            }
            steps {
              withSonarQubeEnv('sonar') {
                sh 'cd ./client && npm install'
              }
            }
          }
          stage('Server SonarQube analysis') {
            agent {
              docker {
                image 'openjdk:8'
                args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/gradle-java8:/root/.gradle'
              }
            }
            steps {
              withSonarQubeEnv('sonar') {
                sh 'cd ./server && ./gradlew --info sonarqube'
              }
            }
          }
          stage('Server SonarQube QG') {
            agent {
              docker {
                image 'openjdk:8'
                args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/gradle-java8:/root/.gradle'
              }
            }
            steps {
              timeout(time: 1, unit: 'HOURS') {
                waitForQualityGate()
              }
            }
          }
          stage('Client SonarQube analysis') {
            agent {
              docker {
                image 'node:9'
                args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/npm-node9:/root/.npm'
              }
            }
            steps {
              withSonarQubeEnv('sonar') {
                sh 'cd ./client && npm install && npm run-script sonar-scanner'
              }
            }
          }
          stage('Client SonarQube QG') {
            agent {
              docker {
                image 'node:9'
                args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/npm-node9:/root/.npm'
              }
            }
            steps {
              timeout(time: 1, unit: 'HOURS') {
                waitForQualityGate()
              }
            }
          }
        }
      }
       

       

       

        Attachments

          Issue Links

            Activity

            romlly Romain Ciaccafava created issue -
            romlly Romain Ciaccafava made changes -
            Field Original Value New Value
            Description Everything is fine until I switch to edit mode. Then, OceanBlue layout is displayed but the stages are not.

            In chrome console, this error message appears :

             
            {code:java}
            blueocean.js:58253 Unhandled Rejection: "Error: No parameters for: withSonarQubeEnv\n at convertStepFromJson (https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63287:27)\n at convertStageFromJson (https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63239:28)\n at convertJsonToInternalModel (https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63195:28)\n at https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:57251:96\n at https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63513:13\n at https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:64335:17\n at <anonymous>"
            logUnhandledPromiseRejection @ blueocean.js:58253{code}
            In case it helps, this is the Jenkinsfile : 
            {code:java}
            pipeline {
              agent any
              stages {
                stage('Server build (Java 8)') {
                  agent {
                    docker {
                      image 'openjdk:8'
                      args '-v /srv/docker/jenkins-containers/cache/gradle-java8:/root/.gradle'
                    }
                  }
                  steps {
                    sh 'cd server && ./gradlew clean && ./gradlew build'
                  }
                }
                stage('Client build') {
                  agent {
                    docker {
                      image 'node:9'
                      args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/npm-node9:/root/.npm'
                    }
                  }
                  steps {
                    withSonarQubeEnv('sonar') {
                      sh 'cd ./client && npm install'
                    }
                  }
                }
                stage('Server SonarQube analysis') {
                  agent {
                    docker {
                      image 'openjdk:8'
                      args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/gradle-java8:/root/.gradle'
                    }
                  }
                  steps {
                    withSonarQubeEnv('sonar') {
                      sh 'cd ./server && ./gradlew --info sonarqube'
                    }
                  }
                }
                stage('Server SonarQube QG') {
                  agent {
                    docker {
                      image 'openjdk:8'
                      args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/gradle-java8:/root/.gradle'
                    }
                  }
                  steps {
                    timeout(time: 1, unit: 'HOURS') {
                      waitForQualityGate()
                    }
                  }
                }
                stage('Client SonarQube analysis') {
                  agent {
                    docker {
                      image 'node:9'
                      args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/npm-node9:/root/.npm'
                    }
                  }
                  steps {
                    withSonarQubeEnv('sonar') {
                      sh 'cd ./client && npm install && npm run-script sonar-scanner'
                    }
                  }
                }
                stage('Client SonarQube QG') {
                  agent {
                    docker {
                      image 'node:9'
                      args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/npm-node9:/root/.npm'
                    }
                  }
                  steps {
                    timeout(time: 1, unit: 'HOURS') {
                      waitForQualityGate()
                    }
                  }
                }
              }
            }
             {code}
             

             
            Everything is fine until I switch to edit mode. Then, OceanBlue layout is displayed but the stages are not.

            In chrome console, this error message appears :
            {code:java}
            blueocean.js:58253 Unhandled Rejection: "Error: No parameters for: withSonarQubeEnv\n at convertStepFromJson (https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63287:27)\n at convertStageFromJson (https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63239:28)\n at convertJsonToInternalModel (https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63195:28)\n at https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:57251:96\n at https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:63513:13\n at https://app.jaguards.com:4433/adjuncts/e896cb23/org/jenkins/ui/jsmodules/blueocean-pipeline-editor/jenkins-js-extension.js:64335:17\n at <anonymous>"
            logUnhandledPromiseRejection @ blueocean.js:58253{code}
            In case it helps, this is the Jenkinsfile : 
            {code:java}
            pipeline {
              agent any
              stages {
                stage('Server build (Java 8)') {
                  agent {
                    docker {
                      image 'openjdk:8'
                      args '-v /srv/docker/jenkins-containers/cache/gradle-java8:/root/.gradle'
                    }
                  }
                  steps {
                    sh 'cd server && ./gradlew clean && ./gradlew build'
                  }
                }
                stage('Client build') {
                  agent {
                    docker {
                      image 'node:9'
                      args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/npm-node9:/root/.npm'
                    }
                  }
                  steps {
                    withSonarQubeEnv('sonar') {
                      sh 'cd ./client && npm install'
                    }
                  }
                }
                stage('Server SonarQube analysis') {
                  agent {
                    docker {
                      image 'openjdk:8'
                      args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/gradle-java8:/root/.gradle'
                    }
                  }
                  steps {
                    withSonarQubeEnv('sonar') {
                      sh 'cd ./server && ./gradlew --info sonarqube'
                    }
                  }
                }
                stage('Server SonarQube QG') {
                  agent {
                    docker {
                      image 'openjdk:8'
                      args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/gradle-java8:/root/.gradle'
                    }
                  }
                  steps {
                    timeout(time: 1, unit: 'HOURS') {
                      waitForQualityGate()
                    }
                  }
                }
                stage('Client SonarQube analysis') {
                  agent {
                    docker {
                      image 'node:9'
                      args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/npm-node9:/root/.npm'
                    }
                  }
                  steps {
                    withSonarQubeEnv('sonar') {
                      sh 'cd ./client && npm install && npm run-script sonar-scanner'
                    }
                  }
                }
                stage('Client SonarQube QG') {
                  agent {
                    docker {
                      image 'node:9'
                      args '--network jenkinscontainers_default --link sonarqube -v /srv/docker/jenkins-containers/cache/npm-node9:/root/.npm'
                    }
                  }
                  steps {
                    timeout(time: 1, unit: 'HOURS') {
                      waitForQualityGate()
                    }
                  }
                }
              }
            }
             {code}
             

             
            abayer Andrew Bayer made changes -
            Assignee Andrew Bayer [ abayer ]
            abayer Andrew Bayer made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            abayer Andrew Bayer made changes -
            Remote Link This issue links to "PR #1786 (Web Link)" [ 21300 ]
            abayer Andrew Bayer made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            kzantow Keith Zantow made changes -
            Assignee Andrew Bayer [ abayer ] Keith Zantow [ kzantow ]
            kzantow Keith Zantow made changes -
            Status In Review [ 10005 ] In Progress [ 3 ]
            kzantow Keith Zantow made changes -
            Status In Progress [ 3 ] Open [ 1 ]
            kzantow Keith Zantow made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            vivek Vivek Pandey made changes -
            Assignee Keith Zantow [ kzantow ] Andrew Bayer [ abayer ]
            vivek Vivek Pandey made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            vivek Vivek Pandey made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]

              People

              Assignee:
              abayer Andrew Bayer
              Reporter:
              romlly Romain Ciaccafava
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: