Skip to main content

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​

  1. Access https://deltatre.awsapps.com/start and select Access keys

  2. In a terminal, execute the three imports in Option 1: Set AWS environment variables

  3. Go back to https://deltatre.awsapps.com/start and select CodeArtifactReadOnlyAccessDIVA

  4. Search and select CodeArtifact

  5. Select the Diva repository, filter by Format:maven, and select View connection instructions

  6. Select Operating system, Gradle as the package manager, Select Pull from your repository as configuration method, and copy the login command in Step 3

  7. 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.

  1. 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
}
}