我正在尝试在声明性管道中使用s3Upload
步骤并收到错误:
java.lang.NoSuchMethodError: No such DSL method 's3Upload' found among steps
The docs indicate这一步应该是基本安装(核心)的一部分,但也许我错过了一个插件?我尝试了pipeline-aws-steps
和s3publisher
插件,但都不支持我要使用的文档中的managedArtifacts
行为。
这是我的实施:
pipeline {
agent any
stages {
// checkout, build, archive... removed for brevity
stage('Publish') {
steps {
s3Upload(profileName: 'build',
dontWaitForConcurrentBuildCompletion: true,
consoleLogLevel: 'INFO',
pluginFailureResultConstraint: 'FAILURE',
entries: [
bucket: 'measurabl-build',
sourceFile: config.npmOutputPath,
selectedRegion: 'us-west-2',
noUploadOnFailure: true,
uploadFromSlave: false,
managedArtifacts: true,
flatten: false,
gzipFiles: true
],
userMetadata: [
[key: 'gitCommit', value: env.GIT_COMMIT],
[key: 'gitPreviousCommit', value: env.GIT_PREVIOUS_COMMIT],
[key: 'gitLastSuccessfulBuildCommit', value: env.GIT_PREVIOUS_SUCCESSFUL_COMMIT],
[key: 'gitBranch', value: env.GIT_BRANCH],
[key: 'gitRepo', value: env.GIT_URL],
[key: 'buildUrl', value: env.BUILD_URL]
])
}
}
}
}
感谢您的任何输入/帮助!
答案 0 :(得分:1)
似乎Pipeline steps reference documentation错了,s3Upload
步骤不是Jenkins核心的一部分。
要获得此功能,请安装此处的s3
插件(S3发布商):https://plugins.jenkins.io/s3