Skip to content

Commit

Permalink
Integrate code artifact with a2d2 (#397)
Browse files Browse the repository at this point in the history
* Added code artifact configurations

* Added a shell script to run mvn deploy in sub projects
  • Loading branch information
vdeshkar authored Nov 17, 2023
1 parent 930db22 commit 8985de0
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 124 deletions.
31 changes: 3 additions & 28 deletions a2d2-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -653,35 +653,10 @@
</dependencies>
<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>nexus-repo-releases</id>
<name>Nexus Repository</name>
<url>https://repository.elimuinformatics.com/repository/maven-releases/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<id>elimu-a2d2-api</id>
<name>elimu-a2d2-api</name>
<url>https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/</url>
</repository>
<snapshotRepository>
<uniqueVersion>true</uniqueVersion>
<id>nexus-repo-snapshots</id>
<name>Nexus Repository</name>
<url>https://repository.elimuinformatics.com/repository/maven-snapshots/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</snapshotRepository>
</distributionManagement>
<build>
<finalName>${project.artifactId}</finalName>
Expand Down
82 changes: 41 additions & 41 deletions a2d2-settings.xml
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
<settings>
<profiles>
<profile>
<id>default</id>
<id>elimu-a2d2-api</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>maven-central</id>
<name>Maven Central</name>
<url>https://repo1.maven.org/maven2/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
<repository>
<id>nexus-repo</id>
<name>NexusRepository</name>
<url>https://repository.elimuinformatics.com/repository/maven-public/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
<id>elimu-a2d2-api</id>
<url>https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/</url>
</repository>
</repositories>
</profile>
<profile>
<id>elimu-java-commons</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>elimu-java-commons</id>
<url>https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/java-commons/</url>
</repository>
</repositories>
</profile>
<profile>
<id>elimu-ecdm</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>elimu-ecdm</id>
<url>https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/ecdm/</url>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>nexus-repo</id>
<username>${env.NEXUS_USERNAME}</username>
<password>${env.NEXUS_PASSWORD}</password>
<id>elimu-a2d2-api</id>
<username>aws</username>
<password>${env.CODEARTIFACT_AUTH_TOKEN}</password>
</server>
<server>
<id>nexus-repo-releases</id>
<username>${env.NEXUS_USERNAME}</username>
<password>${env.NEXUS_PASSWORD}</password>
<id>elimu-ecdm</id>
<username>aws</username>
<password>${env.CODEARTIFACT_AUTH_TOKEN}</password>
</server>
<server>
<id>nexus-repo-snapshots</id>
<username>${env.NEXUS_USERNAME}</username>
<password>${env.NEXUS_PASSWORD}</password>
<id>elimu-java-commons</id>
<username>aws</username>
<password>${env.CODEARTIFACT_AUTH_TOKEN}</password>
</server>
</servers>
<activeProfiles>
<activeProfile>default</activeProfile>
</activeProfiles>
</settings>
</settings>
13 changes: 13 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
echo "inside shell"
sub_folders=( "cds-hook-model" "generic-model" "generic-helpers" "core-dependencies" "kie-based-services" "service-daos" "cds-hook-services" "core-wih" "cql-mods" "cql-wih" "ftl-transform-wih" "fhir-resource-wih" "cdshooks-wih" "web-util" "fhir-query-helper-base" "fhir-query-helper-dstu2" "fhir-query-helper-dstu3" "fhir-query-helper-r4" "oauth-helpers" "fhir-helpers" "task-utilities" "sms-wih" "a2d2-api")

mvn deploy --settings a2d2-settings.xml -Durl=https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/ -DpomFile=pom.xml -DrepositoryId=elimu-a2d2-api -DupdateReleaseInfo=true -DskipTests -U

for sub_folder in "${sub_folders[@]}"; do
cd "$sub_folder" || exit 1

mvn deploy --settings ../a2d2-settings.xml -Durl=https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/ -DpomFile=pom.xml -DrepositoryId=elimu-a2d2-api -DupdateReleaseInfo=true -DskipTests -U

cd ..
done
19 changes: 5 additions & 14 deletions fhir-helpers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,11 @@
</dependency>
</dependencies>
<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>nexus-repo-releases</id>
<name>Nexus Repository</name>
<url>https://repository.elimuinformatics.com/repository/maven-releases/</url>
<layout>default</layout>
</repository>
<snapshotRepository>
<uniqueVersion>true</uniqueVersion>
<id>nexus-repo-snapshots</id>
<name>Nexus Repository</name>
<url>https://repository.elimuinformatics.com/repository/maven-snapshots/</url>
<layout>default</layout>
</snapshotRepository>
<repository>
<id>elimu-a2d2-api</id>
<name>elimu-a2d2-api</name>
<url>https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/</url>
</repository>
</distributionManagement>
<build>
<plugins>
Expand Down
31 changes: 3 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -526,35 +526,10 @@
</dependencyManagement>
<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>nexus-repo-releases</id>
<name>Nexus Repository</name>
<url>https://repository.elimuinformatics.com/repository/maven-releases/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<id>elimu-a2d2-api</id>
<name>elimu-a2d2-api</name>
<url>https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/</url>
</repository>
<snapshotRepository>
<uniqueVersion>true</uniqueVersion>
<id>nexus-repo-snapshots</id>
<name>Nexus Repository</name>
<url>https://repository.elimuinformatics.com/repository/maven-snapshots/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
Expand Down
16 changes: 3 additions & 13 deletions task-utilities/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,10 @@
</dependencies>
<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>nexus-repo-releases</id>
<name>Nexus Repository</name>
<url>https://repository.elimuinformatics.com/repository/maven-releases/</url>
<layout>default</layout>
<id>elimu-a2d2-api</id>
<name>elimu-a2d2-api</name>
<url>https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/</url>
</repository>
<snapshotRepository>
<uniqueVersion>true</uniqueVersion>
<id>nexus-repo-snapshots</id>
<name>Nexus Repository</name>
<url>https://repository.elimuinformatics.com/repository/maven-snapshots/</url>
<layout>default</layout>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
Expand Down Expand Up @@ -257,4 +248,3 @@
</plugins>
</reporting>
</project>

0 comments on commit 8985de0

Please sign in to comment.