1919 type : string
2020 description : ' Branch of opencga-enterprise to be tested and built.'
2121 required : true
22- env :
23- AZCOPY_SPA_CLIENT_SECRET : ${{ secrets.AZCOPY_SPA_CLIENT_SECRET }}
24- AZCOPY_AUTO_LOGIN_TYPE : " SPN"
25- AZCOPY_SPA_APPLICATION_ID : ${{ secrets.AZCOPY_SPA_APPLICATION_ID }}
26- AZCOPY_TENANT_ID : ${{ secrets.AZCOPY_TENANT_ID }}
2722
2823jobs :
2924 test :
3025 name : Execute JUnit and Jacoco tests
3126 runs-on : ubuntu-22.04
3227 steps :
33- - name : Clone OpenCGA Enterprise branch '${{ github.event.inputs.branch }}'
28+ - name : Retrieve secrets from Keeper
29+ id : ksecrets
30+ uses : Keeper-Security/ksm-action@master
31+ with :
32+ keeper-secret-config : ${{ secrets.KEEPER_SM_GH_OPENCB }}
33+ secrets : |
34+ AZURE_KUBE_CONFIG/field/Secret Value > env:AZURE_KUBE_CONFIG
35+ DOCKER_HUB_USER/field/Secret Value > env:DOCKER_HUB_USER
36+ DOCKER_HUB_PASSWORD/field/Secret Value > env:DOCKER_HUB_PASSWORD
37+ SSH_TESTING_SERVER_HOST/field/Secret Value > env:SSH_HOST
38+ SSH_TESTING_SERVER_PORT/field/Secret Value > env:SSH_PORT
39+ SSH_TESTING_SERVER_USER/field/Secret Value > env:SSH_USER
40+ SSH_TESTING_SERVER_PASSWORD/field/Secret Value > env:SSH_PASS
41+ - name : Log inputs
42+ run : |
43+ echo "__OpenCGA-enterprise branch:__ \"${{ inputs.branch }}\"" | tee -a $GITHUB_STEP_SUMMARY
44+ echo "__Task to test:__ \"${{ inputs.task }}\"" | tee -a $GITHUB_STEP_SUMMARY
45+ - name : Clone OpenCGA Enterprise branch '${{ inputs.branch }}'
3446 uses : actions/checkout@v4
3547 with :
3648 repository : zetta-genomics/opencga-enterprise
37- ref : ${{ github.event. inputs.branch }}
49+ ref : ${{ inputs.branch }}
3850 token : ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}
3951 path : opencga-enterprise
4052 fetch-depth : " 10"
4153 - id : get_opencga_branch
4254 name : Get OpenCGA branch from 'pom.xml' property
4355 run : |
4456 pwd
45- chmod +x ./opencga-enterprise/.github/workflows/scripts/xetabase-branch.sh
46- opencga_branch=$(./opencga-enterprise/.github/workflows/scripts/xetabase-branch.sh ${{ github.event.inputs.task }})
57+ ls -lrtha
58+ ls -lrtha ./opencga-enterprise
59+ chmod +x ./opencga-enterprise/.github/workflows/scripts/get-opencga-xetabase-branch.sh
60+ opencga_branch=$(./opencga-enterprise/.github/workflows/scripts/get-opencga-xetabase-branch.sh)
61+ echo "opencga_branch=${opencga_branch}"
4762 echo "opencga_branch=${opencga_branch}" >> $GITHUB_OUTPUT
48- - uses : actions/checkout@v4
63+ - name : Clone OpenCGA branch '${{ steps.get_opencga_branch.outputs.opencga_branch }}'
64+ uses : actions/checkout@v4
4965 with :
5066 repository : opencb/opencga
5167 ref : ${{ steps.get_opencga_branch.outputs.opencga_branch }}
@@ -70,39 +86,39 @@ jobs:
7086 chmod +x ./kubectl
7187 echo "${{ secrets.AZURE_KUBE_CONFIG }}" > admin.conf
7288 ./kubectl -n cellbase-db port-forward services/cellbase-rs0-svc 27018:27017 --kubeconfig ./admin.conf &
73- - name : Install Azure AZCOPY
74- uses : kheiakiyama/install-azcopy-action@v1
75- with :
76- version : ' v10'
7789 - name : DockerHub login
7890 uses : docker/login-action@v3
7991 with :
80- username : ${{ secrets.DOCKER_HUB_USER }}
81- password : ${{ secrets.DOCKER_HUB_PASSWORD }}
92+ username : ${{ env.DOCKER_HUB_USER }}
93+ password : ${{ env.DOCKER_HUB_PASSWORD }}
94+ - name : Install sshpass
95+ run : sudo apt-get install sshpass
96+ - name : Add SSH Host to known_hosts
97+ run : |
98+ mkdir -p ~/.ssh
99+ ssh-keyscan -p ${{ env.SSH_PORT }} ${{ env.SSH_HOST }} >> ~/.ssh/known_hosts
100+ env :
101+ SSH_HOST : ${{ env.SSH_HOST }}
102+ SSH_PORT : ${{ env.SSH_PORT }}
82103 - name : Run all OpenCB Junit tests, ie. java-common-libs, biodata, cellbase, opencga and opencga-enterprise
83104 run : |
84- ln -s opencga opencga-enterprise/opencga-home
85105 cd opencga-enterprise
86- ./build.sh -t -l runShortTests,runMediumTests,runLongTests -b -s -f -T ${{ github.event.inputs.task }} -c localhost:27018 -H hdp3.1
106+ ln -s ../opencga opencga-home
107+ ./build.sh -t -l runShortTests -b -s -T ${{ inputs.task }} -c localhost:27018 -H hdp3.1
87108 - name : Upload reports results to Github
88109 uses : actions/upload-artifact@v4
89110 with :
90111 name : report-test
91- path : /home/runner/work/testing-environment/testing-environment /opencga-enterprise/reports/test
112+ path : . /opencga-enterprise/reports/test
92113 - name : Upload log
93114 uses : actions/upload-artifact@v4
94115 with :
95116 name : build-log
96- path : /home/runner/work/testing-environment/testing-environment/opencga-enterprise/build.log
97- - name : Upload junit reports to a remote scp server
98- uses : garygrossgarten/github-action-scp@release
99- with :
100- local : opencga-enterprise/reports/test
101- remote : /var/www/html/reports/xetabase/${{ github.event.inputs.task }}/
102- host : ${{ secrets.SSH_TESTING_SERVER_HOST}}
103- port : ${{ secrets.SSH_TESTING_SERVER_PORT}}
104- username : ${{ secrets.SSH_TESTING_SERVER_USER }}
105- password : ${{ secrets.SSH_TESTING_SERVER_PASSWORD }}
106- concurrency : 2
117+ path : ./opencga-enterprise/build.log
118+ - name : Log summary
119+ run : |
120+ cat ./opencga-enterprise/build.log | tee -a $GITHUB_STEP_SUMMARY
121+
122+
107123
108124
0 commit comments