Skip to content

Commit 99e6cf0

Browse files
ci: update ci workflows (#130)
1 parent 7fd5a3e commit 99e6cf0

File tree

7 files changed

+46
-87
lines changed

7 files changed

+46
-87
lines changed

.github/workflows/merge-publish.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,16 @@ on:
77

88
jobs:
99
merge-publish:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
steps:
1212
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
1313
- name: Check out code
14-
uses: actions/checkout@v2.3.4
14+
uses: actions/checkout@v3
1515
with:
1616
fetch-depth: 0
17-
18-
- name: create checksum file
19-
uses: hypertrace/github-actions/checksum@main
20-
21-
- name: Cache packages
22-
uses: actions/cache@v2
23-
with:
24-
path: ~/.gradle
25-
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
26-
restore-keys: |
27-
gradle-packages-${{ runner.os }}-${{ github.job }}
28-
gradle-packages-${{ runner.os }}
2917

3018
- name: Login to Docker Hub
31-
uses: docker/login-action@v1
19+
uses: docker/login-action@v2
3220
with:
3321
username: ${{ secrets.DOCKERHUB_READ_USER }}
3422
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}

.github/workflows/pr-build.yml

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,32 @@ on:
99

1010
jobs:
1111
build:
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-22.04
1313
steps:
1414
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
1515
- name: Check out code
16-
uses: actions/checkout@v2.3.4
16+
uses: actions/checkout@v3
1717
with:
1818
ref: ${{github.event.pull_request.head.ref}}
1919
repository: ${{github.event.pull_request.head.repo.full_name}}
2020
fetch-depth: 0
2121

22-
- name: create checksum file
23-
uses: hypertrace/github-actions/checksum@main
24-
25-
- name: Cache packages
26-
uses: actions/cache@v2
27-
with:
28-
path: ~/.gradle
29-
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
30-
restore-keys: |
31-
gradle-packages-${{ runner.os }}-${{ github.job }}
32-
gradle-packages-${{ runner.os }}
33-
3422
- name: Login to Docker Hub
35-
uses: docker/login-action@v1
23+
uses: docker/login-action@v2
3624
with:
3725
username: ${{ secrets.DOCKERHUB_READ_USER }}
3826
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
3927

4028
- name: Build with Gradle
4129
uses: hypertrace/github-actions/gradle@main
4230
with:
43-
args: build dockerBuildImages
31+
args: assemble dockerBuildImages
4432

4533
validate-helm-charts:
46-
runs-on: ubuntu-20.04
34+
runs-on: ubuntu-22.04
4735
steps:
4836
- name: Check out code
49-
uses: actions/checkout@v2.3.4
37+
uses: actions/checkout@v3
5038
with:
5139
ref: ${{github.event.pull_request.head.ref}}
5240
repository: ${{github.event.pull_request.head.repo.full_name}}
@@ -55,19 +43,3 @@ jobs:
5543
- name: validate charts
5644
uses: hypertrace/github-actions/validate-charts@main
5745

58-
snyk-scan:
59-
runs-on: ubuntu-20.04
60-
steps:
61-
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
62-
- name: Check out code
63-
uses: actions/[email protected]
64-
with:
65-
ref: ${{github.event.pull_request.head.ref}}
66-
repository: ${{github.event.pull_request.head.repo.full_name}}
67-
fetch-depth: 0
68-
- name: Setup snyk
69-
uses: snyk/actions/[email protected]
70-
- name: Snyk test
71-
run: snyk test --all-sub-projects --org=hypertrace --severity-threshold=low --policy-path=.snyk --remote-repo-url='${{ github.server_url }}/${{ github.repository }}.git'
72-
env:
73-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

.github/workflows/pr-test.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,33 @@ on:
77

88
jobs:
99
test:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
steps:
1212
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
1313
- name: Check out code
14-
uses: actions/checkout@v2.3.4
14+
uses: actions/checkout@v3
1515
with:
1616
fetch-depth: 0
17-
18-
- name: create checksum file
19-
uses: hypertrace/github-actions/checksum@main
2017

21-
- name: Cache packages
22-
id: cache-packages
23-
uses: actions/cache@v2
24-
with:
25-
path: ~/.gradle
26-
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
27-
restore-keys: |
28-
gradle-packages-${{ runner.os }}-${{ github.job }}
29-
gradle-packages-${{ runner.os }}
30-
31-
- name: Unit test
18+
- name: Unit test and other verification
3219
uses: hypertrace/github-actions/gradle@main
3320
with:
34-
args: jacocoTestReport
21+
args: check jacocoTestReport
3522

3623
- name: Upload coverage to Codecov
37-
uses: codecov/codecov-action@v2
24+
uses: codecov/codecov-action@v3
3825
with:
3926
name: unit test reports
4027
flags: unit
4128

4229
- name: Publish Unit Test Results
43-
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v2
30+
uses: EnricoMi/publish-unit-test-result-action@v2
4431
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
4532
with:
4633
github_token: ${{ secrets.GITHUB_TOKEN }}
47-
junit_files: ./**/build/test-results/**/*.xml
34+
files: ./**/build/test-results/**/*.xml
35+
dependency-check:
36+
runs-on: ubuntu-22.04
37+
steps:
38+
- name: Dependency Check
39+
uses: hypertrace/github-actions/dependency-check@main

.github/workflows/publish.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,16 @@ on:
88

99
jobs:
1010
publish-artifacts:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-22.04
1212
steps:
1313
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
1414
- name: Check out code
15-
uses: actions/checkout@v2.3.4
15+
uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0
18-
19-
- name: create checksum file
20-
uses: hypertrace/github-actions/checksum@main
21-
22-
- name: Cache packages
23-
uses: actions/cache@v2
24-
with:
25-
path: ~/.gradle
26-
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
27-
restore-keys: |
28-
gradle-packages-${{ runner.os }}-${{ github.job }}
29-
gradle-packages-${{ runner.os }}
3018

3119
- name: Login to Docker Hub
32-
uses: docker/login-action@v1
20+
uses: docker/login-action@v2
3321
with:
3422
username: ${{ secrets.DOCKERHUB_READ_USER }}
3523
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
@@ -44,11 +32,11 @@ jobs:
4432

4533
publish-helm-charts:
4634
needs: publish-artifacts
47-
runs-on: ubuntu-20.04
35+
runs-on: ubuntu-22.04
4836
steps:
4937
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
5038
- name: Checkout Repository
51-
uses: actions/checkout@v2.3.4
39+
uses: actions/checkout@v3
5240
with:
5341
fetch-depth: 0
5442

build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
id("org.hypertrace.docker-java-application-plugin") version "0.9.5" apply false
66
id("org.hypertrace.docker-publish-plugin") version "0.9.5" apply false
77
id("org.hypertrace.code-style-plugin") version "1.1.2" apply false
8+
id("org.owasp.dependencycheck") version "8.1.2"
89
}
910

1011
subprojects {
@@ -27,3 +28,10 @@ subprojects {
2728
}
2829
}
2930
}
31+
32+
dependencyCheck {
33+
format = org.owasp.dependencycheck.reporting.ReportGenerator.Format.ALL.toString()
34+
suppressionFile = "owasp-suppressions.xml"
35+
scanConfigurations.add("runtimeClasspath")
36+
failBuildOnCVSS = 7.0F
37+
}

hypertrace-core-graphql-platform/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies {
3636
api("com.fasterxml.jackson.core:jackson-databind:2.13.4")
3737
api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.4")
3838
api("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.4")
39-
api("com.fasterxml.jackson:jackson-bom:2.13.4")
39+
api("com.fasterxml.jackson:jackson-bom:2.14.2")
4040
api("org.apache.commons:commons-text:1.10.0")
4141
api("io.opentelemetry:opentelemetry-proto:1.1.0-alpha")
4242

owasp-suppressions.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
3+
<suppress>
4+
<notes><![CDATA[
5+
Any hypertrace dep
6+
]]></notes>
7+
<packageUrl regex="true">^pkg:maven/org\.hypertrace\..*@.*$</packageUrl>
8+
<cpe>cpe:/a:grpc:grpc</cpe>
9+
<cpe>cpe:/a:utils_project:utils</cpe>
10+
</suppress>
11+
</suppressions>

0 commit comments

Comments
 (0)