Setup the development environment
What you need before starting​
- Your AWS account is SSO-enabled to access https://deltatre.awsapps.com/start. After being SSO-enabled (please refer to your Project Manager), restart your development machine.
Setup​
-
Access https://deltatre.awsapps.com/start and select
Access keys
-
In a terminal, execute the three imports in
Option 1: Set AWS environment variables
-
Go back to https://deltatre.awsapps.com/start and select
CodeArtifactReadOnlyAccessDIVA
-
Search and select
CodeArtifact
-
Select the
Diva
repository, filter byFormat:maven
, and selectView connection instructions
-
Select
Operating system
,Gradle
as the package manager, SelectPull from your repository
as configuration method, and copy the login command in Step 3 -
Generate the authorisation token running the copied command, like in the following example:
export CODEARTIFACT_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain deltatre-diva --domain-owner <YOUR USER CODE> --region eu-central-1 --query authorizationToken --output text`
Note: The Authorisation Token expires within 12 hours. Repeat the steps until the login command every time you need to update the DIVA package.
- Add this Maven section to the dependencyResolutionManagement -> repositories section in the project's
settings.gradle
file
maven
{
url 'https://deltatre-diva-058264107880.d.codeartifact.eu-central-1.amazonaws.com/maven/Diva/'
credentials {
username "aws"
password System.env.CODEARTIFACT_AUTH_TOKEN
}
}