Skip to content

Commit ea31d4b

Browse files
committed
Merge branch 'develop' into TASK-6217
2 parents ea7ff4e + 4e988e2 commit ea31d4b

File tree

23 files changed

+608
-143
lines changed

23 files changed

+608
-143
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Compare vulnerabilities (Syft SBOM -> Grype) between two branches
2+
run-name: 'Compare vulnerabilities between ${{ inputs.branch_a }} (base) and ${{ inputs.branch_b }} (head) by @${{ github.actor }}'
3+
on:
4+
workflow_call:
5+
inputs:
6+
branch_a:
7+
type: string
8+
description: 'Base branch (e.g. develop)'
9+
required: true
10+
branch_b:
11+
type: string
12+
description: 'Head branch (e.g. TASK-1234)'
13+
required: true
14+
secrets:
15+
SLACK_SECURITY_WEBHOOK_URL:
16+
required: false
17+
18+
workflow_dispatch:
19+
inputs:
20+
branch_a:
21+
description: 'Base branch (e.g. develop)'
22+
required: true
23+
default: 'develop'
24+
branch_b:
25+
description: 'Head branch (e.g. TASK-1234)'
26+
required: true
27+
28+
jobs:
29+
compare-branches:
30+
runs-on: ${{ vars.UBUNTU_VERSION }}
31+
32+
steps:
33+
# 1) Checkout head branch only
34+
- name: Checkout head branch
35+
uses: actions/checkout@v4
36+
with:
37+
ref: ${{ github.event.inputs.branch_b }}
38+
fetch-depth: 0
39+
fetch-tags: true
40+
41+
- name: Set up JDK 8
42+
uses: actions/setup-java@v4
43+
with:
44+
distribution: 'temurin'
45+
java-version: '8'
46+
cache: 'maven'
47+
# 3) Run the action
48+
- name: Vulnerability Diff (Syft+Grype)
49+
uses: sec-open/vuln-diff-action@v2.0.0-alpha.1
50+
with:
51+
base_ref: ${{ github.event.inputs.branch_a }} # pass 'develop'
52+
head_ref: ${{ github.event.inputs.branch_b }} # pass 'TASK-7908'
53+
html_logo_url: "https://zettagenomics.com/wp-content/uploads/2022/10/Zetta-reversed-out-full-logo-dark-background.png"
54+
55+
56+
# build_command: ""
57+
# write_summary: "true"
58+
# upload_artifact: "true"
59+
# artifact_name: "vulnerability-diff-${{ github.event.inputs.branch_a }}-vs-${{ github.event.inputs.branch_b }}"
60+
# report_html: "true"
61+
# report_pdf: "true"
62+
# min_severity: "LOW"
63+
# title_logo_url: "https://zettagenomics.com/wp-content/uploads/2022/10/Zetta-reversed-out-full-logo-dark-background.png"
64+

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
3434
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
3535
- name: Deploy to Maven Central repository
36-
run: mvn clean deploy -DskipTests -P deploy-maven ${{ inputs.maven_opts }} --no-transfer-progress
36+
run: mvn clean deploy -DskipTests -Pdeploy-maven ${{ inputs.maven_opts }} --no-transfer-progress
3737
env:
3838
MAVEN_NEXUS_USER: ${{ secrets.MAVEN_USER_TOKEN }}
3939
MAVEN_NEXUS_PASSWORD: ${{ secrets.MAVEN_PASSWORD_TOKEN }}
@@ -44,6 +44,6 @@ jobs:
4444
distribution: 'temurin'
4545
java-version: '8'
4646
- name: Deploy to GitHub Packages repository
47-
run: mvn clean deploy -DskipTests -P deploy-github ${{ inputs.maven_opts }} --no-transfer-progress
47+
run: mvn clean deploy -DskipTests -Pdeploy-github ${{ inputs.maven_opts }} --no-transfer-progress
4848
env:
4949
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Reusable workflow to push in DockerHub
1+
name: Reusable workflow to push in Zettagenomics DockerHub
22

33
on:
44
workflow_call:
@@ -46,4 +46,3 @@ jobs:
4646
logout: true
4747
- name: Deploy in Docker Hub
4848
run: ${{ inputs.cli }} --org zettagenomics
49-

.github/workflows/pull-request-approved.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
test:
3636
name: "Run all tests before merging"
3737
needs: calculate-xetabase-branch
38-
uses: opencb/java-common-libs/.github/workflows/test-xetabase-workflow.yml@develop
38+
uses: ./.github/workflows/test-xetabase-workflow.yml
3939
with:
4040
branch: ${{ needs.calculate-xetabase-branch.outputs.xetabase_branch }}
4141
task: ${{ github.event.pull_request.head.ref }}

.github/workflows/test-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
check_name: "Surefire tests report"
4040
report_paths: './**/surefire-reports/TEST-*.xml'
4141
commit: '${{ github.sha }}'
42-
fail_on_test_failures: true
42+
fail_on_test_failures: true

.github/workflows/test-xetabase-workflow.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,6 @@ jobs:
7777
with:
7878
mongodb-version: 6.0
7979
mongodb-replica-set: rs-test
80-
- name: K8s Tunnel MongoDB
81-
run: |
82-
wget https://dl.k8s.io/release/v1.28.2/bin/linux/amd64/kubectl
83-
chmod +x ./kubectl
84-
echo "${{ secrets.AZURE_KUBE_CONFIG }}" > admin.conf
85-
./kubectl -n cellbase-db port-forward services/cellbase-rs0-svc 27018:27017 --kubeconfig ./admin.conf &
86-
- name: DockerHub login
87-
uses: docker/login-action@v3
88-
with:
89-
username: ${{ env.DOCKER_HUB_USER }}
90-
password: ${{ env.DOCKER_HUB_PASSWORD }}
9180
- name: Install sshpass
9281
run: sudo apt-get install sshpass
9382
- name: Add SSH Host to known_hosts
@@ -97,11 +86,11 @@ jobs:
9786
env:
9887
SSH_HOST: ${{ env.SSH_HOST }}
9988
SSH_PORT: ${{ env.SSH_PORT }}
100-
- name: Run all OpenCB Junit tests, ie. java-common-libs, biodata, cellbase, opencga and opencga-enterprise
89+
- name: Run all OpenCB Junit tests, ie. java-common-libs, biodata, opencga and opencga-enterprise
10190
run: |
10291
cd opencga-enterprise
10392
ln -s ../opencga opencga-home
104-
./build.sh -t -l runShortTests -b -s -T ${{ inputs.task }} -c localhost:27018 -H hdp3.1
93+
./build.sh -t -l runShortTests -b -s -T ${{ inputs.task }}
10594
- name: Upload reports results to Github
10695
uses: actions/upload-artifact@v4
10796
with:

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
<artifactId>commons-datastore-core</artifactId>
1414
<packaging>jar</packaging>
1515

16+
<name>OpenCB commons-datastore-core project</name>
17+
<description>OpenCB commons project contains several Java libs for Bioinformatics</description>
18+
<url>http://www.opencb.org</url>
19+
1620
<dependencies>
1721
<dependency>
1822
<groupId>com.fasterxml.jackson.core</groupId>

commons-datastore/commons-datastore-core/src/main/java/org/opencb/commons/datastore/core/ObjectMap.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public class ObjectMap implements Map<String, Object>, Serializable {
3838

3939
private static final Pattern KEY_SPLIT_PATTERN = Pattern.compile("(^[^\\[\\].]+(?:\\[[^\\]]+\\])?)(?:\\.(.*))*");
4040
private static final Pattern LIST_FILTER_PATTERN = Pattern.compile("([^\\[\\]]+)\\[([^=]*?)(?:[=]?)([^=]+)\\]$");
41-
public static final Pattern COMMA_SEPARATED_LIST_SPLIT_PATTERN = Pattern.compile("((?:(?!,\\S).)+)+");
4241

4342
public ObjectMap() {
4443
objectMap = new LinkedHashMap<>();

commons-datastore/commons-datastore-core/src/test/java/org/opencb/commons/datastore/core/ObjectMapTest.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -263,35 +263,4 @@ public void testGetWithFilterFromList() {
263263
assertEquals("CGHI", objectMap.get("nestedList[nested.value=G].nested.list[id=Cghi].name"));
264264
}
265265

266-
@Test
267-
public void testPatternListSplit() {
268-
List<String> originalValues = Arrays.asList("disorder1", "disorder2, blabla", "disorder3");
269-
objectMap.put("key", StringUtils.join(originalValues, ","));
270-
objectMap.put("key1", "");
271-
objectMap.put("key2", "my value");
272-
objectMap.put("key3", Arrays.asList("1", "2"));
273-
objectMap.put("key4", Arrays.asList(1, 2));
274-
275-
List<String> values = objectMap.getAsStringList("key", ObjectMap.COMMA_SEPARATED_LIST_SPLIT_PATTERN);
276-
assertEquals(originalValues.size(), values.size());
277-
assertTrue(originalValues.containsAll(values));
278-
279-
values = objectMap.getAsStringList("key1", ObjectMap.COMMA_SEPARATED_LIST_SPLIT_PATTERN);
280-
assertEquals(1, values.size());
281-
assertEquals("", values.get(0));
282-
283-
values = objectMap.getAsStringList("key2", ObjectMap.COMMA_SEPARATED_LIST_SPLIT_PATTERN);
284-
assertEquals(1, values.size());
285-
assertEquals("my value", values.get(0));
286-
287-
values = objectMap.getAsStringList("key3", ObjectMap.COMMA_SEPARATED_LIST_SPLIT_PATTERN);
288-
assertEquals(2, values.size());
289-
assertEquals("1", values.get(0));
290-
assertEquals("2", values.get(1));
291-
292-
values = objectMap.getAsStringList("key4", ObjectMap.COMMA_SEPARATED_LIST_SPLIT_PATTERN);
293-
assertEquals(2, values.size());
294-
assertEquals("1", values.get(0));
295-
assertEquals("2", values.get(1));
296-
}
297266
}

commons-datastore/commons-datastore-mongodb/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
<artifactId>commons-datastore-mongodb</artifactId>
1414
<packaging>jar</packaging>
1515

16+
<name>OpenCB commons-datastore-mongodb project</name>
17+
<description>OpenCB commons project contains several Java libs for Bioinformatics</description>
18+
<url>http://www.opencb.org</url>
19+
1620
<dependencies>
1721
<dependency>
1822
<groupId>org.opencb.commons</groupId>

0 commit comments

Comments
 (0)