From 393393908d97d6137847173a156806b607977060 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Thu, 6 Feb 2025 22:20:27 +0530
Subject: [PATCH 01/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 39 +++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 .github/workflows/coop_test_ci_cd.yml
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
new file mode 100644
index 0000000000..b52c41c582
--- /dev/null
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -0,0 +1,39 @@
+name: Coop Test environment(QA) ci-cd workflow
+
+on:
+ push:
+ branches:
+ - coop-test
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: checkout code
+ uses: actions/checkout@v4
+
+ - name: setup JDK 11
+ uses: actions/setup-java@v4
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+
+ - name: Cache Maven Packages
+ uses: actions/cache@v3
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+
+ - name: Update JDBC Data Sources in persistence.xml
+ run: |
+ sed -i 's|${JDBC_DATASOURCE}|jdbc/ruhunu|' src/main/resources/META-INF/persistence.xml
+ sed -i 's|${JDBC_AUDIT_DATASOURCE}|jdbc/ruhunuAudit|' src/main/resources/META-INF/persistence.xml
+
+ - name: Verify JDBC Data Sources in persistence.xml
+ run: |
+ grep '' src/main/resources/META-INF/persistence.xml
+
+
From 66567c47ecbed7a699ce4270ca5a643c97459af9 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Thu, 6 Feb 2025 22:40:16 +0530
Subject: [PATCH 02/21] update workflow file of coop-test application
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 116 +++++++++++++++++++++++++-
1 file changed, 112 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index b52c41c582..94a14305dd 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -28,12 +28,120 @@ jobs:
${{ runner.os }}-maven-
- name: Update JDBC Data Sources in persistence.xml
- run: |
- sed -i 's|${JDBC_DATASOURCE}|jdbc/ruhunu|' src/main/resources/META-INF/persistence.xml
- sed -i 's|${JDBC_AUDIT_DATASOURCE}|jdbc/ruhunuAudit|' src/main/resources/META-INF/persistence.xml
+ run: |
+ sed -i 's|${JDBC_DATASOURCE}|jdbc/coop|' src/main/resources/META-INF/persistence.xml
+ sed -i 's|${JDBC_AUDIT_DATASOURCE}|jdbc/coopAudit|' src/main/resources/META-INF/persistence.xml
- name: Verify JDBC Data Sources in persistence.xml
- run: |
+ run: |
grep '' src/main/resources/META-INF/persistence.xml
+ - name: Build with Maven
+ run: mvn clean package -DskipTests
+
+ - name: Archive Build Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: build-artifacts
+ path: target/*.war
+ overwrite: true
+
+ # - name: Run Tests
+ # run: mvn test
+
+ deploy:
+ needs: build
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v3
+
+ - name: Download Build Artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: build-artifacts
+ path: ./
+
+ - name: Deploy to Payara
+ env:
+ SERVER_IP: ${{ secrets.QA_SERVER_IP }}
+ SERVER_USER: ${{ secrets.QA_SERVER_USER }}
+ SSH_PRIVATE_KEY: ${{ secrets.QA_SSH_PRIVATE_KEY }}
+ PAYARA_ADMIN_PASS: ${{ secrets.QA_PAYARA_ADMIN_PASS }}
+
+ run: |
+ # Add SSH private key to the SSH agent
+ echo "$SSH_PRIVATE_KEY" > private_key.pem
+ chmod 600 private_key.pem
+
+
+ # Variables
+ WAR_NAME="test-coop.war"
+ WAR_DIR="/home/appuser/app/latest"
+ APP_NAME="test-coop"
+ SUBDOMAIN="qa"
+
+
+ # Ensure deployment directory exists
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ mkdir -p $WAR_DIR
+ chown -R appuser:appuser $WAR_DIR
+ cd $WAR_DIR
+
+ # Remove old backup if it exists
+ if [ -f $WAR_NAME.old ]; then
+ rm $WAR_NAME.old
+ fi
+
+ # If the current WAR file exists, back it up
+ if [ -f $WAR_NAME ]; then
+ mv $WAR_NAME $WAR_NAME.old
+ fi
+ "
+
+ # Copy new WAR file to the server
+ rsync -aL --progress -e "ssh -i private_key.pem" ./*.war $SERVER_USER@$SERVER_IP:$WAR_DIR/$WAR_NAME
+
+ #Set the WAR file permission
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ chown appuser:appuser $WAR_DIR/$WAR_NAME
+ "
+
+ # Deploy the WAR using asadmin
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
+ /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt undeploy $APP_NAME || true
+ /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt deploy --force=true --contextroot $APP_NAME $WAR_DIR/$WAR_NAME
+ rm /tmp/payara-admin-pass.txt
+ "
+
+ # Validate if the application is running
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
+ if /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt list-applications | grep -q '$APP_NAME'; then
+ echo 'Application is running.'
+ else
+ echo 'Application failed to start.'
+ fi
+ rm /tmp/payara-admin-pass.txt
+ "
+
+ # Check if the application is reachable
+ for i in {1..5}; do
+ RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://$SUBDOMAIN.carecode.org/$APP_NAME/faces/index1.xhtml)
+ if [ "$RESPONSE_CODE" == "200" ]; then
+ echo "Application is reachable and healthy."
+ break
+ elif [ "$i" == "5" ]; then
+ echo "Application is not reachable or unhealthy at https://$SUBDOMAIN.carecode.org/$APP_NAME (HTTP $RESPONSE_CODE)"
+ break
+ fi
+ sleep 10
+ done
+
+ # Cleanup
+ rm -f private_key.pem
+
+
From eb41264cf18a50f8dad715080739e530730d32e9 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Thu, 6 Feb 2025 23:17:41 +0530
Subject: [PATCH 03/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index 94a14305dd..3ccc09f56d 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -79,7 +79,7 @@ jobs:
# Variables
WAR_NAME="test-coop.war"
WAR_DIR="/home/appuser/app/latest"
- APP_NAME="test-coop"
+ APP_NAME="coop-test"
SUBDOMAIN="qa"
From dc094c23f8c43f51256f51f7e193f63edbb342bd Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 00:48:17 +0530
Subject: [PATCH 04/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index 3ccc09f56d..e1ec776c15 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -1,4 +1,4 @@
-name: Coop Test environment(QA) ci-cd workflow
+name: Coop Test Environment(QA) CI-CD Workflow
on:
push:
From 78518d3ad7e8a4b38beefe91e6b8e4889843c5ca Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 00:51:27 +0530
Subject: [PATCH 05/21] Coop test ci cd workflow (#10434)
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* update workflow file of coop-test application
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---------
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 147 ++++++++++++++++++++++++++
1 file changed, 147 insertions(+)
create mode 100644 .github/workflows/coop_test_ci_cd.yml
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
new file mode 100644
index 0000000000..e1ec776c15
--- /dev/null
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -0,0 +1,147 @@
+name: Coop Test Environment(QA) CI-CD Workflow
+
+on:
+ push:
+ branches:
+ - coop-test
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: checkout code
+ uses: actions/checkout@v4
+
+ - name: setup JDK 11
+ uses: actions/setup-java@v4
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+
+ - name: Cache Maven Packages
+ uses: actions/cache@v3
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+
+ - name: Update JDBC Data Sources in persistence.xml
+ run: |
+ sed -i 's|${JDBC_DATASOURCE}|jdbc/coop|' src/main/resources/META-INF/persistence.xml
+ sed -i 's|${JDBC_AUDIT_DATASOURCE}|jdbc/coopAudit|' src/main/resources/META-INF/persistence.xml
+
+ - name: Verify JDBC Data Sources in persistence.xml
+ run: |
+ grep '' src/main/resources/META-INF/persistence.xml
+
+ - name: Build with Maven
+ run: mvn clean package -DskipTests
+
+ - name: Archive Build Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: build-artifacts
+ path: target/*.war
+ overwrite: true
+
+ # - name: Run Tests
+ # run: mvn test
+
+ deploy:
+ needs: build
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v3
+
+ - name: Download Build Artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: build-artifacts
+ path: ./
+
+ - name: Deploy to Payara
+ env:
+ SERVER_IP: ${{ secrets.QA_SERVER_IP }}
+ SERVER_USER: ${{ secrets.QA_SERVER_USER }}
+ SSH_PRIVATE_KEY: ${{ secrets.QA_SSH_PRIVATE_KEY }}
+ PAYARA_ADMIN_PASS: ${{ secrets.QA_PAYARA_ADMIN_PASS }}
+
+ run: |
+ # Add SSH private key to the SSH agent
+ echo "$SSH_PRIVATE_KEY" > private_key.pem
+ chmod 600 private_key.pem
+
+
+ # Variables
+ WAR_NAME="test-coop.war"
+ WAR_DIR="/home/appuser/app/latest"
+ APP_NAME="coop-test"
+ SUBDOMAIN="qa"
+
+
+ # Ensure deployment directory exists
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ mkdir -p $WAR_DIR
+ chown -R appuser:appuser $WAR_DIR
+ cd $WAR_DIR
+
+ # Remove old backup if it exists
+ if [ -f $WAR_NAME.old ]; then
+ rm $WAR_NAME.old
+ fi
+
+ # If the current WAR file exists, back it up
+ if [ -f $WAR_NAME ]; then
+ mv $WAR_NAME $WAR_NAME.old
+ fi
+ "
+
+ # Copy new WAR file to the server
+ rsync -aL --progress -e "ssh -i private_key.pem" ./*.war $SERVER_USER@$SERVER_IP:$WAR_DIR/$WAR_NAME
+
+ #Set the WAR file permission
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ chown appuser:appuser $WAR_DIR/$WAR_NAME
+ "
+
+ # Deploy the WAR using asadmin
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
+ /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt undeploy $APP_NAME || true
+ /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt deploy --force=true --contextroot $APP_NAME $WAR_DIR/$WAR_NAME
+ rm /tmp/payara-admin-pass.txt
+ "
+
+ # Validate if the application is running
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
+ if /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt list-applications | grep -q '$APP_NAME'; then
+ echo 'Application is running.'
+ else
+ echo 'Application failed to start.'
+ fi
+ rm /tmp/payara-admin-pass.txt
+ "
+
+ # Check if the application is reachable
+ for i in {1..5}; do
+ RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://$SUBDOMAIN.carecode.org/$APP_NAME/faces/index1.xhtml)
+ if [ "$RESPONSE_CODE" == "200" ]; then
+ echo "Application is reachable and healthy."
+ break
+ elif [ "$i" == "5" ]; then
+ echo "Application is not reachable or unhealthy at https://$SUBDOMAIN.carecode.org/$APP_NAME (HTTP $RESPONSE_CODE)"
+ break
+ fi
+ sleep 10
+ done
+
+ # Cleanup
+ rm -f private_key.pem
+
+
+
From 27d3b10f46f3494c10d29be8ed870a1ab37758ef Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 00:55:47 +0530
Subject: [PATCH 06/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index e1ec776c15..322d70bce3 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -25,7 +25,7 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
- ${{ runner.os }}-maven-
+ ${{ runner.os }}-maven-
- name: Update JDBC Data Sources in persistence.xml
run: |
From 0f2bd7e98993eb290ddd2374fe729d26fdfa08e2 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 01:05:24 +0530
Subject: [PATCH 07/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index 322d70bce3..40c9be4338 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -57,20 +57,20 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v3
- - name: Download Build Artifact
+ - name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: ./
- - name: Deploy to Payara
+ - name: Deploy to Payara
env:
SERVER_IP: ${{ secrets.QA_SERVER_IP }}
SERVER_USER: ${{ secrets.QA_SERVER_USER }}
SSH_PRIVATE_KEY: ${{ secrets.QA_SSH_PRIVATE_KEY }}
PAYARA_ADMIN_PASS: ${{ secrets.QA_PAYARA_ADMIN_PASS }}
- run: |
+ run: |
# Add SSH private key to the SSH agent
echo "$SSH_PRIVATE_KEY" > private_key.pem
chmod 600 private_key.pem
From 2cd89cea607300a6b5e19df94434c48eb12618a7 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 01:10:13 +0530
Subject: [PATCH 08/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index da9f89bb58..b60355a3b8 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -142,7 +142,7 @@ jobs:
done
# Cleanup
- rm -f private_key.pem
+ rm -f private_key.pem
From 07e5d5385a3ebb7f771dbd9d20decf17e46afec3 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 01:28:25 +0530
Subject: [PATCH 09/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 288 +++++++++++++-------------
1 file changed, 145 insertions(+), 143 deletions(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index b60355a3b8..6321248be9 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -1,148 +1,150 @@
name: Coop Test Environment(QA) CI-CD Workflow
-on:
- push:
- branches:
- - coop-test
-
+on:
+ push:
+ branches:
+ - coop-test
+
jobs:
- build:
- runs-on: ubuntu-latest
-
- steps:
- - name: checkout code
- uses: actions/checkout@v4
-
- - name: setup JDK 11
- uses: actions/setup-java@v4
- with:
- distribution: 'temurin'
- java-version: '11'
-
- - name: Cache Maven Packages
- uses: actions/cache@v3
- with:
- path: ~/.m2
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
-
-
- - name: Update JDBC Data Sources in persistence.xml
- run: |
- sed -i 's|${JDBC_DATASOURCE}|jdbc/coop|' src/main/resources/META-INF/persistence.xml
- sed -i 's|${JDBC_AUDIT_DATASOURCE}|jdbc/coopAudit|' src/main/resources/META-INF/persistence.xml
-
- - name: Verify JDBC Data Sources in persistence.xml
- run: |
- grep '' src/main/resources/META-INF/persistence.xml
-
- - name: Build with Maven
- run: mvn clean package -DskipTests
-
- - name: Archive Build Artifacts
- uses: actions/upload-artifact@v4
- with:
- name: build-artifacts
- path: target/*.war
- overwrite: true
-
- # - name: Run Tests
- # run: mvn test
-
- deploy:
- needs: build
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout Code
- uses: actions/checkout@v3
-
- - name: Download Build Artifact
- uses: actions/download-artifact@v4
- with:
- name: build-artifacts
- path: ./
-
- - name: Deploy to Payara
- env:
- SERVER_IP: ${{ secrets.QA_SERVER_IP }}
- SERVER_USER: ${{ secrets.QA_SERVER_USER }}
- SSH_PRIVATE_KEY: ${{ secrets.QA_SSH_PRIVATE_KEY }}
- PAYARA_ADMIN_PASS: ${{ secrets.QA_PAYARA_ADMIN_PASS }}
-
- run: |
- # Add SSH private key to the SSH agent
- echo "$SSH_PRIVATE_KEY" > private_key.pem
- chmod 600 private_key.pem
-
-
- # Variables
- WAR_NAME="test-coop.war"
- WAR_DIR="/home/appuser/app/latest"
- APP_NAME="coop-test"
- SUBDOMAIN="qa"
-
-
- # Ensure deployment directory exists
- ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
- mkdir -p $WAR_DIR
- chown -R appuser:appuser $WAR_DIR
- cd $WAR_DIR
-
- # Remove old backup if it exists
- if [ -f $WAR_NAME.old ]; then
- rm $WAR_NAME.old
- fi
-
- # If the current WAR file exists, back it up
- if [ -f $WAR_NAME ]; then
- mv $WAR_NAME $WAR_NAME.old
- fi
- "
-
- # Copy new WAR file to the server
- rsync -aL --progress -e "ssh -i private_key.pem" ./*.war $SERVER_USER@$SERVER_IP:$WAR_DIR/$WAR_NAME
-
- #Set the WAR file permission
- ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
- chown appuser:appuser $WAR_DIR/$WAR_NAME
- "
-
- # Deploy the WAR using asadmin
- ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
- echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
- /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt undeploy $APP_NAME || true
- /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt deploy --force=true --contextroot $APP_NAME $WAR_DIR/$WAR_NAME
- rm /tmp/payara-admin-pass.txt
- "
-
- # Validate if the application is running
- ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
- echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
- if /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt list-applications | grep -q '$APP_NAME'; then
- echo 'Application is running.'
- else
- echo 'Application failed to start.'
- fi
- rm /tmp/payara-admin-pass.txt
- "
-
- # Check if the application is reachable
- for i in {1..5}; do
- RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://$SUBDOMAIN.carecode.org/$APP_NAME/faces/index1.xhtml)
- if [ "$RESPONSE_CODE" == "200" ]; then
- echo "Application is reachable and healthy."
- break
- elif [ "$i" == "5" ]; then
- echo "Application is not reachable or unhealthy at https://$SUBDOMAIN.carecode.org/$APP_NAME (HTTP $RESPONSE_CODE)"
- break
- fi
- sleep 10
- done
-
- # Cleanup
- rm -f private_key.pem
-
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v3
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+
+ - name: Cache Maven Packages
+ uses: actions/cache@v3
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+
+ - name: Update JDBC Data Sources in persistence.xml
+ run: |
+ sed -i 's|${JDBC_DATASOURCE}|jdbc/coop|' src/main/resources/META-INF/persistence.xml
+ sed -i 's|${JDBC_AUDIT_DATASOURCE}|jdbc/coopAudit|' src/main/resources/META-INF/persistence.xml
+
+ - name: Verify JDBC Data Sources in persistence.xml
+ run: |
+ grep '' src/main/resources/META-INF/persistence.xml
+
+ - name: Build with Maven
+ run: mvn clean package -DskipTests
+
+ - name: Archive Build Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: build-artifacts
+ path: target/*.war
+ overwrite: true
+
+ # - name: Run Tests
+ # run: mvn test
+
+ deploy:
+ needs: build
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v3
+
+ - name: Download Build Artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: build-artifacts
+ path: ./
+
+ - name: Deploy to Payara
+ env:
+ SERVER_IP: ${{ secrets.QA_SERVER_IP }}
+ SERVER_USER: ${{ secrets.QA_SERVER_USER }}
+ SSH_PRIVATE_KEY: ${{ secrets.QA_SSH_PRIVATE_KEY }}
+ PAYARA_ADMIN_PASS: ${{ secrets.QA_PAYARA_ADMIN_PASS }}
+ run: |
+ # Add SSH private key to the SSH agent
+ echo "$SSH_PRIVATE_KEY" > private_key.pem
+ chmod 600 private_key.pem
+
+ # Variables
+ WAR_NAME="test-coop.war"
+ WAR_DIR="/home/appuser/app/latest"
+ APP_NAME="coop-test"
+ SUBDOMAIN="qa"
+
+ # Ensure deployment directory exists
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ mkdir -p $WAR_DIR
+ chown -R appuser:appuser $WAR_DIR
+ cd $WAR_DIR
+
+ # Remove old backup if it exists
+ if [ -f $WAR_NAME.old ]; then
+ rm $WAR_NAME.old
+ fi
+
+ # If the current WAR file exists, back it up
+ if [ -f $WAR_NAME ]; then
+ mv $WAR_NAME $WAR_NAME.old
+ fi
+ "
+
+ # Copy new WAR file to the server
+ rsync -aL --progress -e "ssh -i private_key.pem" ./*.war $SERVER_USER@$SERVER_IP:$WAR_DIR/$WAR_NAME
+
+ # Set the WAR file permission
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ chown appuser:appuser $WAR_DIR/$WAR_NAME
+ "
+
+ # Deploy the WAR using asadmin
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
+ /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt undeploy $APP_NAME || true
+ /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt deploy --force=true --contextroot $APP_NAME $WAR_DIR/$WAR_NAME
+ rm /tmp/payara-admin-pass.txt
+ "
+
+ # Validate if the application is running
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
+ if /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt list-applications | grep -q '$APP_NAME'; then
+ echo 'Application is running.'
+ else
+ echo 'Application failed to start.'
+ fi
+ rm /tmp/payara-admin-pass.txt
+ "
+
+ # Check if the application is reachable
+ for i in {1..5}; do
+ RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://$SUBDOMAIN.carecode.org/$APP_NAME/faces/index1.xhtml)
+ if [ "$RESPONSE_CODE" == "200" ]; then
+ echo "Application is reachable and healthy."
+ break
+ elif [ "$i" == "5" ]; then
+ echo "Application is not reachable or unhealthy at https://$SUBDOMAIN.carecode.org/$APP_NAME (HTTP $RESPONSE_CODE)"
+ break
+ fi
+ sleep 10
+ done
+
+ # Cleanup
+ rm -f private_key.pem
+
+
+
+
+
+
+
From f7972c491bedcbd38dd5d013897461e6049b5311 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 01:32:14 +0530
Subject: [PATCH 10/21] Coop test ci cd workflow (#10438)
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* update workflow file of coop-test application
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Coop test ci cd workflow (#10434)
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* update workflow file of coop-test application
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---------
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---------
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 150 ++++++++++++++++++++++++++
1 file changed, 150 insertions(+)
create mode 100644 .github/workflows/coop_test_ci_cd.yml
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
new file mode 100644
index 0000000000..6321248be9
--- /dev/null
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -0,0 +1,150 @@
+name: Coop Test Environment(QA) CI-CD Workflow
+
+on:
+ push:
+ branches:
+ - coop-test
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v3
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+
+ - name: Cache Maven Packages
+ uses: actions/cache@v3
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+
+ - name: Update JDBC Data Sources in persistence.xml
+ run: |
+ sed -i 's|${JDBC_DATASOURCE}|jdbc/coop|' src/main/resources/META-INF/persistence.xml
+ sed -i 's|${JDBC_AUDIT_DATASOURCE}|jdbc/coopAudit|' src/main/resources/META-INF/persistence.xml
+
+ - name: Verify JDBC Data Sources in persistence.xml
+ run: |
+ grep '' src/main/resources/META-INF/persistence.xml
+
+ - name: Build with Maven
+ run: mvn clean package -DskipTests
+
+ - name: Archive Build Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: build-artifacts
+ path: target/*.war
+ overwrite: true
+
+ # - name: Run Tests
+ # run: mvn test
+
+ deploy:
+ needs: build
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v3
+
+ - name: Download Build Artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: build-artifacts
+ path: ./
+
+ - name: Deploy to Payara
+ env:
+ SERVER_IP: ${{ secrets.QA_SERVER_IP }}
+ SERVER_USER: ${{ secrets.QA_SERVER_USER }}
+ SSH_PRIVATE_KEY: ${{ secrets.QA_SSH_PRIVATE_KEY }}
+ PAYARA_ADMIN_PASS: ${{ secrets.QA_PAYARA_ADMIN_PASS }}
+ run: |
+ # Add SSH private key to the SSH agent
+ echo "$SSH_PRIVATE_KEY" > private_key.pem
+ chmod 600 private_key.pem
+
+ # Variables
+ WAR_NAME="test-coop.war"
+ WAR_DIR="/home/appuser/app/latest"
+ APP_NAME="coop-test"
+ SUBDOMAIN="qa"
+
+ # Ensure deployment directory exists
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ mkdir -p $WAR_DIR
+ chown -R appuser:appuser $WAR_DIR
+ cd $WAR_DIR
+
+ # Remove old backup if it exists
+ if [ -f $WAR_NAME.old ]; then
+ rm $WAR_NAME.old
+ fi
+
+ # If the current WAR file exists, back it up
+ if [ -f $WAR_NAME ]; then
+ mv $WAR_NAME $WAR_NAME.old
+ fi
+ "
+
+ # Copy new WAR file to the server
+ rsync -aL --progress -e "ssh -i private_key.pem" ./*.war $SERVER_USER@$SERVER_IP:$WAR_DIR/$WAR_NAME
+
+ # Set the WAR file permission
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ chown appuser:appuser $WAR_DIR/$WAR_NAME
+ "
+
+ # Deploy the WAR using asadmin
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
+ /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt undeploy $APP_NAME || true
+ /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt deploy --force=true --contextroot $APP_NAME $WAR_DIR/$WAR_NAME
+ rm /tmp/payara-admin-pass.txt
+ "
+
+ # Validate if the application is running
+ ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
+ echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
+ if /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt list-applications | grep -q '$APP_NAME'; then
+ echo 'Application is running.'
+ else
+ echo 'Application failed to start.'
+ fi
+ rm /tmp/payara-admin-pass.txt
+ "
+
+ # Check if the application is reachable
+ for i in {1..5}; do
+ RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://$SUBDOMAIN.carecode.org/$APP_NAME/faces/index1.xhtml)
+ if [ "$RESPONSE_CODE" == "200" ]; then
+ echo "Application is reachable and healthy."
+ break
+ elif [ "$i" == "5" ]; then
+ echo "Application is not reachable or unhealthy at https://$SUBDOMAIN.carecode.org/$APP_NAME (HTTP $RESPONSE_CODE)"
+ break
+ fi
+ sleep 10
+ done
+
+ # Cleanup
+ rm -f private_key.pem
+
+
+
+
+
+
+
+
+
From 3783bae5585326c7eaf900a62f26e52de1e6b033 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 01:49:38 +0530
Subject: [PATCH 11/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index 6321248be9..aa31b2b2af 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -77,8 +77,9 @@ jobs:
# Variables
WAR_NAME="test-coop.war"
WAR_DIR="/home/appuser/app/latest"
- APP_NAME="coop-test"
+ APP_NAME="test-coop"
SUBDOMAIN="qa"
+ CONTEXT_PATH="coop-test"
# Ensure deployment directory exists
ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
@@ -109,7 +110,7 @@ jobs:
ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
/opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt undeploy $APP_NAME || true
- /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt deploy --force=true --contextroot $APP_NAME $WAR_DIR/$WAR_NAME
+ /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt deploy --force=true --contextroot $CONTEXT_PATH $WAR_DIR/$WAR_NAME
rm /tmp/payara-admin-pass.txt
"
@@ -126,12 +127,12 @@ jobs:
# Check if the application is reachable
for i in {1..5}; do
- RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://$SUBDOMAIN.carecode.org/$APP_NAME/faces/index1.xhtml)
+ RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://$SUBDOMAIN.carecode.org/$CONTEXT_PATH/faces/index1.xhtml)
if [ "$RESPONSE_CODE" == "200" ]; then
echo "Application is reachable and healthy."
break
elif [ "$i" == "5" ]; then
- echo "Application is not reachable or unhealthy at https://$SUBDOMAIN.carecode.org/$APP_NAME (HTTP $RESPONSE_CODE)"
+ echo "Application is not reachable or unhealthy at https://$SUBDOMAIN.carecode.org/$CONTEXT_PATH (HTTP $RESPONSE_CODE)"
break
fi
sleep 10
From c1f29ebe981ebea189fc81c7e9397c95fa794d63 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 01:51:53 +0530
Subject: [PATCH 12/21] Coop test ci cd workflow (#10439)
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* update workflow file of coop-test application
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Coop test ci cd workflow (#10434)
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* update workflow file of coop-test application
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---------
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---------
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index 6321248be9..7d30b71c76 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -77,8 +77,10 @@ jobs:
# Variables
WAR_NAME="test-coop.war"
WAR_DIR="/home/appuser/app/latest"
- APP_NAME="coop-test"
+ APP_NAME="test-coop"
SUBDOMAIN="qa"
+ CONTEXT_PATH="coop-test"
+
# Ensure deployment directory exists
ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
@@ -109,7 +111,7 @@ jobs:
ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
echo 'AS_ADMIN_PASSWORD=$PAYARA_ADMIN_PASS' > /tmp/payara-admin-pass.txt
/opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt undeploy $APP_NAME || true
- /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt deploy --force=true --contextroot $APP_NAME $WAR_DIR/$WAR_NAME
+ /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt deploy --force=true --contextroot $CONTEXT_PATH $WAR_DIR/$WAR_NAME
rm /tmp/payara-admin-pass.txt
"
@@ -126,12 +128,12 @@ jobs:
# Check if the application is reachable
for i in {1..5}; do
- RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://$SUBDOMAIN.carecode.org/$APP_NAME/faces/index1.xhtml)
+ RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://$SUBDOMAIN.carecode.org/$CONTEXT_PATH/faces/index1.xhtml)
if [ "$RESPONSE_CODE" == "200" ]; then
echo "Application is reachable and healthy."
break
elif [ "$i" == "5" ]; then
- echo "Application is not reachable or unhealthy at https://$SUBDOMAIN.carecode.org/$APP_NAME (HTTP $RESPONSE_CODE)"
+ echo "Application is not reachable or unhealthy at https://$SUBDOMAIN.carecode.org/$CONTEXT_PATH (HTTP $RESPONSE_CODE)"
break
fi
sleep 10
From cd5e099996e74c7e0daa03929a0690d6f6c8b866 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 02:04:48 +0530
Subject: [PATCH 13/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index aa31b2b2af..166256e4a8 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -77,7 +77,7 @@ jobs:
# Variables
WAR_NAME="test-coop.war"
WAR_DIR="/home/appuser/app/latest"
- APP_NAME="test-coop"
+ APP_NAME="test-coop-3.0.0"
SUBDOMAIN="qa"
CONTEXT_PATH="coop-test"
From 38b3aa4d084fad2e869ff5d687c1bd0893945567 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 02:06:47 +0530
Subject: [PATCH 14/21] Coop test ci cd workflow (#10440)
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* update workflow file of coop-test application
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Coop test ci cd workflow (#10434)
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* update workflow file of coop-test application
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---------
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---------
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index 7d30b71c76..94ddcb0f63 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -77,7 +77,7 @@ jobs:
# Variables
WAR_NAME="test-coop.war"
WAR_DIR="/home/appuser/app/latest"
- APP_NAME="test-coop"
+ APP_NAME="test-coop-3.0.0"
SUBDOMAIN="qa"
CONTEXT_PATH="coop-test"
From 1afa2d699d89e05fc3018721d92093b2066f0163 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 02:10:42 +0530
Subject: [PATCH 15/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index 94ddcb0f63..7d30b71c76 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -77,7 +77,7 @@ jobs:
# Variables
WAR_NAME="test-coop.war"
WAR_DIR="/home/appuser/app/latest"
- APP_NAME="test-coop-3.0.0"
+ APP_NAME="test-coop"
SUBDOMAIN="qa"
CONTEXT_PATH="coop-test"
From 8814dcfbc8f7109ff9ac9fe33c481cb69aca9ba6 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 02:12:00 +0530
Subject: [PATCH 16/21] Coop test ci cd workflow (#10441)
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* update workflow file of coop-test application
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Coop test ci cd workflow (#10434)
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* update workflow file of coop-test application
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---------
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
* Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
---------
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
From 323cd3fe27d1693050c32395b9358c0c23b0bb6b Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 02:17:29 +0530
Subject: [PATCH 17/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index 7d30b71c76..aa31b2b2af 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -81,7 +81,6 @@ jobs:
SUBDOMAIN="qa"
CONTEXT_PATH="coop-test"
-
# Ensure deployment directory exists
ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
mkdir -p $WAR_DIR
From c6c44df6db427b9f780d3559136e39eed19432f9 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 02:19:05 +0530
Subject: [PATCH 18/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index 166256e4a8..aa31b2b2af 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -77,7 +77,7 @@ jobs:
# Variables
WAR_NAME="test-coop.war"
WAR_DIR="/home/appuser/app/latest"
- APP_NAME="test-coop-3.0.0"
+ APP_NAME="test-coop"
SUBDOMAIN="qa"
CONTEXT_PATH="coop-test"
From eaf08e77839fcf1f5f3a8bf6502c6b5683cf0bfb Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 02:41:15 +0530
Subject: [PATCH 19/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index aa31b2b2af..25366cd9d4 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -75,7 +75,7 @@ jobs:
chmod 600 private_key.pem
# Variables
- WAR_NAME="test-coop.war"
+ WAR_NAME="coop-test.war"
WAR_DIR="/home/appuser/app/latest"
APP_NAME="test-coop"
SUBDOMAIN="qa"
From 8c8d9002fe5bb7fd941f4173a42e648082ebfe80 Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 02:43:53 +0530
Subject: [PATCH 20/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index 25366cd9d4..fb3dfb4984 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -77,7 +77,7 @@ jobs:
# Variables
WAR_NAME="coop-test.war"
WAR_DIR="/home/appuser/app/latest"
- APP_NAME="test-coop"
+ APP_NAME="coop-test"
SUBDOMAIN="qa"
CONTEXT_PATH="coop-test"
From 007578b9c16cfcb94ff0f81b49ae7576e0c8947d Mon Sep 17 00:00:00 2001
From: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
Date: Fri, 7 Feb 2025 02:47:41 +0530
Subject: [PATCH 21/21] Signed-off-by: Chinthaka Prasad Wijerathna
<118891516+ChinthakaPrasad@users.noreply.github.com>
---
.github/workflows/coop_test_ci_cd.yml | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/.github/workflows/coop_test_ci_cd.yml b/.github/workflows/coop_test_ci_cd.yml
index fb3dfb4984..206fef5071 100644
--- a/.github/workflows/coop_test_ci_cd.yml
+++ b/.github/workflows/coop_test_ci_cd.yml
@@ -140,12 +140,4 @@ jobs:
# Cleanup
rm -f private_key.pem
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file