From 8985de090f7e1b69855238360e459e40de32ba65 Mon Sep 17 00:00:00 2001
From: Vipul Deshkar <94971091+vdeshkar@users.noreply.github.com>
Date: Fri, 17 Nov 2023 16:36:42 +0530
Subject: [PATCH] Integrate code artifact with a2d2 (#397)
* Added code artifact configurations
* Added a shell script to run mvn deploy in sub projects
---
a2d2-api/pom.xml | 31 ++--------------
a2d2-settings.xml | 82 +++++++++++++++++++++---------------------
deploy.sh | 13 +++++++
fhir-helpers/pom.xml | 19 +++-------
pom.xml | 31 ++--------------
task-utilities/pom.xml | 16 ++-------
6 files changed, 68 insertions(+), 124 deletions(-)
create mode 100755 deploy.sh
diff --git a/a2d2-api/pom.xml b/a2d2-api/pom.xml
index 2f945bb3..35ccffd6 100644
--- a/a2d2-api/pom.xml
+++ b/a2d2-api/pom.xml
@@ -653,35 +653,10 @@
- false
- nexus-repo-releases
- Nexus Repository
- https://repository.elimuinformatics.com/repository/maven-releases/
- default
-
- true
- always
-
-
- true
- always
-
+ elimu-a2d2-api
+ elimu-a2d2-api
+ https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/
-
- true
- nexus-repo-snapshots
- Nexus Repository
- https://repository.elimuinformatics.com/repository/maven-snapshots/
- default
-
- true
- always
-
-
- true
- always
-
-
${project.artifactId}
diff --git a/a2d2-settings.xml b/a2d2-settings.xml
index f5015972..b8fca511 100644
--- a/a2d2-settings.xml
+++ b/a2d2-settings.xml
@@ -1,57 +1,57 @@
- default
+ elimu-a2d2-api
+
+ true
+
- maven-central
- Maven Central
- https://repo1.maven.org/maven2/
- default
-
- true
- always
-
-
- true
- always
-
-
-
- nexus-repo
- NexusRepository
- https://repository.elimuinformatics.com/repository/maven-public/
- default
-
- true
- always
-
-
- true
- always
-
-
+ elimu-a2d2-api
+ https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/
+
+
+
+
+ elimu-java-commons
+
+ true
+
+
+
+ elimu-java-commons
+ https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/java-commons/
+
+
+
+
+ elimu-ecdm
+
+ true
+
+
+
+ elimu-ecdm
+ https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/ecdm/
+
- nexus-repo
- ${env.NEXUS_USERNAME}
- ${env.NEXUS_PASSWORD}
+ elimu-a2d2-api
+ aws
+ ${env.CODEARTIFACT_AUTH_TOKEN}
- nexus-repo-releases
- ${env.NEXUS_USERNAME}
- ${env.NEXUS_PASSWORD}
+ elimu-ecdm
+ aws
+ ${env.CODEARTIFACT_AUTH_TOKEN}
- nexus-repo-snapshots
- ${env.NEXUS_USERNAME}
- ${env.NEXUS_PASSWORD}
+ elimu-java-commons
+ aws
+ ${env.CODEARTIFACT_AUTH_TOKEN}
-
- default
-
-
+
\ No newline at end of file
diff --git a/deploy.sh b/deploy.sh
new file mode 100755
index 00000000..bf90a582
--- /dev/null
+++ b/deploy.sh
@@ -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
diff --git a/fhir-helpers/pom.xml b/fhir-helpers/pom.xml
index 03b2c50d..9bd4baf8 100644
--- a/fhir-helpers/pom.xml
+++ b/fhir-helpers/pom.xml
@@ -133,20 +133,11 @@
-
- false
- nexus-repo-releases
- Nexus Repository
- https://repository.elimuinformatics.com/repository/maven-releases/
- default
-
-
- true
- nexus-repo-snapshots
- Nexus Repository
- https://repository.elimuinformatics.com/repository/maven-snapshots/
- default
-
+
+ elimu-a2d2-api
+ elimu-a2d2-api
+ https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/
+
diff --git a/pom.xml b/pom.xml
index dce23171..918ba307 100644
--- a/pom.xml
+++ b/pom.xml
@@ -526,35 +526,10 @@
- false
- nexus-repo-releases
- Nexus Repository
- https://repository.elimuinformatics.com/repository/maven-releases/
- default
-
- true
- always
-
-
- true
- always
-
+ elimu-a2d2-api
+ elimu-a2d2-api
+ https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/
-
- true
- nexus-repo-snapshots
- Nexus Repository
- https://repository.elimuinformatics.com/repository/maven-snapshots/
- default
-
- true
- always
-
-
- true
- always
-
-
diff --git a/task-utilities/pom.xml b/task-utilities/pom.xml
index 87e001e0..6a91dda4 100644
--- a/task-utilities/pom.xml
+++ b/task-utilities/pom.xml
@@ -215,19 +215,10 @@
- false
- nexus-repo-releases
- Nexus Repository
- https://repository.elimuinformatics.com/repository/maven-releases/
- default
+ elimu-a2d2-api
+ elimu-a2d2-api
+ https://elimu-435911253355.d.codeartifact.us-west-2.amazonaws.com/maven/a2d2-api/
-
- true
- nexus-repo-snapshots
- Nexus Repository
- https://repository.elimuinformatics.com/repository/maven-snapshots/
- default
-
@@ -257,4 +248,3 @@
-