From e28046696f378bc1371b5347c0eae4bcf202d43c Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Sep 2024 18:08:03 +0200 Subject: [PATCH 01/31] cicd: Upload reference to develop branch in pull-request-approve to test-xetabase-workflow #TASK-6807 --- .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 d96c95627..8f41edff3 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -27,7 +27,7 @@ jobs: test: name: "Run all tests before merging" needs: calculate-xetabase-branch - uses: opencb/java-common-libs/.github/workflows/test-xetabase-workflow.yml@TASK-6399 + 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 }} From e8552edc847bf0393e007825b5a79e9f99b95bd9 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 10:35:53 +0200 Subject: [PATCH 02/31] cicd: Refactor and fix SSH env values #TASK-6807 --- .github/workflows/test-xetabase-workflow.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test-xetabase-workflow.yml b/.github/workflows/test-xetabase-workflow.yml index 1dfcdc786..4e14074c6 100644 --- a/.github/workflows/test-xetabase-workflow.yml +++ b/.github/workflows/test-xetabase-workflow.yml @@ -41,10 +41,10 @@ jobs: AZURE_KUBE_CONFIG/field/Secret Value > env:AZURE_KUBE_CONFIG DOCKER_HUB_USER/field/Secret Value > env:DOCKER_HUB_USER DOCKER_HUB_PASSWORD/field/Secret Value > env:DOCKER_HUB_PASSWORD - SSH_TESTING_SERVER_HOST/field/Secret Value > env:SSH_TESTING_SERVER_HOST - SSH_TESTING_SERVER_PORT/field/Secret Value > env:SSH_TESTING_SERVER_PORT - SSH_TESTING_SERVER_USER/field/Secret Value > env:SSH_TESTING_SERVER_USER - SSH_TESTING_SERVER_PASSWORD/field/Secret Value > env:SSH_TESTING_SERVER_PASSWORD + SSH_TESTING_SERVER_HOST/field/Secret Value > env:SSH_HOST + SSH_TESTING_SERVER_PORT/field/Secret Value > env:SSH_PORT + SSH_TESTING_SERVER_USER/field/Secret Value > env:SSH_USER + SSH_TESTING_SERVER_PASSWORD/field/Secret Value > env:SSH_PASS - name: Log inputs run: | echo "__OpenCGA-enterprise branch:__ \"${{ inputs.branch }}\"" | tee -a $GITHUB_STEP_SUMMARY @@ -114,8 +114,8 @@ jobs: 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 + - name: Upload reports results to Github uses: actions/upload-artifact@v4 with: @@ -126,16 +126,6 @@ jobs: with: name: build-log path: ./opencga-enterprise/build.log - - name: Upload junit reports to a remote scp server - uses: garygrossgarten/github-action-scp@release - with: - local: opencga-enterprise/reports/test - remote: /var/www/html/reports/xetabase/${{ inputs.task }}/ - host: ${{ env.SSH_TESTING_SERVER_HOST}} - port: ${{ env.SSH_TESTING_SERVER_PORT}} - username: ${{ env.SSH_TESTING_SERVER_USER }} - password: ${{ env.SSH_TESTING_SERVER_PASSWORD }} - concurrency: 2 - name: Log summary run: | cat ./opencga-enterprise/build.log | tee -a $GITHUB_STEP_SUMMARY From 59ad86b10ed4f8757207378a64d4d3579a27141e Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 11:21:10 +0200 Subject: [PATCH 03/31] Env variables to FIX error #TASK-6807 --- .github/workflows/test-xetabase-workflow.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-xetabase-workflow.yml b/.github/workflows/test-xetabase-workflow.yml index 4e14074c6..c37de7847 100644 --- a/.github/workflows/test-xetabase-workflow.yml +++ b/.github/workflows/test-xetabase-workflow.yml @@ -115,7 +115,11 @@ jobs: echo "------------------------------------" ls -lrtha ./build.sh -t -l runShortTests -b -s -f -T ${{ inputs.task }} -c localhost:27018 -H hdp3.1 - + env: + SSH_HOST: ${{ env.SSH_HOST }} + SSH_PORT: ${{ env.SSH_PORT }} + SSH_USER: ${{ env.SSH_USER }} + SSH_PASS: ${{ env.SSH_PASS }} - name: Upload reports results to Github uses: actions/upload-artifact@v4 with: From 85e297a925ae39cdadfb78b52c343b33b54013da Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 11:22:45 +0200 Subject: [PATCH 04/31] Env variables to FIX error #TASK-6807 --- .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 c37de7847..eb441cfe3 100644 --- a/.github/workflows/test-xetabase-workflow.yml +++ b/.github/workflows/test-xetabase-workflow.yml @@ -104,16 +104,7 @@ 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 + printenv ./build.sh -t -l runShortTests -b -s -f -T ${{ inputs.task }} -c localhost:27018 -H hdp3.1 env: SSH_HOST: ${{ env.SSH_HOST }} From abb3b6b368747ca7949d1d55f37e1cbc65a8596d Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 11:42:43 +0200 Subject: [PATCH 05/31] Fix get-xetabase-branch #TASK-6807 --- .github/workflows/pull-request-approved.yml | 1 + .github/workflows/scripts/get-xetabase-branch.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index 8f41edff3..0cd0fdaac 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -20,6 +20,7 @@ jobs: 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 }}" 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 diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index 0be5cb32d..bb1b18d64 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 [[ $input_branch == TASK* ]]; then if [ "$(git ls-remote https://github.com/zetta-genomics/opencga-enterprise.git "$input_branch" )" ] ; then - echo "$GIT_BRANCH"; - exit 0; + echo "$input_branch"; + return 0; fi fi From 12a515909947bc0f997460d1b38c64e5cb6cfb46 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 11:52:10 +0200 Subject: [PATCH 06/31] Fix get-xetabase-branch #TASK-6807 --- .github/workflows/pull-request-approved.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index 0cd0fdaac..e6b13f3ca 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -21,7 +21,8 @@ jobs: run: | chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh echo "github.event.pull_request.base.ref: ${{ github.event.pull_request.base.ref }}" - xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ 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.head.ref }}) echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT From 9182e1ea9349605fd2f9018a2c6cd27a7dd9f6f4 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 12:06:36 +0200 Subject: [PATCH 07/31] Fix get-xetabase-branch #TASK-6807 --- .github/workflows/pull-request-approved.yml | 3 +++ .github/workflows/scripts/get-xetabase-branch.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index e6b13f3ca..d33577a4b 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -5,6 +5,9 @@ on: pull_request_review: types: [ submitted ] +env: + ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }} + jobs: calculate-xetabase-branch: name: Calculate Xetabase branch diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index bb1b18d64..9e25d9aa0 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -7,7 +7,7 @@ get_xetabase_branch() { # 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://github.com/zetta-genomics/opencga-enterprise.git "$input_branch" )" ] ; 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 From 2d940e334d34e940e2494cb29cbc3508f456cd76 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 12:11:37 +0200 Subject: [PATCH 08/31] Fix get-xetabase-branch #TASK-6807 --- .github/workflows/pull-request-approved.yml | 3 ++- .github/workflows/scripts/get-xetabase-branch.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index d33577a4b..64792e5e4 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -25,7 +25,8 @@ 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.head.ref }}) + echo "ZETTA_REPO_ACCESS_TOKEN: ${{ env.ZETTA_REPO_ACCESS_TOKEN }}" + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.head.ref }} ${{ env.ZETTA_REPO_ACCESS_TOKEN }}) echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index 9e25d9aa0..ab86f9b3e 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -7,7 +7,7 @@ get_xetabase_branch() { # 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 + if [ "$(git ls-remote https://$2@github.com/zetta-genomics/opencga-enterprise.git "$input_branch" )" ] ; then echo "$input_branch"; return 0; fi From 230010e4dbb585b544f5cb9c36cc0dd0fa2cb2ca Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 12:19:46 +0200 Subject: [PATCH 09/31] Fix get-xetabase-branch #TASK-6807 --- .github/workflows/pull-request-approved.yml | 6 +----- .github/workflows/scripts/get-xetabase-branch.sh | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index 64792e5e4..1d7686951 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -5,9 +5,6 @@ on: pull_request_review: types: [ submitted ] -env: - ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }} - jobs: calculate-xetabase-branch: name: Calculate Xetabase branch @@ -25,8 +22,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 }}" - echo "ZETTA_REPO_ACCESS_TOKEN: ${{ env.ZETTA_REPO_ACCESS_TOKEN }}" - xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.head.ref }} ${{ env.ZETTA_REPO_ACCESS_TOKEN }}) + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.head.ref }} ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}) echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index ab86f9b3e..2c6aaad93 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -7,7 +7,7 @@ get_xetabase_branch() { # 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://$2@github.com/zetta-genomics/opencga-enterprise.git "$input_branch" )" ] ; then + if [ "$(git ls-remote "https://$2@github.com/zetta-genomics/opencga-enterprise.git" "$input_branch" )" ] ; then echo "$input_branch"; return 0; fi From a4d2fbb30c92e27c6c814a49ff212d35dc7d248f Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 12:33:44 +0200 Subject: [PATCH 10/31] Fix get-xetabase-branch #TASK-6807 --- .github/workflows/scripts/get-xetabase-branch.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index 2c6aaad93..4cdfe5fc2 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -4,10 +4,10 @@ get_xetabase_branch() { # Input parameter (branch name) input_branch="$1" - + ZETTA_REPO_ACCESS_TOKEN="$2" # 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://$2@github.com/zetta-genomics/opencga-enterprise.git" "$input_branch" )" ] ; 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 @@ -47,4 +47,4 @@ if [ "$#" -ne 1 ]; then fi # Call the function with the input branch name -get_xetabase_branch "$1" +get_xetabase_branch "$1" "$2" From 8e3cc8832c12f74aa06d4416d5c773f4f1458614 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 12:52:59 +0200 Subject: [PATCH 11/31] Fix get-xetabase-branch #TASK-6807 --- .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 1d7686951..517f159d9 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -22,7 +22,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.head.ref }} ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}) + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.head.ref }} ${{ secrets.ZETTA_TOKEN }}) echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT From f84ebf318d8c72ffd8d8259a5641b6a88cae79f8 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 13:02:21 +0200 Subject: [PATCH 12/31] Fix get-xetabase-branch #TASK-6807 --- .github/workflows/pull-request-approved.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index 517f159d9..5341b5f7c 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -22,9 +22,10 @@ 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.head.ref }} ${{ secrets.ZETTA_TOKEN }}) + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.head.ref }} ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}) echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT + test: name: "Run all tests before merging" From 6ca7c8c4c7985e050af072c335c2755e6059caff Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 13:09:41 +0200 Subject: [PATCH 13/31] Fix get-xetabase-branch #TASK-6807 --- .github/workflows/pull-request-approved.yml | 3 ++- .github/workflows/scripts/get-xetabase-branch.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index 5341b5f7c..cfc9110c3 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -22,10 +22,11 @@ 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 }}" + 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 }} ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}) echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT - + test: name: "Run all tests before merging" diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index 4cdfe5fc2..559e686aa 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -1,5 +1,6 @@ #!/bin/bash - +set -e +set -x # Function to calculate the corresponding branch of Xetabase project get_xetabase_branch() { # Input parameter (branch name) From 9272829d16ce36f6a443a2e8a8fd46ec903df2b0 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 13:18:37 +0200 Subject: [PATCH 14/31] TEST workflow for pull-request #TASK-6807 --- .../workflows/test-pull-request-approved.yml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create 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 new file mode 100644 index 000000000..131230742 --- /dev/null +++ b/.github/workflows/test-pull-request-approved.yml @@ -0,0 +1,38 @@ +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' + - id: get_xetabase_branch + name: "Get current branch for Xetabase from target branch" + run: | + chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh + echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh "TASK-6807" ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}) + echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} + echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT + + + 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 5d473dd6b8d81863ef47930f7631748f7941ec9a Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 13:20:22 +0200 Subject: [PATCH 15/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/scripts/get-xetabase-branch.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index 559e686aa..b2b6f998a 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -41,11 +41,6 @@ get_xetabase_branch() { 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" "$2" From 7b2a8b095ef20a894291bc1bab956293947cb443 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 13:23:27 +0200 Subject: [PATCH 16/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/test-pull-request-approved.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index 131230742..04bd9de91 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -23,7 +23,7 @@ jobs: run: | chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" - xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh "TASK-6807" ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}) + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh "TASK-6807" "${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" ) echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT From c3fbf526ea87a690f3f09cf89801b465bdecf40d Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 14:25:26 +0200 Subject: [PATCH 17/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/test-pull-request-approved.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index 04bd9de91..473185bd9 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -22,7 +22,7 @@ jobs: name: "Get current branch for Xetabase from target branch" run: | chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh - echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" + 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" "${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" ) echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY} echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT From 546ea977fa23d18aa1bd1e275175dd52c879d687 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 14:35:55 +0200 Subject: [PATCH 18/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/scripts/get-xetabase-branch.sh | 4 ++-- .github/workflows/test-pull-request-approved.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index b2b6f998a..68b19832a 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -5,7 +5,7 @@ set -x get_xetabase_branch() { # Input parameter (branch name) input_branch="$1" - ZETTA_REPO_ACCESS_TOKEN="$2" + # 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 @@ -43,4 +43,4 @@ get_xetabase_branch() { # Call the function with the input branch name -get_xetabase_branch "$1" "$2" +get_xetabase_branch "$1" diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index 473185bd9..d1f628982 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -23,7 +23,7 @@ jobs: run: | 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" "${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}" ) + 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 From b870aa047e5c3b0416a505a70e1c70c686eeae67 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 14:40:11 +0200 Subject: [PATCH 19/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/test-pull-request-approved.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index d1f628982..5e4e3943d 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -2,11 +2,12 @@ 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-* - +env: + ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }} + jobs: calculate-xetabase-branch: name: Calculate Xetabase branch From ba5a19e2c75f3003764a38402969a68a09ddd508 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 14:42:53 +0200 Subject: [PATCH 20/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/test-pull-request-approved.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index 5e4e3943d..ee9609b3e 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -7,7 +7,7 @@ on: - TASK-* env: ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }} - + jobs: calculate-xetabase-branch: name: Calculate Xetabase branch @@ -22,13 +22,15 @@ 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/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 - - + test: name: "Run all tests before merging" needs: calculate-xetabase-branch From ca2ede13502012c5715478b64940361cf42aaae4 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 14:44:14 +0200 Subject: [PATCH 21/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/test-pull-request-approved.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index ee9609b3e..f23215fea 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -5,8 +5,7 @@ on: push: branches: - TASK-* -env: - ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }} + jobs: calculate-xetabase-branch: @@ -30,7 +29,8 @@ jobs: 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 From 9241eb2f82f028b421687901cd7fdc867f65d511 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 15:11:01 +0200 Subject: [PATCH 22/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/test-pull-request-approved.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index f23215fea..2377cba9d 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -21,6 +21,10 @@ jobs: - id: get_xetabase_branch name: "Get current branch for Xetabase from target branch" run: | + if [ "$( git ls-remote https://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 From ca6debc69032831a527d5258ffdbaac290d6eef0 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 15:12:44 +0200 Subject: [PATCH 23/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/test-pull-request-approved.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index 2377cba9d..e4b3c33dd 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -21,7 +21,7 @@ jobs: - id: get_xetabase_branch name: "Get current branch for Xetabase from target branch" run: | - if [ "$( git ls-remote https://github.com/opencb/opencga.git "TASK-6807" )" ] ; then + if [ "$( git ls-remote https://$ZETTA_REPO_ACCESS_TOKEN@github.com/opencb/opencga.git "TASK-6807" )" ] ; then echo "OPENCGA TASK-6807 branch"; fi From 47688af142d78e73e694a17e5c53b8e8923c6d8f Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 15:14:46 +0200 Subject: [PATCH 24/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/test-pull-request-approved.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index e4b3c33dd..9b378be12 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -25,7 +25,7 @@ jobs: 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 + 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 From 3efd0b513c3ad382bb0184864c03f42ca7583ebf Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 15:16:38 +0200 Subject: [PATCH 25/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/test-pull-request-approved.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index 9b378be12..912542865 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -25,7 +25,7 @@ jobs: 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 + 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 From 45e3902e7265f2ead52c6d0a89ccad95245b26bd Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 15:22:16 +0200 Subject: [PATCH 26/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/test-pull-request-approved.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index 912542865..afc6e1460 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -35,6 +35,8 @@ jobs: echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT env: ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }} + with: + persist-credentials: false test: name: "Run all tests before merging" needs: calculate-xetabase-branch From f4a286fde616d14813bcf6589a58dfff9d3cbf53 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 15:24:50 +0200 Subject: [PATCH 27/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/test-pull-request-approved.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index afc6e1460..c1c9e56e0 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -18,6 +18,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: '10' + persist-credentials: false - id: get_xetabase_branch name: "Get current branch for Xetabase from target branch" run: | @@ -35,8 +36,7 @@ jobs: echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT env: ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }} - with: - persist-credentials: false + test: name: "Run all tests before merging" needs: calculate-xetabase-branch From 534106c700301117719f6ee03a5aaba3ffc879da Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Sep 2024 15:31:53 +0200 Subject: [PATCH 28/31] TEST workflow for pull-request #TASK-6807 --- .github/workflows/pull-request-approved.yml | 7 +++++-- .github/workflows/scripts/get-xetabase-branch.sh | 2 +- .github/workflows/test-pull-request-approved.yml | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request-approved.yml b/.github/workflows/pull-request-approved.yml index cfc9110c3..de0bbc576 100644 --- a/.github/workflows/pull-request-approved.yml +++ b/.github/workflows/pull-request-approved.yml @@ -16,6 +16,8 @@ jobs: 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: | @@ -23,10 +25,11 @@ 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 }} ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}) + xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ 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: name: "Run all tests before merging" diff --git a/.github/workflows/scripts/get-xetabase-branch.sh b/.github/workflows/scripts/get-xetabase-branch.sh index 68b19832a..139e6a0a7 100644 --- a/.github/workflows/scripts/get-xetabase-branch.sh +++ b/.github/workflows/scripts/get-xetabase-branch.sh @@ -9,7 +9,7 @@ get_xetabase_branch() { # 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"; + echo $input_branch; return 0; fi fi diff --git a/.github/workflows/test-pull-request-approved.yml b/.github/workflows/test-pull-request-approved.yml index c1c9e56e0..41f878cf7 100644 --- a/.github/workflows/test-pull-request-approved.yml +++ b/.github/workflows/test-pull-request-approved.yml @@ -18,6 +18,7 @@ jobs: 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" From 039c4fd69277b38d20aba926e0497aae7f3a2bdb Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Mon, 9 Sep 2024 12:04:41 +0200 Subject: [PATCH 29/31] Fix ssh to report server #TASK-6807 --- .github/workflows/test-xetabase-workflow.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-xetabase-workflow.yml b/.github/workflows/test-xetabase-workflow.yml index eb441cfe3..a2dde507b 100644 --- a/.github/workflows/test-xetabase-workflow.yml +++ b/.github/workflows/test-xetabase-workflow.yml @@ -93,15 +93,20 @@ jobs: chmod +x ./kubectl echo "${{ secrets.AZURE_KUBE_CONFIG }}" > admin.conf ./kubectl -n cellbase-db port-forward services/cellbase-rs0-svc 27018:27017 --kubeconfig ./admin.conf & - - name: Install Azure AZCOPY - uses: kheiakiyama/install-azcopy-action@v1 - with: - version: 'v10' - name: DockerHub login uses: docker/login-action@v3 with: username: ${{ env.DOCKER_HUB_USER }} password: ${{ env.DOCKER_HUB_PASSWORD }} + - name: Install sshpass + run: sudo apt-get install sshpass + - name: Add SSH Host to known_hosts + run: | + mkdir -p ~/.ssh + ssh-keyscan -p ${{ env.SSH_PORT }} ${{ env.SSH_HOST }} >> ~/.ssh/known_hosts + env: + SSH_HOST: ${{ env.SSH_HOST }} + SSH_PORT: ${{ env.SSH_PORT }} - name: Run all OpenCB Junit tests, ie. java-common-libs, biodata, cellbase, opencga and opencga-enterprise run: | printenv From c07c90248b7143b29b6483e507ccbfd3719442f0 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 12 Sep 2024 09:53:08 +0200 Subject: [PATCH 30/31] pull-request-approve Remove fail-never #TASK-6807 --- .github/workflows/test-xetabase-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-xetabase-workflow.yml b/.github/workflows/test-xetabase-workflow.yml index a2dde507b..4793f828e 100644 --- a/.github/workflows/test-xetabase-workflow.yml +++ b/.github/workflows/test-xetabase-workflow.yml @@ -110,7 +110,7 @@ jobs: - name: Run all OpenCB Junit tests, ie. java-common-libs, biodata, cellbase, opencga and opencga-enterprise run: | printenv - ./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 env: SSH_HOST: ${{ env.SSH_HOST }} SSH_PORT: ${{ env.SSH_PORT }} From 502537f26a379001e56f68799bed0e9c168294ff Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 12 Sep 2024 09:54:54 +0200 Subject: [PATCH 31/31] pull-request-approve Remove fail-never #TASK-6807 --- .github/workflows/test-xetabase-workflow.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-xetabase-workflow.yml b/.github/workflows/test-xetabase-workflow.yml index 4793f828e..ed802879d 100644 --- a/.github/workflows/test-xetabase-workflow.yml +++ b/.github/workflows/test-xetabase-workflow.yml @@ -20,10 +20,6 @@ on: description: 'Branch of opencga-enterprise to be tested and built.' required: true -env: - AZCOPY_AUTO_LOGIN_TYPE: "SPN" - - jobs: test: name: Execute JUnit and Jacoco tests @@ -35,9 +31,6 @@ jobs: with: keeper-secret-config: ${{ secrets.KEEPER_SM_GH_OPENCB }} secrets: | - AZCOPY_SPA_CLIENT_SECRET/field/Secret Value > env:AZCOPY_SPA_CLIENT_SECRET - AZCOPY_SPA_APPLICATION_ID/field/Secret Value > env:AZCOPY_SPA_APPLICATION_ID - AZCOPY_TENANT_ID/field/Secret Value > env:AZCOPY_TENANT_ID AZURE_KUBE_CONFIG/field/Secret Value > env:AZURE_KUBE_CONFIG DOCKER_HUB_USER/field/Secret Value > env:DOCKER_HUB_USER DOCKER_HUB_PASSWORD/field/Secret Value > env:DOCKER_HUB_PASSWORD @@ -109,13 +102,9 @@ jobs: SSH_PORT: ${{ env.SSH_PORT }} - name: Run all OpenCB Junit tests, ie. java-common-libs, biodata, cellbase, opencga and opencga-enterprise run: | - printenv + cd opencga-enterprise + ln -s ../opencga opencga-home ./build.sh -t -l runShortTests -b -s -T ${{ inputs.task }} -c localhost:27018 -H hdp3.1 - env: - SSH_HOST: ${{ env.SSH_HOST }} - SSH_PORT: ${{ env.SSH_PORT }} - SSH_USER: ${{ env.SSH_USER }} - SSH_PASS: ${{ env.SSH_PASS }} - name: Upload reports results to Github uses: actions/upload-artifact@v4 with: