Core s3Upload pipeline step is missing - v2.124

150 views
Skip to first unread message

ry...@measurabl.com

unread,
Jun 4, 2018, 2:04:37 PM6/4/18
to Jenkins Users
I'm having an issue finding or using the s3Upload step that supports managing build archives in an AWS S3 bucket. I'm not sure if I'm trying to use the feature correctly, if the documentation is inaccurate, or if I've corrupted my Jenkins install, but using the step in a pipeline generates a "Step not found" exception.

I've also tried the pipeline-aws-steps and the s3publisher plugins, but neither supports the managedArtifacts behavior from the docs which I'd like to use.

Any help would be appreciated, thanks!



The docs I'm referencing:


Error:

java.lang.NoSuchMethodError: No such DSL method 's3Upload' found among steps

Implementation:
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]
                    ])
            }
        }
    }
}

ry...@measurabl.com

unread,
Jun 15, 2018, 1:04:27 PM6/15/18
to Jenkins Users
Figured it out, the steps reference says that the s3Upload step is in core, but its not. It is in the s3 plugin (S3 Publisher): https://plugins.jenkins.io/s3
Reply all
Reply to author
Forward
0 new messages