0% found this document useful (0 votes)
3 views5 pages

AWS CodeArtifact Developer Setup Guide

Uploaded by

18121069
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

AWS CodeArtifact Developer Setup Guide

Uploaded by

18121069
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

CodeArtifact Developer Guide

For mvn artifacts –

1. Add your server to the list of servers to your [Link].

<servers>
<server>
<id>tmfl-dev-LOS-dev-Artifact-Central</id>
<username>aws</username>
<password>${env.CODEARTIFACT_AUTH_TOKEN}</password>
</server>
</servers>

2. Add a profile containing your repository to your [Link].


You can use any value in the <id> element, but it must be the same in both the <server>
element from Step 4 and the <repository> elements. This enables the specified credentials to be
included in requests to CodeArtifact.

<profiles>
<profile>
<id>tmfl-dev-LOS-dev-Artifact-Central</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>tmfl-dev-LOS-dev-Artifact-Central</id>
<url>[Link]
LOS-dev-Artifact-Central/</url>
</repository>
</repositories>
</profile>
</profiles>
3. Set a mirror in your [Link] that captures all connections and routes them to your
repository instead of a public repository.

<mirrors>
<mirror>
<id>tmfl-dev-LOS-dev-Artifact-Central</id>
<name>tmfl-dev-LOS-dev-Artifact-Central</name>
<url>[Link]
dev-Artifact-Central/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>

4. Add this distribution management configuration to your [Link].

<distributionManagement>
<repository>
<id>tmfl-dev-LOS-dev-Artifact-Central</id>
<name>tmfl-dev-LOS-dev-Artifact-Central</name>
<url>[Link]
dev-Artifact-Central/</url>
</repository>
</distributionManagement>

For SIT and UAT


<distributionManagement>
<repository>
<id>los-qa-LOS-qa-Artifact-Central</id>
<name>los-qa-LOS-qa-Artifact-Central</name>
<url>[Link]
qa-Artifact-Central/</url>
</repository>
</distributionManagement>

<distributionManagement>
<repository>
<id>los-uat-LOS-uat-Artifact-Central</id>
<name>los-uat-LOS-uat-Artifact-Central</name>
<url>[Link]
uat-Artifact-Central/</url>
</repository>
</distributionManagement>
QA Configuration
<servers>
<server>
<id>los-qa-LOS-qa-Artifact-Central</id>
<username>aws</username>
<password>${env.CODEARTIFACT_AUTH_TOKEN}</password>
</server>
</servers>

<profiles>
<profile>
<id>los-qa-LOS-qa-Artifact-Central</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>los-qa-LOS-qa-Artifact-Central</id>
<url>[Link]
[Link]/maven/LOS-qa-Artifact-Central/</url>
</repository>
</repositories>
</profile>
</profiles>

<mirrors>
<mirror>
<id>los-qa-LOS-qa-Artifact-Central</id>
<name>los-qa-LOS-qa-Artifact-Central</name>
<url>[Link]
[Link]/maven/LOS-qa-Artifact-Central/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>

UAT configuration
<servers>
<server>
<id>los-uat-LOS-uat-Artifact-Central</id>
<username>aws</username>
<password>${env.CODEARTIFACT_AUTH_TOKEN}</password>
</server>
</servers>

<profiles>
<profile>
<id>los-uat-LOS-uat-Artifact-Central</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>los-uat-LOS-uat-Artifact-Central</id>
<url>[Link]
[Link]/maven/LOS-uat-Artifact-Central/</url>
</repository>
</repositories>
</profile>
</profiles>

<mirrors>
<mirror>
<id>los-uat-LOS-uat-Artifact-Central</id>
<name>los-uat-LOS-uat-Artifact-Central</name>
<url>[Link]
[Link]/maven/LOS-uat-Artifact-Central/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>

For npm artifacts –

Need to run this command env wise in [Link] file

aws codeartifact login --tool npm --repository LOS-qa-Artifact-Central --domain los-qa --domain-owner
436076523003 --region ap-south-1
aws codeartifact login --tool npm --repository LOS-uat-Artifact-Central --domain los-uat --domain-owner
436076523003 --region ap-south-1

aws codeartifact login --tool npm --repository LOS-dev-Artifact-Central --domain tmfl-dev --domain-
owner 436076523003 --region ap-south-1

You might also like