From 4e859bd4cafbf9c8c5cdb003f9d34b72b80361c1 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Mon, 20 May 2024 15:37:02 +0200 Subject: [PATCH 01/10] Prepare release 3.1.0 --- biodata-external/pom.xml | 2 +- biodata-formats/pom.xml | 2 +- biodata-models/pom.xml | 2 +- biodata-tools/pom.xml | 2 +- pom.xml | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/biodata-external/pom.xml b/biodata-external/pom.xml index b4501e0a..46b50c19 100644 --- a/biodata-external/pom.xml +++ b/biodata-external/pom.xml @@ -6,7 +6,7 @@ biodata org.opencb.biodata - 3.1.0-SNAPSHOT + 3.1.0 ../pom.xml diff --git a/biodata-formats/pom.xml b/biodata-formats/pom.xml index f562bcdf..167e16df 100644 --- a/biodata-formats/pom.xml +++ b/biodata-formats/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.1.0-SNAPSHOT + 3.1.0 ../pom.xml diff --git a/biodata-models/pom.xml b/biodata-models/pom.xml index f5dbb058..fce0a389 100644 --- a/biodata-models/pom.xml +++ b/biodata-models/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.1.0-SNAPSHOT + 3.1.0 ../pom.xml diff --git a/biodata-tools/pom.xml b/biodata-tools/pom.xml index 2e7806d2..142deb3e 100644 --- a/biodata-tools/pom.xml +++ b/biodata-tools/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.1.0-SNAPSHOT + 3.1.0 ../pom.xml diff --git a/pom.xml b/pom.xml index c1ed8a30..8ae4a43a 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.1.0-SNAPSHOT + 3.1.0 pom Biodata @@ -38,7 +38,7 @@ - 5.1.0-SNAPSHOT + 5.1.0 2.14.3 4.4 From 4f31e8ea35c3885be22c61d950d8cc1c3969f126 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Mon, 20 May 2024 15:37:35 +0200 Subject: [PATCH 02/10] Prepare new development branch release-3.1.x --- biodata-external/pom.xml | 2 +- biodata-formats/pom.xml | 2 +- biodata-models/pom.xml | 2 +- biodata-tools/pom.xml | 2 +- pom.xml | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/biodata-external/pom.xml b/biodata-external/pom.xml index 46b50c19..c27bf0eb 100644 --- a/biodata-external/pom.xml +++ b/biodata-external/pom.xml @@ -6,7 +6,7 @@ biodata org.opencb.biodata - 3.1.0 + 3.2.0-SNAPSHOT ../pom.xml diff --git a/biodata-formats/pom.xml b/biodata-formats/pom.xml index 167e16df..e84416eb 100644 --- a/biodata-formats/pom.xml +++ b/biodata-formats/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.1.0 + 3.2.0-SNAPSHOT ../pom.xml diff --git a/biodata-models/pom.xml b/biodata-models/pom.xml index fce0a389..c7d21a5f 100644 --- a/biodata-models/pom.xml +++ b/biodata-models/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.1.0 + 3.2.0-SNAPSHOT ../pom.xml diff --git a/biodata-tools/pom.xml b/biodata-tools/pom.xml index 142deb3e..826ca18f 100644 --- a/biodata-tools/pom.xml +++ b/biodata-tools/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.1.0 + 3.2.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 8ae4a43a..e35210e0 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.1.0 + 3.2.0-SNAPSHOT pom Biodata @@ -38,7 +38,7 @@ - 5.1.0 + 5.2.0-SNAPSHOT 2.14.3 4.4 From 32692cc51404c4219a6e7c768f65a2afc71fbc8b Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 30 May 2024 17:47:06 +0200 Subject: [PATCH 03/10] cicd: Update action version to test for compatibility with test and release process #TASK-6264 --- .github/workflows/test-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-analysis.yml b/.github/workflows/test-analysis.yml index d460871a..e9df51ec 100644 --- a/.github/workflows/test-analysis.yml +++ b/.github/workflows/test-analysis.yml @@ -10,11 +10,11 @@ jobs: name: Test and push Sonar analysis runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: '0' - name: Set up JDK 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '11' From 697cbf040f34baf857576c756fc438a29f908f0b Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Fri, 14 Jun 2024 09:30:28 +0200 Subject: [PATCH 04/10] cicd: Pull request approve workflow #TASK-4970 --- .github/workflows/pull-request-approved.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/pull-request-approved.yml diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml new file mode 100644 index 00000000..eb410c9c --- /dev/null +++ b/.github/workflows/pull-request-approved.yml @@ -0,0 +1,15 @@ +name: Pull request approve workflow + +on: + pull_request_review: + types: [ submitted ] + +jobs: + build: + uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop + + test: + name: "Test analysis" + uses: ./.github/workflows/test-analysis.yml + needs: build + secrets: inherit From 0040bb2f6f7f83931d4b1d9216bc045e49f442cd Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Mon, 8 Jul 2024 16:43:25 +0200 Subject: [PATCH 05/10] pom: exclude distlib dependency #TASK-6481 --- biodata-tools/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/biodata-tools/pom.xml b/biodata-tools/pom.xml index 826ca18f..d63983d3 100644 --- a/biodata-tools/pom.xml +++ b/biodata-tools/pom.xml @@ -53,6 +53,12 @@ com.databricks SnpEff + + + distlib + distlib + + org.rocksdb From 8ce273a5a93e6fda4a96f287165fe5191bfb4b25 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 6 Aug 2024 17:44:32 +0200 Subject: [PATCH 06/10] Prepare port patch --- biodata-external/pom.xml | 2 +- biodata-formats/pom.xml | 2 +- biodata-models/pom.xml | 2 +- biodata-tools/pom.xml | 2 +- pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/biodata-external/pom.xml b/biodata-external/pom.xml index c27bf0eb..d6d1acdd 100644 --- a/biodata-external/pom.xml +++ b/biodata-external/pom.xml @@ -6,7 +6,7 @@ biodata org.opencb.biodata - 3.2.0-SNAPSHOT + 3.3.0-SNAPSHOT ../pom.xml diff --git a/biodata-formats/pom.xml b/biodata-formats/pom.xml index e84416eb..c3332c2e 100644 --- a/biodata-formats/pom.xml +++ b/biodata-formats/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.2.0-SNAPSHOT + 3.3.0-SNAPSHOT ../pom.xml diff --git a/biodata-models/pom.xml b/biodata-models/pom.xml index c7d21a5f..7325a383 100644 --- a/biodata-models/pom.xml +++ b/biodata-models/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.2.0-SNAPSHOT + 3.3.0-SNAPSHOT ../pom.xml diff --git a/biodata-tools/pom.xml b/biodata-tools/pom.xml index d63983d3..e8d90ada 100644 --- a/biodata-tools/pom.xml +++ b/biodata-tools/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.2.0-SNAPSHOT + 3.3.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index e35210e0..026481a9 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.2.0-SNAPSHOT + 3.3.0-SNAPSHOT pom Biodata From 71d7e8504bfa9dd717a76f9f39e25c9ce315c55a Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 6 Aug 2024 17:46:24 +0200 Subject: [PATCH 07/10] Prepare port patch #TASK-6647 --- biodata-external/pom.xml | 2 +- biodata-formats/pom.xml | 2 +- biodata-models/pom.xml | 2 +- biodata-tools/pom.xml | 2 +- pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/biodata-external/pom.xml b/biodata-external/pom.xml index 3a98861e..d6d1acdd 100644 --- a/biodata-external/pom.xml +++ b/biodata-external/pom.xml @@ -6,7 +6,7 @@ biodata org.opencb.biodata - 2.12.2 + 3.3.0-SNAPSHOT ../pom.xml diff --git a/biodata-formats/pom.xml b/biodata-formats/pom.xml index fe80d521..3fdf0a65 100644 --- a/biodata-formats/pom.xml +++ b/biodata-formats/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 2.12.2 + 3.3.0-SNAPSHOT ../pom.xml diff --git a/biodata-models/pom.xml b/biodata-models/pom.xml index 79a1954e..b95a085e 100644 --- a/biodata-models/pom.xml +++ b/biodata-models/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 2.12.2 + 3.3.0-SNAPSHOT ../pom.xml diff --git a/biodata-tools/pom.xml b/biodata-tools/pom.xml index 45d41e63..3edebe40 100644 --- a/biodata-tools/pom.xml +++ b/biodata-tools/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 2.12.2 + 3.3.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index a051029f..1770c682 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 2.12.2 + 3.3.0-SNAPSHOT pom Biodata From f21c3dd11658661e7407e7ee1c06f3948bc15397 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 18 Sep 2024 09:17:23 +0200 Subject: [PATCH 08/10] CICD: new SDLC Updating version number #TASK-6879 --- biodata-external/pom.xml | 2 +- biodata-formats/pom.xml | 2 +- biodata-models/pom.xml | 2 +- biodata-tools/pom.xml | 2 +- pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/biodata-external/pom.xml b/biodata-external/pom.xml index d6d1acdd..c425be02 100644 --- a/biodata-external/pom.xml +++ b/biodata-external/pom.xml @@ -6,7 +6,7 @@ biodata org.opencb.biodata - 3.3.0-SNAPSHOT + 4.0.0-SNAPSHOT ../pom.xml diff --git a/biodata-formats/pom.xml b/biodata-formats/pom.xml index c3332c2e..e56df070 100644 --- a/biodata-formats/pom.xml +++ b/biodata-formats/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.3.0-SNAPSHOT + 4.0.0-SNAPSHOT ../pom.xml diff --git a/biodata-models/pom.xml b/biodata-models/pom.xml index 7325a383..9d6b4ef7 100644 --- a/biodata-models/pom.xml +++ b/biodata-models/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.3.0-SNAPSHOT + 4.0.0-SNAPSHOT ../pom.xml diff --git a/biodata-tools/pom.xml b/biodata-tools/pom.xml index e8d90ada..8b5d54a4 100644 --- a/biodata-tools/pom.xml +++ b/biodata-tools/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.3.0-SNAPSHOT + 4.0.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index faf0f65b..0a3d8b1c 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.3.0-SNAPSHOT + 4.0.0-SNAPSHOT pom Biodata From 700b86828656e6fedf2247228480305f4bff77d2 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 18 Sep 2024 09:22:00 +0200 Subject: [PATCH 09/10] CICD: new SDLC Updating branches and version references #TASK-6879 --- .github/workflows/pull-request-approved.yml | 37 +++++++++++--- .../workflows/scripts/get-xetabase-branch.sh | 50 +++++++++++++++++++ pom.xml | 2 +- 3 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/scripts/get-xetabase-branch.sh diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index eb410c9c..ba378d3a 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -1,15 +1,40 @@ name: Pull request approve workflow +run-name: 'Pull request approve workflow ${{ github.event.pull_request.head.ref }} -> ${{ github.event.pull_request.base.ref }} by @${{ github.actor }}' on: pull_request_review: types: [ submitted ] jobs: - build: - uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop + calculate-xetabase-branch: + name: Calculate Xetabase branch + runs-on: ubuntu-22.04 + outputs: + xetabase_branch: ${{ steps.get_xetabase_branch.outputs.xetabase_branch }} + steps: + - name: Clone java-common-libs + uses: actions/checkout@v4 + with: + fetch-depth: '10' + ## This is important to avoid the error in the next step: "fatal: repository 'https://github.com/zetta-genomics/opencga-enterprise.git/' not found" + persist-credentials: false + - id: get_xetabase_branch + name: "Get current branch for Xetabase from target branch" + run: | + 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 }}) + 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: - name: "Test analysis" - uses: ./.github/workflows/test-analysis.yml - needs: build - secrets: inherit + name: "Run all tests before merging" + needs: calculate-xetabase-branch + uses: opencb/java-common-libs/.github/workflows/test-xetabase-workflow.yml@develop + with: + branch: ${{ needs.calculate-xetabase-branch.outputs.xetabase_branch }} + task: ${{ github.event.pull_request.head.ref }} + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh new file mode 100644 index 00000000..781e29a3 --- /dev/null +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +# Function to calculate the corresponding branch of Xetabase project +get_xetabase_branch() { + # Input parameter (branch name) + input_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; + return 0; + fi + fi + + # Check if the branch name is "develop" in that case return the same branch name + if [[ "$input_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 + # Extract the MAJOR part of the branch name + MAJOR=${BASH_REMATCH[1]} + # Calculate the XETABASE_MAJOR by subtracting 1 from MAJOR + 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.}" + return 0 + fi + + # If the branch name does not match any of the expected patterns + echo "Error: The branch name is not correct." + return 1 +} + +# Check if the script receives exactly one argument +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +# Call the function with the input branch name +get_xetabase_branch "$1" diff --git a/pom.xml b/pom.xml index 0a3d8b1c..f3153706 100644 --- a/pom.xml +++ b/pom.xml @@ -38,7 +38,7 @@ - 5.3.0-SNAPSHOT + 6.0.0-SNAPSHOT 2.14.3 4.4 From 8fbe11a7c5942534927c6ceff5566bfea868462c Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 3 Oct 2024 13:13:08 +0200 Subject: [PATCH 10/10] Port Patch 3.2.1 -> 4.0.0 XB 2.2.1 -> 3.0.0 #TASK-6780 --- biodata-external/pom.xml | 2 +- biodata-formats/pom.xml | 2 +- biodata-models/pom.xml | 2 +- biodata-tools/pom.xml | 2 +- pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/biodata-external/pom.xml b/biodata-external/pom.xml index dafe64c2..c425be02 100644 --- a/biodata-external/pom.xml +++ b/biodata-external/pom.xml @@ -6,7 +6,7 @@ biodata org.opencb.biodata - 3.2.1 + 4.0.0-SNAPSHOT ../pom.xml diff --git a/biodata-formats/pom.xml b/biodata-formats/pom.xml index e071844f..e56df070 100644 --- a/biodata-formats/pom.xml +++ b/biodata-formats/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.2.1 + 4.0.0-SNAPSHOT ../pom.xml diff --git a/biodata-models/pom.xml b/biodata-models/pom.xml index f2311443..9d6b4ef7 100644 --- a/biodata-models/pom.xml +++ b/biodata-models/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.2.1 + 4.0.0-SNAPSHOT ../pom.xml diff --git a/biodata-tools/pom.xml b/biodata-tools/pom.xml index a9a269a7..8b5d54a4 100644 --- a/biodata-tools/pom.xml +++ b/biodata-tools/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.2.1 + 4.0.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index cd18672d..dce46162 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.biodata biodata - 3.2.1 + 4.0.0-SNAPSHOT pom Biodata