Currently, we are keeping builds using
which may introduce some security issues. Pipeline Supporting API Plugin has whitelisted setKeepLog method, but it's not released yet. The purpose of this ticket is updating Jenkinsfile to use this safe method after plugin 2.19 release.
The list of releases: https://github.com/jenkinsci/workflow-support-plugin/releases.
a whitelisted method is used to set keepLog option
dangerous approvals are cleared on Jenkins -> In-process Script Approval
release build should be automatically kept forever on master branch
deploy to test should be triggered only for SNAPSHOT version on master