Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
How to run javascript with active choices in a Jenkins declarative pipeline?

I know that active choice supports javascript to modify the dom of jenkinse web UI in configuration panel. Like the pic shown. Reference

enter image description here

But how can I run javascript in active choice declarative pipeline? For example, if I want to disable the build button. The code should be like

[$class: 'DynamicReferenceParameter',
          choiceType: 'ET_FORMATTED_HIDDEN_HTML',
          name: 'Disable Button',
          referencedParameters: 'A_checkbox_trigger',
          script: [$class: 'GroovyScript',
              fallbackScript: [
                  classpath: [],
                  sandbox: true,
                  script: fallback
              ],
              script: [
                  classpath: [],
                  sandbox: true,
                  script: """return "${
                    def buildHTML = '''<script>
                                       function custom(){
                                                document.getElementById("yui-gen1-button").disabled=true
                                     }
                                     </script>'''
                    return buildHTML
                  }"
                  """
              ]
          ]
      ]


Could someone give me a simple example how to render effects on jenkins page? THX

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!