slipset / deps-deploy

deploy your stuff
Eclipse Public License 1.0
148 stars 31 forks source link

Support using private S3 buckets as remote mvn deployment targets #19

Closed RickMoynihan closed 3 years ago

RickMoynihan commented 3 years ago

Works via S3 wagon.

This PR builds on and includes commits from #18 which also adds exec-fn support.

RickMoynihan commented 3 years ago

Agreed. Will try and update that later.

RickMoynihan commented 3 years ago

I've pushed some changes to this. Also I should probably add some docs to describe how to set this up. I myself had made some mistakes in my local configuration that led me to assume it was doing one thing when instead it was doing another (picking up credentials via the AWS credential provider chain).

Should I add something to the README in a deploying to private repositories section; or perhaps a page on the wiki?

slipset commented 3 years ago

Sorry for dropping the ball on this, but yes, please add some docs on this in the readme

nnichols commented 3 years ago

Is there any way I could help w/ this? I'd love to be able to use this functionality

slipset commented 3 years ago

I'll ping @RickMoynihan to see if he has some docs to add to the readme.

RickMoynihan commented 3 years ago

Hi,

Sorry I've been off on paternity leave followed by xmas and new year, and now trying to catch up on everything that's happened at work etc. I'll try and get round to this as soon as I can but no promises as to when.

RickMoynihan commented 3 years ago

To briefly summarise what you need to do to use this, you just need to provide the credentials via the AWS provider chain. Which more or less means either:

  1. setting the env vars: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
  2. providing them via java system properties aws.accessKeyId and aws.secretKey

or

  1. via an AWS credential profile, in the file ~/.aws/credentials with the AWS_PROIFLE env var used to specify which profile to use (or the 'default' profile).
[default]
aws_access_key_id = AKIAXXXXX
aws_secret_access_key = SECRET_KEY

For more details see s3-wagon-provider and if you need to know how to configure an S3 bucket see here.

The repository bucket then needs to be specified with a :repository key in your deps.edn alias as :exec-args e.g.

,,,
  :exec-args {:repository {"releases" {:url "s3p://swirrl-jars/releases/"}}}