How can I disable security checks for Jenkins pipeline builds

前端 未结 5 913
日久生厌
日久生厌 2020-12-19 00:51

I\'m running Jenkins in a local trusted environment where I\'m trying to run this pipeline. This Jenkinsfile is checked into git.

#!groovy
node(\'master\')          


        
5条回答
  •  独厮守ぢ
    2020-12-19 01:12

    You can solve the problem by following steps:

    1. install Permissive Script Security plugin (version 0.3 or newer)
    2. If you are using a pipeline script, make sure Use Groovy Sandbox is checked. This can be done in the configuration of the job.
    3. add permissive-script-security.enabled command line parameter to Jenkins master with value:
    • true if you want to disable the need to approve scripts, but potentially dangerous signatures will be logged:

            -Dpermissive-script-security.enabled=true
      
    • no_security if you want to disable the need to approve scripts and disable also logging of the potentially dangerous signatures:

            -Dpermissive-script-security.enabled=no_security
      

提交回复
热议问题