From afde81c48bc868be22fe7b84f1bcf1e1ecf162bd Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Mon, 16 Sep 2024 12:52:16 +0200 Subject: [PATCH 1/9] Clean ls in test-xetabase workflow #TASK-6879 --- .github/workflows/test-xetabase-workflow.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/test-xetabase-workflow.yml b/.github/workflows/test-xetabase-workflow.yml index 1dfcdc78..3341554d 100644 --- a/.github/workflows/test-xetabase-workflow.yml +++ b/.github/workflows/test-xetabase-workflow.yml @@ -104,18 +104,9 @@ jobs: password: ${{ env.DOCKER_HUB_PASSWORD }} - name: Run all OpenCB Junit tests, ie. java-common-libs, biodata, cellbase, opencga and opencga-enterprise run: | - pwd - ls -lrtha - echo "------------------------------------" cd opencga-enterprise - pwd - ls -lrtha - echo "------------------------------------" ln -s ../opencga opencga-home - echo "------------------------------------" - ls -lrtha - #./build.sh -t -l runShortTests,runMediumTests,runLongTests -b -s -f -T ${{ inputs.task }} -c localhost:27018 -H hdp3.1 - ./build.sh -t -l runShortTests -b -s -f -T ${{ inputs.task }} -c localhost:27018 -H hdp3.1 + ./build.sh -t -l runShortTests -b -s -T ${{ inputs.task }} -c localhost:27018 -H hdp3.1 - name: Upload reports results to Github uses: actions/upload-artifact@v4 with: From c62cd6055a435194634ddccb1971668b11966234 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Mon, 16 Sep 2024 13:09:17 +0200 Subject: [PATCH 2/9] Delete test pll request approve cicd #TASK-6879 --- .../workflows/test-pull-request-approved.yml | 48 ------------------- 1 file changed, 48 deletions(-) delete mode 100644 .github/workflows/test-pull-request-approved.yml diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml deleted file mode 100644 index 41f878cf..00000000 --- a/.github/workflows/test-pull-request-approved.yml +++ /dev/null @@ -1,48 +0,0 @@ -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: - push: - branches: - - TASK-* - - -jobs: - 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: | - if [ "$( git ls-remote https://$ZETTA_REPO_ACCESS_TOKEN@github.com/opencb/opencga.git "TASK-6807" )" ] ; then - echo "OPENCGA TASK-6807 branch"; - fi - - if [ "$( git ls-remote https://$ZETTA_REPO_ACCESS_TOKEN@github.com/zetta-genomics/opencga-enterprise.git "$input_branch" )" ] ; then - echo "Here it is TASK-6807 branch"; - fi - chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh - echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" | tee -a ${GITHUB_STEP_SUMMARY} - xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh "TASK-6807" ) - 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: "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: TASK-6807 - secrets: inherit \ No newline at end of file From 8cafa9f983028692d28589ba8163d4ef39c26bfb Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Mon, 16 Sep 2024 15:00:08 +0200 Subject: [PATCH 3/9] SDLC: Prepare release 2.3.0 de Xetabase #TASK-6879 --- commons-datastore/commons-datastore-core/pom.xml | 2 +- commons-datastore/commons-datastore-mongodb/pom.xml | 2 +- commons-datastore/commons-datastore-solr/pom.xml | 2 +- commons-datastore/pom.xml | 2 +- commons-lib/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/commons-datastore/commons-datastore-core/pom.xml b/commons-datastore/commons-datastore-core/pom.xml index fb5aa9c4..73214d6e 100644 --- a/commons-datastore/commons-datastore-core/pom.xml +++ b/commons-datastore/commons-datastore-core/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons-datastore - 5.2.2-SNAPSHOT + 3.3.0-SNAPSHOT ../pom.xml diff --git a/commons-datastore/commons-datastore-mongodb/pom.xml b/commons-datastore/commons-datastore-mongodb/pom.xml index ea27c46b..0ffa5c61 100644 --- a/commons-datastore/commons-datastore-mongodb/pom.xml +++ b/commons-datastore/commons-datastore-mongodb/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons-datastore - 5.2.2-SNAPSHOT + 3.3.0-SNAPSHOT ../pom.xml diff --git a/commons-datastore/commons-datastore-solr/pom.xml b/commons-datastore/commons-datastore-solr/pom.xml index 8ac28bb8..69ad2cb8 100644 --- a/commons-datastore/commons-datastore-solr/pom.xml +++ b/commons-datastore/commons-datastore-solr/pom.xml @@ -22,7 +22,7 @@ org.opencb.commons commons-datastore - 5.2.2-SNAPSHOT + 3.3.0-SNAPSHOT ../pom.xml diff --git a/commons-datastore/pom.xml b/commons-datastore/pom.xml index ce2e7cdc..464343a2 100644 --- a/commons-datastore/pom.xml +++ b/commons-datastore/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons - 5.2.2-SNAPSHOT + 3.3.0-SNAPSHOT ../pom.xml diff --git a/commons-lib/pom.xml b/commons-lib/pom.xml index c9549985..1e5bb366 100644 --- a/commons-lib/pom.xml +++ b/commons-lib/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons - 5.2.2-SNAPSHOT + 3.3.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 2ca4a9f5..c853b234 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons - 5.2.2-SNAPSHOT + 3.3.0-SNAPSHOT pom OpenCB commons project From 18819ff743b31f74e1a8a4e6aad86e410b472326 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Mon, 16 Sep 2024 15:01:28 +0200 Subject: [PATCH 4/9] SDLC: Prepare release 2.3.0 de Xetabase #TASK-6879 --- commons-datastore/commons-datastore-core/pom.xml | 2 +- commons-datastore/commons-datastore-mongodb/pom.xml | 2 +- commons-datastore/commons-datastore-solr/pom.xml | 2 +- commons-datastore/pom.xml | 2 +- commons-lib/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/commons-datastore/commons-datastore-core/pom.xml b/commons-datastore/commons-datastore-core/pom.xml index 73214d6e..ed5c139e 100644 --- a/commons-datastore/commons-datastore-core/pom.xml +++ b/commons-datastore/commons-datastore-core/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons-datastore - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT ../pom.xml diff --git a/commons-datastore/commons-datastore-mongodb/pom.xml b/commons-datastore/commons-datastore-mongodb/pom.xml index 0ffa5c61..294dd6ec 100644 --- a/commons-datastore/commons-datastore-mongodb/pom.xml +++ b/commons-datastore/commons-datastore-mongodb/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons-datastore - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT ../pom.xml diff --git a/commons-datastore/commons-datastore-solr/pom.xml b/commons-datastore/commons-datastore-solr/pom.xml index 69ad2cb8..a6d4bc14 100644 --- a/commons-datastore/commons-datastore-solr/pom.xml +++ b/commons-datastore/commons-datastore-solr/pom.xml @@ -22,7 +22,7 @@ org.opencb.commons commons-datastore - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT ../pom.xml diff --git a/commons-datastore/pom.xml b/commons-datastore/pom.xml index 464343a2..db85378f 100644 --- a/commons-datastore/pom.xml +++ b/commons-datastore/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT ../pom.xml diff --git a/commons-lib/pom.xml b/commons-lib/pom.xml index 1e5bb366..d2077fc7 100644 --- a/commons-lib/pom.xml +++ b/commons-lib/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index c853b234..8a184d38 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT pom OpenCB commons project From aa8dc1269b95e94b51a94c3f5ec355423474ee70 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Mon, 16 Sep 2024 15:01:28 +0200 Subject: [PATCH 5/9] SDLC: Prepare release 2.3.0 of Xetabase #TASK-6879 --- commons-datastore/commons-datastore-core/pom.xml | 2 +- commons-datastore/commons-datastore-mongodb/pom.xml | 2 +- commons-datastore/commons-datastore-solr/pom.xml | 2 +- commons-datastore/pom.xml | 2 +- commons-lib/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/commons-datastore/commons-datastore-core/pom.xml b/commons-datastore/commons-datastore-core/pom.xml index 73214d6e..ed5c139e 100644 --- a/commons-datastore/commons-datastore-core/pom.xml +++ b/commons-datastore/commons-datastore-core/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons-datastore - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT ../pom.xml diff --git a/commons-datastore/commons-datastore-mongodb/pom.xml b/commons-datastore/commons-datastore-mongodb/pom.xml index 0ffa5c61..294dd6ec 100644 --- a/commons-datastore/commons-datastore-mongodb/pom.xml +++ b/commons-datastore/commons-datastore-mongodb/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons-datastore - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT ../pom.xml diff --git a/commons-datastore/commons-datastore-solr/pom.xml b/commons-datastore/commons-datastore-solr/pom.xml index 69ad2cb8..a6d4bc14 100644 --- a/commons-datastore/commons-datastore-solr/pom.xml +++ b/commons-datastore/commons-datastore-solr/pom.xml @@ -22,7 +22,7 @@ org.opencb.commons commons-datastore - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT ../pom.xml diff --git a/commons-datastore/pom.xml b/commons-datastore/pom.xml index 464343a2..db85378f 100644 --- a/commons-datastore/pom.xml +++ b/commons-datastore/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT ../pom.xml diff --git a/commons-lib/pom.xml b/commons-lib/pom.xml index 1e5bb366..d2077fc7 100644 --- a/commons-lib/pom.xml +++ b/commons-lib/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index c853b234..8a184d38 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.opencb.commons commons - 3.3.0-SNAPSHOT + 5.3.0-SNAPSHOT pom OpenCB commons project From bdc9fa4e7fde04ead51e8637233c8b7884b6be3c Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 17 Sep 2024 11:06:32 +0200 Subject: [PATCH 6/9] cicd: Review cicd after brnch renames #TASK-6879 --- .../workflows/scripts/get-xetabase-branch.sh | 4 +- .github/workflows/test-xetabase-branch.yml | 48 +++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test-xetabase-branch.yml diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index 139e6a0a..be89ffbf 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -20,8 +20,8 @@ get_xetabase_branch() { return 0 fi - # Check if the branch name starts with "release-" and follows the patterns "release-a.b.x" or "release-a.b.c.x" - if [[ "$input_branch" =~ ^release-([0-9]+)\.([0-9]+)\.x$ ]] || [[ "$input_branch" =~ ^release-([0-9]+)\.([0-9]+)\.([0-9]+)\.x$ ]]; then + # 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 3 from MAJOR diff --git a/.github/workflows/test-xetabase-branch.yml b/.github/workflows/test-xetabase-branch.yml new file mode 100644 index 00000000..e90aeebd --- /dev/null +++ b/.github/workflows/test-xetabase-branch.yml @@ -0,0 +1,48 @@ +name: TMP test-xetabase-branch +run-name: 'Pull request approve workflow ${{ github.event.pull_request.head.ref }} -> ${{ github.event.pull_request.base.ref }} by @${{ github.actor }}' + +on: + push: + branches: + - TASK-* + + +jobs: + 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: | + if [ "$( git ls-remote https://$ZETTA_REPO_ACCESS_TOKEN@github.com/opencb/opencga.git "TASK-6807" )" ] ; then + echo "OPENCGA TASK-6807 branch"; + fi + + if [ "$( git ls-remote https://$ZETTA_REPO_ACCESS_TOKEN@github.com/zetta-genomics/opencga-enterprise.git "$input_branch" )" ] ; then + echo "Here it is TASK-6807 branch"; + fi + chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh + echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" | tee -a ${GITHUB_STEP_SUMMARY} + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh "TASK-6807" ) + 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: "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: TASK-6807 + secrets: inherit \ No newline at end of file From c9a79d9e1e5a46c771b84366ec310a3505fff94c Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 17 Sep 2024 11:12:52 +0200 Subject: [PATCH 7/9] cicd: Review cicd after brnch renames #TASK-6879 --- .github/workflows/pull-request-approved.yml | 2 +- .github/workflows/test-xetabase-branch.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index de0bbc57..c68cc16b 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -25,7 +25,7 @@ jobs: 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 }}" echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" - xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ 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: diff --git a/.github/workflows/test-xetabase-branch.yml b/.github/workflows/test-xetabase-branch.yml index e90aeebd..e10a41c9 100644 --- a/.github/workflows/test-xetabase-branch.yml +++ b/.github/workflows/test-xetabase-branch.yml @@ -32,7 +32,7 @@ jobs: fi chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" | tee -a ${GITHUB_STEP_SUMMARY} - xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh "TASK-6807" ) + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh "release-5.x.x" ) echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT env: @@ -44,5 +44,5 @@ jobs: uses: opencb/java-common-libs/.github/workflows/test-xetabase-workflow.yml@develop with: branch: ${{ needs.calculate-xetabase-branch.outputs.xetabase_branch }} - task: TASK-6807 + task: TASK-6879 secrets: inherit \ No newline at end of file From a6a843441c8fabf875f07c90ff269c09575e9d4e Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 17 Sep 2024 13:26:43 +0200 Subject: [PATCH 8/9] cicd: Refactor tmp test to cicd after brnch renames #TASK-6879 --- .../{test-xetabase-branch.yml => tmp-test-xetabase-branch.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{test-xetabase-branch.yml => tmp-test-xetabase-branch.yml} (100%) diff --git a/.github/workflows/test-xetabase-branch.yml b/.github/workflows/tmp-test-xetabase-branch.yml similarity index 100% rename from .github/workflows/test-xetabase-branch.yml rename to .github/workflows/tmp-test-xetabase-branch.yml From a1efd8f8ebec16ae4bce77972293efd331af0714 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 17 Sep 2024 13:30:20 +0200 Subject: [PATCH 9/9] cicd: Refactor tmp test to cicd after brnch renames #TASK-6879 --- .github/workflows/tmp-test-xetabase-branch.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tmp-test-xetabase-branch.yml b/.github/workflows/tmp-test-xetabase-branch.yml index e10a41c9..c10d99ec 100644 --- a/.github/workflows/tmp-test-xetabase-branch.yml +++ b/.github/workflows/tmp-test-xetabase-branch.yml @@ -23,8 +23,8 @@ jobs: - id: get_xetabase_branch name: "Get current branch for Xetabase from target branch" run: | - if [ "$( git ls-remote https://$ZETTA_REPO_ACCESS_TOKEN@github.com/opencb/opencga.git "TASK-6807" )" ] ; then - echo "OPENCGA TASK-6807 branch"; + if [ "$( git ls-remote https://$ZETTA_REPO_ACCESS_TOKEN@github.com/opencb/opencga.git "TASK-6879" )" ] ; then + echo "OPENCGA TASK-6879 branch"; fi if [ "$( git ls-remote https://$ZETTA_REPO_ACCESS_TOKEN@github.com/zetta-genomics/opencga-enterprise.git "$input_branch" )" ] ; then @@ -32,7 +32,7 @@ jobs: fi chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" | tee -a ${GITHUB_STEP_SUMMARY} - xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh "release-5.x.x" ) + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh "TASK-6879" ) echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT env: