確保安裝了外掛Permissive Script Security
修改啟動Jenkins啟動引數
vi /usr/lib/systemd/system/jenkins.service
將引數:
Environment="JAVA_OPTS=-Djava.awt.headless=true"
修改為:
Environment="JAVA_OPTS=-Djava.awt.headless=true -Dpermissive-script-security.enabled=true"
載入配置
systemctl daemon-reload
重啟Jenkins
systemctl restart jenkins