项目作者: itsallcode

项目描述 :
Get AWS credentials for S3 maven repos from default AWS credentials provider chain
高级语言: Java
项目地址: git://github.com/itsallcode/awsm-credentials-gradle.git
创建时间: 2017-02-17T13:12:15Z
项目社区:https://github.com/itsallcode/awsm-credentials-gradle

开源协议:GNU General Public License v3.0

下载


awsm-credentials-gradle

Get AWS credentials for S3 maven repos from default AWS credentials provider chain

⚠️ This project is deprecated ⚠️

Gradle now supports S3 maven repos out-of-the-box:

Usage

  1. Add this plugin to your project, see https://plugins.gradle.org/plugin/com.github.kaklakariada.awsm-credentials-gradle

    1. plugins {
    2. id "com.github.kaklakariada.awsm-credentials-gradle" version "0.2.1"
    3. }
  2. Configure your AWS credentials as named profiles in ~/.aws/credentials (not in ~/.aws/config). Use role_arn and source_profile for role delegation:

    1. [root-credentials]
    2. aws_access_key_id = ...
    3. aws_secret_access_key = ...
    4. [delegate-account1]
    5. role_arn = arn:aws:iam::<account>:role/<role name>
    6. source_profile = root-credentials
    7. [delegate-account2]
    8. role_arn = arn:aws:iam::<account>:role/<role name>
    9. source_profile = root-credentials
  3. Configure the AWS profile you want to use in ~/.gradle/gradle.properties:

    1. systemProp.aws.profile = delegate-account1
  4. Add S3 maven repositories without specifying credentials. The plugin will automatically add credentials for repositories with s3:// urls in all projects.

    • Dependency repositories:

      1. repositories {
      2. maven {
      3. url "s3://bucket/path/to/repo"
      4. }
      5. }
    • Publishing repositories:

      1. plugins {
      2. id "maven-publish"
      3. }
      4. publishing {
      5. repositories {
      6. maven {
      7. url "s3://bucket/path/to/repo"
      8. }
      9. }
      10. publications {
      11. // ...
      12. }
      13. }

Development

  1. $ git clone https://github.com/hamstercommunity/awsm-credentials-gradle.git

Using eclipse

Import into eclipse using buildship plugin:

  1. Select File > Import… > Gradle > Gradle Project
  2. Click “Next”
  3. Select Project root directory
  4. Click “Finish”

Generate license file header

  1. $ ./gradlew licenseFormatMain licenseFormatTest

Publish to plugins.gradle.org

See https://plugins.gradle.org/docs/submit for details.

  1. Add API Key from https://plugins.gradle.org to ~/.gradle/gradle.properties:

    1. gradle.publish.key = ...
    2. gradle.publish.secret = ...
  2. Run ./gradlew publishPlugins