Coder Social home page Coder Social logo

jenkinsci / s3-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from d6y/hudson-s3

111.0 108.0 191.0 10.34 MB

Upload Jenkins build artifacts to Amazon S3

Home Page: https://plugins.jenkins.io/s3/

License: MIT License

Java 96.02% HTML 3.98%
java s3 jenkins-plugin aws

s3-plugin's Introduction

This plugin helps one to upload build artifacts to Amazon S3.

Making artifacts public

If you'd like to have some of your artifacts be publicly downloadable, see Granting public access to some S3 objects

Usage

When activated, traditional (Freestyle) Jenkins builds will have a build action called S3 Copy Artifact for downloading artifacts, and a post-build action called Publish Artifacts to S3 Bucket.

For Pipeline users, the same two actions are available via the s3CopyArtifact and s3Upload step. You can use the snippet generator to get started.

When using an Amazon S3 compatible storage system (OpenStack Swift, EMC Atmos...), the list of AWS regions can be overridden by specifying a file classpath://com/amazonaws/partitions/override/endpoints.json matching the format defined in AWS SDK's endpoints.json.

A solution to add this endpoints.json file in the classpath of Jenkins is to use the java command line parameter -Xbootclasspath/a:/path/to/boot/classpath/folder/ and to locate com/amazonaws/partitions/override/endpoints.json in /path/to/boot/classpath/folder/.

Even if most of the features of the Jenkins S3 Plugin require the user to specify the target region, some feature rely on a default Amazon S3 region which is by default the "US Standard Amazon S3 Region" and its endpoint is s3.amazonaws.com. This default region can be overridden with the system property hudson.plugins.s3.DEFAULT_AMAZON_S3_REGION. Note that this default region name MUST match with a region define in the AWS SDK configuration file endpoints.json (see above).

Usage with IAM

If you used IAM to create a separate pair of access credentials for this plugin, you can lock down its AWS access to simply listing buckets and writing to a specific bucket. Add the following custom policy to the user in the IAM console, replacing occurrences of "my-artifact-bucket" with your bucket name, which you'll have to create first:

{
  "Statement": [
    {
      "Action": [
        "s3:ListAllMyBuckets"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::*"
    },
    {
      "Action": "s3:*",
      "Effect": "Allow",
      "Resource": ["arn:aws:s3:::my-artifact-bucket", "arn:aws:s3:::my-artifact-bucket/*"]
    }
  ]
}

Notes

  • Only the basename of source files is used as the object key name, an option to include the path name relative to the workspace should probably be added.

Changelog

Acknowledgements

s3-plugin's People

Contributors

alecharp avatar bartvangeneugden avatar basil avatar bsideup avatar christ66 avatar ckapp-bullhorn avatar d6y avatar dependabot[bot] avatar dmbeer avatar dobbymoodge avatar dougm avatar endemics avatar jbrownbridge avatar jimilian avatar juliantcook avatar jzerbe avatar kohsuke avatar longlho avatar mikewatt avatar mmeent avatar mr-dg-wick avatar mrooney avatar ndeloof avatar olamy avatar oleg-nenashev avatar pash-slack avatar recampbell avatar rsandell avatar timothy-volvo avatar vlatombe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.