我正在尝试找出如何确定是什么原因导致构建从脚本Jenkinsfile内部运行。原因是我在docker容器中有一个脚本,我希望在cron作业上运行它,所以当cron作业触发时,我只希望它运行容器,但当我推送更改时,我希望它签出代码,重新构建容器,运行静态代码分析,运行测试等。
我如何才能找到原因?我试过currentBuild.getCauses()但我得到了
groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.workflow.support.steps.build.RunWrapp
我正在从Jenkins 1.x迁移到Jenkins 2,我想使用Jenkinsfile构建和部署应用程序。我能够构建gradle应用程序,但对于使用Jenkinsfile通过AWS代码部署部署应用程序感到困惑。
这是我的jenkinsfile
node {
// Mark the code checkout 'stage'....
stage 'Checkout'
// Get some code from a GitHub repository
git branch: 'master',
crede