From 3726b316c63a64ea89abd5385b80013094976997 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 15 Oct 2024 19:19:03 +0200 Subject: [PATCH 01/17] Prepare next release 6.4.0-SNAPSHOT --- cellbase-app/pom.xml | 2 +- cellbase-client/pom.xml | 2 +- cellbase-core/pom.xml | 2 +- cellbase-lib/pom.xml | 2 +- cellbase-server/pom.xml | 2 +- pom.xml | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cellbase-app/pom.xml b/cellbase-app/pom.xml index a66c3db4b..3edac67f2 100644 --- a/cellbase-app/pom.xml +++ b/cellbase-app/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.3.0 + 6.4.0-SNAPSHOT ../pom.xml diff --git a/cellbase-client/pom.xml b/cellbase-client/pom.xml index 7fa9cf92f..223f6ffc1 100644 --- a/cellbase-client/pom.xml +++ b/cellbase-client/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.3.0 + 6.4.0-SNAPSHOT ../pom.xml diff --git a/cellbase-core/pom.xml b/cellbase-core/pom.xml index 08051e82c..1155a2d4a 100644 --- a/cellbase-core/pom.xml +++ b/cellbase-core/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.3.0 + 6.4.0-SNAPSHOT ../pom.xml diff --git a/cellbase-lib/pom.xml b/cellbase-lib/pom.xml index 10076ad8d..bfab3e071 100644 --- a/cellbase-lib/pom.xml +++ b/cellbase-lib/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.3.0 + 6.4.0-SNAPSHOT ../pom.xml diff --git a/cellbase-server/pom.xml b/cellbase-server/pom.xml index 02204b0cc..b02482126 100644 --- a/cellbase-server/pom.xml +++ b/cellbase-server/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.3.0 + 6.4.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 6e035de53..3357252e6 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.3.0 + 6.4.0-SNAPSHOT pom CellBase project @@ -23,8 +23,8 @@ ${project.version} - 5.3.0 - 3.3.0 + 5.4.0-SNAPSHOT + 3.4.0-SNAPSHOT 0.1.0 2.11.4 1.9.13 From 36fee3403739c16ca3da02e5bdd021b1813b251f Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 8 Jan 2025 16:04:30 +0100 Subject: [PATCH 02/17] cicd: added if github.event.review.state approved #TASK-7301 --- .github/workflows/pull-request-approved.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index ba378d3ab..6363b4202 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -7,6 +7,7 @@ on: jobs: calculate-xetabase-branch: + if: github.event.review.state == 'approved' name: Calculate Xetabase branch runs-on: ubuntu-22.04 outputs: @@ -31,6 +32,7 @@ jobs: ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }} test: + if: github.event.review.state == 'approved' name: "Run all tests before merging" needs: calculate-xetabase-branch uses: opencb/java-common-libs/.github/workflows/test-xetabase-workflow.yml@develop From 5fa131cccd6a6f3c3f1ddcc8376ecf0f0c238093 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 28 Jan 2025 09:25:48 +0100 Subject: [PATCH 03/17] Prepare release 6.4.0 --- cellbase-app/pom.xml | 2 +- cellbase-client/pom.xml | 2 +- cellbase-core/pom.xml | 2 +- cellbase-lib/pom.xml | 2 +- cellbase-server/pom.xml | 2 +- pom.xml | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cellbase-app/pom.xml b/cellbase-app/pom.xml index 3edac67f2..c6881f1c4 100644 --- a/cellbase-app/pom.xml +++ b/cellbase-app/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 ../pom.xml diff --git a/cellbase-client/pom.xml b/cellbase-client/pom.xml index 223f6ffc1..9be53f3ad 100644 --- a/cellbase-client/pom.xml +++ b/cellbase-client/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 ../pom.xml diff --git a/cellbase-core/pom.xml b/cellbase-core/pom.xml index 1155a2d4a..869198a5e 100644 --- a/cellbase-core/pom.xml +++ b/cellbase-core/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 ../pom.xml diff --git a/cellbase-lib/pom.xml b/cellbase-lib/pom.xml index bfab3e071..519cf7116 100644 --- a/cellbase-lib/pom.xml +++ b/cellbase-lib/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 ../pom.xml diff --git a/cellbase-server/pom.xml b/cellbase-server/pom.xml index b02482126..a6b1f539e 100644 --- a/cellbase-server/pom.xml +++ b/cellbase-server/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 ../pom.xml diff --git a/pom.xml b/pom.xml index 3357252e6..b70c87e6e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 pom CellBase project @@ -23,8 +23,8 @@ ${project.version} - 5.4.0-SNAPSHOT - 3.4.0-SNAPSHOT + 5.4.0 + 3.4.0 0.1.0 2.11.4 1.9.13 From 5249e5906665ba9eb79f3cb1045afc66883c982d Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 28 Jan 2025 09:26:28 +0100 Subject: [PATCH 04/17] Prepare next release 6.5.0-SNAPSHOT --- cellbase-app/pom.xml | 2 +- cellbase-client/pom.xml | 2 +- cellbase-core/pom.xml | 2 +- cellbase-lib/pom.xml | 2 +- cellbase-server/pom.xml | 2 +- pom.xml | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cellbase-app/pom.xml b/cellbase-app/pom.xml index c6881f1c4..244646d0d 100644 --- a/cellbase-app/pom.xml +++ b/cellbase-app/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 6.5.0-SNAPSHOT ../pom.xml diff --git a/cellbase-client/pom.xml b/cellbase-client/pom.xml index 9be53f3ad..7e89bbe9d 100644 --- a/cellbase-client/pom.xml +++ b/cellbase-client/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 6.5.0-SNAPSHOT ../pom.xml diff --git a/cellbase-core/pom.xml b/cellbase-core/pom.xml index 869198a5e..c5fe18a0e 100644 --- a/cellbase-core/pom.xml +++ b/cellbase-core/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 6.5.0-SNAPSHOT ../pom.xml diff --git a/cellbase-lib/pom.xml b/cellbase-lib/pom.xml index 519cf7116..9a6de7901 100644 --- a/cellbase-lib/pom.xml +++ b/cellbase-lib/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 6.5.0-SNAPSHOT ../pom.xml diff --git a/cellbase-server/pom.xml b/cellbase-server/pom.xml index a6b1f539e..56d8e33f3 100644 --- a/cellbase-server/pom.xml +++ b/cellbase-server/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 6.5.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index b70c87e6e..9f0c8d7c5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 6.5.0-SNAPSHOT pom CellBase project @@ -23,8 +23,8 @@ ${project.version} - 5.4.0 - 3.4.0 + 5.5.0-SNAPSHOT + 3.5.0-SNAPSHOT 0.1.0 2.11.4 1.9.13 From 7f2166c9e331d88c88d3d911523e2ed8e05fd327 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 28 Jan 2025 16:10:45 +0100 Subject: [PATCH 05/17] Prepare release 6.4.0 --- cellbase-app/pom.xml | 2 +- cellbase-client/pom.xml | 2 +- cellbase-core/pom.xml | 2 +- cellbase-lib/pom.xml | 2 +- cellbase-server/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cellbase-app/pom.xml b/cellbase-app/pom.xml index 244646d0d..3edac67f2 100644 --- a/cellbase-app/pom.xml +++ b/cellbase-app/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.5.0-SNAPSHOT + 6.4.0-SNAPSHOT ../pom.xml diff --git a/cellbase-client/pom.xml b/cellbase-client/pom.xml index 7e89bbe9d..223f6ffc1 100644 --- a/cellbase-client/pom.xml +++ b/cellbase-client/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.5.0-SNAPSHOT + 6.4.0-SNAPSHOT ../pom.xml diff --git a/cellbase-core/pom.xml b/cellbase-core/pom.xml index c5fe18a0e..1155a2d4a 100644 --- a/cellbase-core/pom.xml +++ b/cellbase-core/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.5.0-SNAPSHOT + 6.4.0-SNAPSHOT ../pom.xml diff --git a/cellbase-lib/pom.xml b/cellbase-lib/pom.xml index 9a6de7901..bfab3e071 100644 --- a/cellbase-lib/pom.xml +++ b/cellbase-lib/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.5.0-SNAPSHOT + 6.4.0-SNAPSHOT ../pom.xml diff --git a/cellbase-server/pom.xml b/cellbase-server/pom.xml index 56d8e33f3..b02482126 100644 --- a/cellbase-server/pom.xml +++ b/cellbase-server/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.5.0-SNAPSHOT + 6.4.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 9f0c8d7c5..979ea24c5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.5.0-SNAPSHOT + 6.4.0-SNAPSHOT pom CellBase project From 5ca6a8371a77f0f313142d38abef6bb93c897568 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 28 Jan 2025 16:11:29 +0100 Subject: [PATCH 06/17] Prepare release 6.4.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 979ea24c5..60f865670 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ ${project.version} - 5.5.0-SNAPSHOT + 5.4.0-SNAPSHOT 3.5.0-SNAPSHOT 0.1.0 2.11.4 From ddd0572a7ba741dfbaea660387a380d99dcb7bca Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 28 Jan 2025 20:48:17 +0100 Subject: [PATCH 07/17] pom server: Modify pom.xml to include a classifier for the WAR file, ensuring no conflicts during the packaging process. #TASK-7362 --- cellbase-server/pom.xml | 45 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/cellbase-server/pom.xml b/cellbase-server/pom.xml index b02482126..9e349fd1d 100644 --- a/cellbase-server/pom.xml +++ b/cellbase-server/pom.xml @@ -139,42 +139,41 @@ 3.2.3 - make-a-war - compile + generate-war + package war + + cellbase.war + cellbase + + + src/main/webapp/WEB-INF/ + WEB-INF + true + + + - - ${CELLBASE.WAR.NAME} - - - src/main/webapp/WEB-INF/ - WEB-INF - true - - - + + org.apache.maven.plugins - maven-install-plugin - + maven-jar-plugin + 3.4.1 - install + generate-jar + package - install-file + jar - jar - ${project.groupId} - ${project.artifactId} - ${project.version} - - ${project.build.directory}/${project.artifactId}-${project.version}.jar - + + ${project.artifactId}-${project.version} From 2c24611db7dbf46dd7287a310ac87483b1b79492 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 28 Jan 2025 20:53:39 +0100 Subject: [PATCH 08/17] pom server: Modify pom.xml to include a classifier for the WAR file, ensuring no conflicts during the packaging process. #TASK-7362 --- cellbase-server/pom.xml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/cellbase-server/pom.xml b/cellbase-server/pom.xml index 9e349fd1d..7b873e89f 100644 --- a/cellbase-server/pom.xml +++ b/cellbase-server/pom.xml @@ -158,26 +158,6 @@ - - - - org.apache.maven.plugins - maven-jar-plugin - 3.4.1 - - - generate-jar - package - - jar - - - - ${project.artifactId}-${project.version} - - - - From 815b18bbc636d28e05dd01d7166dccb76e5318a6 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 29 Jan 2025 09:44:35 +0100 Subject: [PATCH 09/17] pom server: Modify pom.xml to include a classifier for the jar file and change packaging to war. #TASK-7362 --- cellbase-server/pom.xml | 108 +++++++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 47 deletions(-) diff --git a/cellbase-server/pom.xml b/cellbase-server/pom.xml index b02482126..599b956bc 100644 --- a/cellbase-server/pom.xml +++ b/cellbase-server/pom.xml @@ -11,7 +11,7 @@ cellbase-server - jar + war @@ -133,52 +133,66 @@ src/main/java - - org.apache.maven.plugins - maven-war-plugin - 3.2.3 - - - make-a-war - compile - - war - - - - - ${CELLBASE.WAR.NAME} - - - src/main/webapp/WEB-INF/ - WEB-INF - true - - - - - - org.apache.maven.plugins - maven-install-plugin - - - - install - - install-file - - - jar - ${project.groupId} - ${project.artifactId} - ${project.version} - - ${project.build.directory}/${project.artifactId}-${project.version}.jar - - - - - + + org.apache.maven.plugins + maven-war-plugin + 3.2.3 + + cellbase + + + src/main/webapp/WEB-INF/ + WEB-INF + true + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.0 + + + make-a-jar + package + + jar + + + ${project.version} + ${project.artifactId} + + + + + + + + org.apache.maven.plugins + maven-install-plugin + 3.1.1 + + + install-jar + install + + install-file + + + jar + ${project.groupId} + ${project.artifactId} + ${project.version} + + ${project.build.directory}/${project.artifactId}-${project.version}.jar + + + + + From abda10e4ce2c41c83eafba71c627abbc35d36e3e Mon Sep 17 00:00:00 2001 From: imedina Date: Wed, 29 Jan 2025 09:39:44 +0000 Subject: [PATCH 10/17] pom: create server JAR file --- cellbase-server/pom.xml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cellbase-server/pom.xml b/cellbase-server/pom.xml index 6c9daa2f5..e04657ca1 100644 --- a/cellbase-server/pom.xml +++ b/cellbase-server/pom.xml @@ -148,27 +148,21 @@ - - org.apache.maven.plugins maven-jar-plugin - 3.2.0 make-a-jar - package + compile jar - - ${project.version} - ${project.artifactId} - + org.apache.maven.plugins From d3236aa8cf937c6d33003a448356a448173daf36 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 29 Jan 2025 11:22:25 +0100 Subject: [PATCH 11/17] Restore variable CELLBASE.WAR.NAME #TASK-7362 --- cellbase-server/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cellbase-server/pom.xml b/cellbase-server/pom.xml index e04657ca1..1377febeb 100644 --- a/cellbase-server/pom.xml +++ b/cellbase-server/pom.xml @@ -138,7 +138,7 @@ maven-war-plugin 3.2.3 - cellbase + ${CELLBASE.WAR.NAME} src/main/webapp/WEB-INF/ From 9779cfe5477e2b56c80ab62ca04c6fc815b896e6 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 29 Jan 2025 16:28:25 +0100 Subject: [PATCH 12/17] Prepare release 6.4.0 --- cellbase-app/pom.xml | 2 +- cellbase-client/pom.xml | 2 +- cellbase-core/pom.xml | 2 +- cellbase-lib/pom.xml | 2 +- cellbase-server/pom.xml | 2 +- pom.xml | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cellbase-app/pom.xml b/cellbase-app/pom.xml index 3edac67f2..c6881f1c4 100644 --- a/cellbase-app/pom.xml +++ b/cellbase-app/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 ../pom.xml diff --git a/cellbase-client/pom.xml b/cellbase-client/pom.xml index 223f6ffc1..9be53f3ad 100644 --- a/cellbase-client/pom.xml +++ b/cellbase-client/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 ../pom.xml diff --git a/cellbase-core/pom.xml b/cellbase-core/pom.xml index 1155a2d4a..869198a5e 100644 --- a/cellbase-core/pom.xml +++ b/cellbase-core/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 ../pom.xml diff --git a/cellbase-lib/pom.xml b/cellbase-lib/pom.xml index bfab3e071..519cf7116 100644 --- a/cellbase-lib/pom.xml +++ b/cellbase-lib/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 ../pom.xml diff --git a/cellbase-server/pom.xml b/cellbase-server/pom.xml index 1377febeb..e7f580261 100644 --- a/cellbase-server/pom.xml +++ b/cellbase-server/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 ../pom.xml diff --git a/pom.xml b/pom.xml index 60f865670..b70c87e6e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0-SNAPSHOT + 6.4.0 pom CellBase project @@ -23,8 +23,8 @@ ${project.version} - 5.4.0-SNAPSHOT - 3.5.0-SNAPSHOT + 5.4.0 + 3.4.0 0.1.0 2.11.4 1.9.13 From 4bd58154c6cb9485c7707f14fb03dc828e9ab5e5 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 6 Feb 2025 12:29:20 +0100 Subject: [PATCH 13/17] Prepare port patch v6.4.0 -> v7.0.0 #TASK-7214 --- cellbase-app/pom.xml | 2 +- cellbase-client/pom.xml | 2 +- cellbase-core/pom.xml | 2 +- cellbase-lib/pom.xml | 2 +- cellbase-server/pom.xml | 2 +- pom.xml | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cellbase-app/pom.xml b/cellbase-app/pom.xml index c6881f1c4..287782640 100644 --- a/cellbase-app/pom.xml +++ b/cellbase-app/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 7.0.0-SNAPSHOT ../pom.xml diff --git a/cellbase-client/pom.xml b/cellbase-client/pom.xml index 9be53f3ad..9fc6f72f0 100644 --- a/cellbase-client/pom.xml +++ b/cellbase-client/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 7.0.0-SNAPSHOT ../pom.xml diff --git a/cellbase-core/pom.xml b/cellbase-core/pom.xml index 869198a5e..f4659e275 100644 --- a/cellbase-core/pom.xml +++ b/cellbase-core/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 7.0.0-SNAPSHOT ../pom.xml diff --git a/cellbase-lib/pom.xml b/cellbase-lib/pom.xml index 519cf7116..514d84489 100644 --- a/cellbase-lib/pom.xml +++ b/cellbase-lib/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 7.0.0-SNAPSHOT ../pom.xml diff --git a/cellbase-server/pom.xml b/cellbase-server/pom.xml index e7f580261..76b4ecaad 100644 --- a/cellbase-server/pom.xml +++ b/cellbase-server/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 7.0.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index b70c87e6e..48f1e71ff 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.opencb.cellbase cellbase - 6.4.0 + 7.0.0-SNAPSHOT pom CellBase project @@ -23,8 +23,8 @@ ${project.version} - 5.4.0 - 3.4.0 + 6.0.0-SNAPSHOT + 4.0.0-SNAPSHOT 0.1.0 2.11.4 1.9.13 From 9cd431a2fbdb8bd33575ecf13319fe0d1b343b9a Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 12 Feb 2025 17:45:35 +0100 Subject: [PATCH 14/17] fix merge cicd #TASK-7214 --- .github/workflows/pull-request-approved.yml | 4 +-- .github/workflows/pull-request-merge.yml | 21 ++++++++++++--- .../workflows/scripts/get-xetabase-branch.sh | 26 ++++++++++--------- 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index 6363b4202..ef28bb91c 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -7,7 +7,6 @@ on: jobs: calculate-xetabase-branch: - if: github.event.review.state == 'approved' name: Calculate Xetabase branch runs-on: ubuntu-22.04 outputs: @@ -25,14 +24,13 @@ jobs: chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh echo "github.event.pull_request.base.ref: ${{ github.event.pull_request.base.ref }}" echo "github.event.pull_request.head.ref: ${{ github.event.pull_request.head.ref }}" - xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.base.ref }}) + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.base.ref }}) ${{ github.event.pull_request.head.ref }} echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT env: ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }} test: - if: github.event.review.state == 'approved' name: "Run all tests before merging" needs: calculate-xetabase-branch uses: opencb/java-common-libs/.github/workflows/test-xetabase-workflow.yml@develop diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 4b1c43c68..89c541098 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -10,7 +10,20 @@ on: jobs: delete-docker: - uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@develop - with: - cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }} - secrets: inherit + name: Execute delete docker image + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: '10' + - uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + - name: Delete in Docker Hub + run: | + echo "Deleting docker image ${{ github.head_ref }}" + python3 ./cellbase-app/app/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }} + + + diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index fd9626a79..11129eb96 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -3,35 +3,36 @@ # Function to calculate the corresponding branch of Xetabase project get_xetabase_branch() { # Input parameter (branch name) - input_branch="$1" + target_branch="$1" + current_branch="$1" # If the branch begins with 'TASK' and exists in the opencga-enterprise repository, I return it - if [[ $input_branch == TASK* ]]; then - if [ "$(git ls-remote "https://$ZETTA_REPO_ACCESS_TOKEN@github.com/zetta-genomics/opencga-enterprise.git" "$input_branch" )" ] ; then - echo $input_branch; + if [[ $current_branch == TASK* ]]; then + if [ "$(git ls-remote "https://$ZETTA_REPO_ACCESS_TOKEN@github.com/zetta-genomics/opencga-enterprise.git" "$target_branch" )" ] ; then + echo "$target_branch"; return 0; fi fi # Check if the branch name is "develop" in that case return the same branch name - if [[ "$input_branch" == "develop" ]]; then + if [[ "$target_branch" == "develop" ]]; then echo "develop" return 0 fi # Check if the branch name starts with "release-" and follows the patterns "release-a.x.x" or "release-a.b.x" - if [[ "$input_branch" =~ ^release-([0-9]+)\.x\.x$ ]] || [[ "$input_branch" =~ ^release-([0-9]+)\.([0-9]+)\.x$ ]]; then + if [[ "$target_branch" =~ ^release-([0-9]+)\.x\.x$ ]] || [[ "$target_branch" =~ ^release-([0-9]+)\.([0-9]+)\.x$ ]]; then # Extract the MAJOR part of the branch name MAJOR=${BASH_REMATCH[1]} - # Calculate the XETABASE_MAJOR by subtracting 4 from MAJOR of cellbase - XETABASE_MAJOR=$((MAJOR - 4)) + # Calculate the XETABASE_MAJOR by subtracting 1 from MAJOR of opencga + XETABASE_MAJOR=$((MAJOR - 1)) # Check if the XETABASE_MAJOR is negative if (( XETABASE_MAJOR < 0 )); then echo "Error: 'MAJOR' digit after subtraction results in a negative number." return 1 fi # Construct and echo the new branch name - echo "release-$XETABASE_MAJOR.${input_branch#release-$MAJOR.}" + echo "release-$XETABASE_MAJOR.${target_branch#release-$MAJOR.}" return 0 fi @@ -41,10 +42,11 @@ get_xetabase_branch() { } # Check if the script receives exactly one argument -if [ "$#" -ne 1 ]; then - echo "Usage: $0 " +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " exit 1 fi + # Call the function with the input branch name -get_xetabase_branch "$1" +get_xetabase_branch "$1" "$2" From 8b030143c0f80c22cf773ad9dee60e41e41e805b Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 12 Feb 2025 17:50:29 +0100 Subject: [PATCH 15/17] fix merge cicd #TASK-7214 --- .github/workflows/pull-request-approved.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index ef28bb91c..e88038ebb 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -24,7 +24,7 @@ jobs: chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh echo "github.event.pull_request.base.ref: ${{ github.event.pull_request.base.ref }}" echo "github.event.pull_request.head.ref: ${{ github.event.pull_request.head.ref }}" - xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.base.ref }}) ${{ github.event.pull_request.head.ref }} + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.base.ref }} ${{ github.event.pull_request.head.ref }}) echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT env: From e054d6a281446ff6cdbed3d53a508b9096f8e91a Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 12 Feb 2025 17:54:33 +0100 Subject: [PATCH 16/17] fix merge cicd #TASK-7214 --- .github/workflows/scripts/get-xetabase-branch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index 11129eb96..07a564434 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -8,8 +8,8 @@ get_xetabase_branch() { # If the branch begins with 'TASK' and exists in the opencga-enterprise repository, I return it if [[ $current_branch == TASK* ]]; then - if [ "$(git ls-remote "https://$ZETTA_REPO_ACCESS_TOKEN@github.com/zetta-genomics/opencga-enterprise.git" "$target_branch" )" ] ; then - echo "$target_branch"; + if [ "$(git ls-remote "https://$ZETTA_REPO_ACCESS_TOKEN@github.com/zetta-genomics/opencga-enterprise.git" "$current_branch" )" ] ; then + echo "$current_branch"; return 0; fi fi From cd28cbeeb4654930927634cdc26920a7ce0eb63c Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 12 Feb 2025 18:02:26 +0100 Subject: [PATCH 17/17] fix merge cicd #TASK-7214 --- .github/workflows/scripts/get-xetabase-branch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index 07a564434..cda90fd60 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -4,7 +4,7 @@ get_xetabase_branch() { # Input parameter (branch name) target_branch="$1" - current_branch="$1" + current_branch="$2" # If the branch begins with 'TASK' and exists in the opencga-enterprise repository, I return it if [[ $current_branch == TASK* ]]; then