Skip to content

Commit b0812f6

Browse files
Merge branch 'release-5.2.x'
2 parents 717f469 + 67acad1 commit b0812f6

File tree

16 files changed

+235
-18
lines changed

16 files changed

+235
-18
lines changed

.github/workflows/build-java-app-workflow.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
maven_opts:
77
type: string
88
required: false
9+
build_folder:
10+
type: string
11+
required: false
12+
default: "build-folder"
913
outputs:
1014
version:
1115
description: "Project version"
@@ -34,10 +38,10 @@ jobs:
3438
./.github/workflows/scripts/get_same_branch.sh ${{ github.ref_name }}
3539
fi
3640
- name: Maven Build (skip tests)
37-
run: mvn -T 2 clean install -DskipTests ${{ inputs.maven_opts }}
41+
run: mvn -T 2 clean install -DskipTests ${{ inputs.maven_opts }} --no-transfer-progress
3842
- uses: actions/upload-artifact@v4
3943
with:
40-
name: build-folder
44+
name: ${{ inputs.build_folder }}
4145
path: build
4246
- id: get_project_version
4347
name: Get project version

.github/workflows/deploy-docker-hub-workflow.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
branch:
1313
type: string
1414
required: false
15+
build_folder:
16+
type: string
17+
required: false
18+
default: "build-folder"
1519
secrets:
1620
DOCKER_HUB_USER:
1721
required: true
@@ -31,7 +35,7 @@ jobs:
3135
ref: ${{ inputs.branch }}
3236
- uses: actions/download-artifact@v4
3337
with:
34-
name: build-folder
38+
name: ${{ inputs.build_folder }}
3539
path: build
3640
- name: Chmod
3741
run: "find build -regex '.*sh' | while read file ; do chmod u+x $file ; done"

.github/workflows/deploy-maven-repository-workflow.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ jobs:
3737
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
3838
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
3939
- name: Deploy to Maven Central repository
40-
run: mvn clean deploy -DskipTests -P deploy-maven ${{ inputs.maven_opts }}
40+
run: mvn clean deploy -DskipTests -P deploy-maven ${{ inputs.maven_opts }} --no-transfer-progress
4141
env:
42-
MAVEN_NEXUS_USER: ${{ secrets.MAVEN_NEXUS_USER }}
43-
MAVEN_NEXUS_PASSWORD: ${{ secrets.MAVEN_NEXUS_PASSWORD }}
42+
MAVEN_NEXUS_USER: ${{ secrets.MAVEN_USER_TOKEN }}
43+
MAVEN_NEXUS_PASSWORD: ${{ secrets.MAVEN_PASSWORD_TOKEN }}
4444
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
4545
- name: Set up Java for publishing to GitHub Packages
4646
uses: actions/setup-java@v4
4747
with:
4848
distribution: 'temurin'
4949
java-version: '8'
5050
- name: Deploy to GitHub Packages repository
51-
run: mvn clean deploy -DskipTests -P deploy-github ${{ inputs.maven_opts }}
51+
run: mvn clean deploy -DskipTests -P deploy-github ${{ inputs.maven_opts }} --no-transfer-progress
5252
env:
5353
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Manual maven deploy workflow
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: "The branch, tag or SHA of the source code to build docker."
8+
type: string
9+
required: true
10+
jobs:
11+
checkout:
12+
name: Build Java app
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: '10'
18+
ref: "${{ inputs.branch }}"
19+
20+
deploy-maven:
21+
uses: ./.github/workflows/deploy-maven-repository-workflow.yml
22+
needs: checkout
23+
secrets: inherit
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Reusable workflow to push in DockerHub
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
target_path:
7+
type: string
8+
required: true
9+
content:
10+
type: string
11+
required: false
12+
secrets:
13+
SSH_TESTING_SERVER_HOST:
14+
required: true
15+
SSH_TESTING_SERVER_PASSWORD:
16+
required: true
17+
SSH_TESTING_SERVER_PORT:
18+
required: true
19+
SSH_TESTING_SERVER_USER:
20+
required: true
21+
22+
jobs:
23+
publish-test-report:
24+
name: Publish test report
25+
runs-on: ubuntu-22.04
26+
steps:
27+
- uses: actions/download-artifact@v4
28+
with:
29+
name: ${{ inputs.content }}
30+
path: report
31+
- name: Deploy tests web recursively to remote
32+
run: |
33+
set -e
34+
set -x
35+
export SSHPASS=${{ secrets.SSH_TESTING_SERVER_PASSWORD }}
36+
SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ServerAliveInterval=60"
37+
sshpass -e ssh ${SSH_OPTS} ${{ secrets.SSH_TESTING_SERVER_USER }}@${{ secrets.SSH_TESTING_SERVER_HOST }} -p ${{ secrets.SSH_TESTING_SERVER_PORT }} "mkdir -p ${{ inputs.target_path }}"
38+
echo "Copying report tests to remote path ${{ inputs.target_path }}"
39+
sshpass -e scp ${SSH_OPTS} -r -P ${{ secrets.SSH_TESTING_SERVER_PORT }} report ${{ secrets.SSH_TESTING_SERVER_USER }}@${{ secrets.SSH_TESTING_SERVER_HOST }}:${{ inputs.target_path }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Pull request approve workflow
2+
run-name: 'Pull request approve workflow ${{ github.event.pull_request.head.ref }} -> ${{ github.event.pull_request.base.ref }} by @${{ github.actor }}'
3+
4+
on:
5+
pull_request_review:
6+
types: [ submitted ]
7+
8+
jobs:
9+
build:
10+
uses: ./.github/workflows/build-java-app-workflow.yml
11+
12+
test:
13+
name: "Run all tests before merging"
14+
uses: ./.github/workflows/test-analysis.yml
15+
needs: build
16+
secrets: inherit

.github/workflows/test-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
3131
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
32-
run: mvn -B verify surefire-report:report --fail-never org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=opencb_java-common-libs
32+
run: mvn -B verify surefire-report:report --fail-never org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=opencb_java-common-libs --no-transfer-progress
3333
- name: Publish Test Report
3434
uses: scacap/action-surefire-report@v1
3535
## Skip cancelled()
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: TEST Xetabase and publish report workflow
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
task:
7+
type: string
8+
required: true
9+
branch:
10+
type: string
11+
required: true
12+
workflow_dispatch:
13+
inputs:
14+
task:
15+
type: string
16+
description: 'Task ID to be tested.'
17+
required: true
18+
branch:
19+
type: string
20+
description: 'Branch of opencga-enterprise to be tested and built.'
21+
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 }}
27+
28+
jobs:
29+
test:
30+
name: Execute JUnit and Jacoco tests
31+
runs-on: ubuntu-22.04
32+
steps:
33+
- name: Clone OpenCGA Enterprise branch '${{ github.event.inputs.branch }}'
34+
uses: actions/checkout@v4
35+
with:
36+
repository: zetta-genomics/opencga-enterprise
37+
ref: ${{ github.event.inputs.branch }}
38+
token: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}
39+
path: opencga-enterprise
40+
fetch-depth: "10"
41+
- id: get_opencga_branch
42+
name: Get OpenCGA branch from 'pom.xml' property
43+
run: |
44+
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 }})
47+
echo "opencga_branch=${opencga_branch}" >> $GITHUB_OUTPUT
48+
- uses: actions/checkout@v4
49+
with:
50+
repository: opencb/opencga
51+
ref: ${{ steps.get_opencga_branch.outputs.opencga_branch }}
52+
path: opencga
53+
fetch-depth: '10'
54+
- name: Set up JDK 8
55+
uses: actions/setup-java@v4
56+
with:
57+
distribution: 'temurin'
58+
java-version: '8'
59+
cache: 'maven'
60+
- name: Install Samtools
61+
run: sudo apt-get install samtools python3-deeptools
62+
- name: Start MongoDB v6.0
63+
uses: supercharge/[email protected]
64+
with:
65+
mongodb-version: 6.0
66+
mongodb-replica-set: rs-test
67+
- name: K8s Tunnel MongoDB
68+
run: |
69+
wget https://dl.k8s.io/release/v1.28.2/bin/linux/amd64/kubectl
70+
chmod +x ./kubectl
71+
echo "${{ secrets.AZURE_KUBE_CONFIG }}" > admin.conf
72+
./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'
77+
- name: DockerHub login
78+
uses: docker/login-action@v3
79+
with:
80+
username: ${{ secrets.DOCKER_HUB_USER }}
81+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
82+
- name: Run all OpenCB Junit tests, ie. java-common-libs, biodata, cellbase, opencga and opencga-enterprise
83+
run: |
84+
ln -s opencga opencga-enterprise/opencga-home
85+
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
87+
- name: Upload reports results to Github
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: report-test
91+
path: /home/runner/work/testing-environment/testing-environment/opencga-enterprise/reports/test
92+
- name: Upload log
93+
uses: actions/upload-artifact@v4
94+
with:
95+
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
107+
108+

.github/workflows/testkeeper.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Test Keeper Secrets integration with Github Actions
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
buildexecutable:
8+
runs-on: ubuntu-22.04
9+
name: Build with Keeper secrets
10+
steps:
11+
- name: Retrieve secrets from Keeper
12+
id: ksecrets
13+
uses: Keeper-Security/ksm-action@master
14+
with:
15+
keeper-secret-config: ${{ secrets.KEEPER_SM_GH_OPENCB }}
16+
secrets: |
17+
AZURE_KUBE_CONFIG/field/Secret Value > env:KEEPERTOKEN
18+
19+
- name: Print Login & Password & URL
20+
run: |
21+
echo "Login is ${{ env.KEEPERTOKEN }}"

commons-datastore/commons-datastore-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.opencb.commons</groupId>
88
<artifactId>commons-datastore</artifactId>
9-
<version>5.1.0</version>
9+
<version>5.2.0</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

0 commit comments

Comments
 (0)