Git Product home page Git Product logo

codeartifact-gradle-plugin's Introduction

Codeartifact gradle plugin

Gradle plugin which authenticates against AWS CodeArtifact using your local credentials to obtain the token.

Usage

In your build.gradle file:

plugins {
    id 'ai.clarity.codeartifact' version '0.0.11'
}

repositories {
    maven {
        url 'https://domain-id.d.codeartifact.eu-central-1.amazonaws.com/maven/repository/'
    }
}

publishing {
    repositories {
        maven {
            url 'https://domain-id.d.codeartifact.eu-central-1.amazonaws.com/maven/repository/'
        }
    }
}

Advanced Usage

If you need a concrete profile for AWS authentication you have 4 different options:

1 - Add the profile name to the repository url as a query param:

repositories {
    maven {
        url 'https://domain-id.d.codeartifact.eu-central-1.amazonaws.com/maven/repository/?profile=prod'
    }
}

Note: The query param is used to configure the profile and automatically removed from the url in any request to AWS.

2 - Define the environment var AWS_PROFILE with the profile name you want to use

This plugin uses AWS SDK for authorization, all the standard environment vars are applicable.

3 - Define the environment var CODEARTIFACT_PROFILE with the profile name you want to use

If you need a different profile for codeartifact than for the rest of AWS calls you can use this environment var.

4 - Define the profile using a system property

If you need a different profile for codeartifact and you cannot define a enviroment variable, you can define it via system property also:

This way using gradle.properties file:

systemProp.codeartifact.profile=<your profile>

Or using command line:

gradle -Dcodeartifact.profile=<your profile> ...

codeartifact-gradle-plugin's People

Contributors

darquesdev avatar dependabot[bot] avatar elliotsegler avatar jerolba avatar jfisbein avatar sdelamo avatar

Watchers

 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.