为什么在 Jenkins 2.124 上找不到 s3Upload 构建步骤
Why is the s3Upload build step not found on Jenkins 2.124
我正在尝试在声明性管道中使用 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]
])
}
}
}
}
感谢任何input/help!
似乎Pipeline steps reference documentation是错误的,s3Upload
步骤不是Jenkins核心的一部分。
要获得此功能,请安装此处的 s3
插件 (S3 Publisher):https://plugins.jenkins.io/s3
我正在尝试在声明性管道中使用 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]
])
}
}
}
}
感谢任何input/help!
似乎Pipeline steps reference documentation是错误的,s3Upload
步骤不是Jenkins核心的一部分。
要获得此功能,请安装此处的 s3
插件 (S3 Publisher):https://plugins.jenkins.io/s3