How to block the build button if there is empty mandatory filed.

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      If the mandatory filed is empty, we should block the "Build" button or give the information to end user clearly.

      So far, we defined conditions in the pipeline stage as below. We could find the error after the building.

      But we hope to block the "Build" button and give the clear info to user quickly before starting the build.

      stage('preparation') {            
      steps {                
      script {                    
      if (test.isEmpty()) {                        
      error("No test available. Terminating build.")                    
      }

       

            Assignee:
            Unassigned
            Reporter:
            Li
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: