Skip to content

Commit 93f14a5

Browse files
chore: update ci workflows and deps (#170)
* update ci worklows and deps * clean up unused deps * use kafka bom * update grpc utils * update kafka streams framework
1 parent 53a8290 commit 93f14a5

19 files changed

Lines changed: 86 additions & 152 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,6 @@ jobs:
2828
- name: Checkout repository
2929
uses: actions/checkout@v3
3030

31-
- name: create checksum file
32-
uses: hypertrace/github-actions/checksum@main
33-
34-
- name: create checksum file
35-
uses: hypertrace/github-actions/checksum@main
36-
37-
- name: Cache packages
38-
uses: actions/cache@v2
39-
with:
40-
path: ~/.gradle
41-
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
42-
restore-keys: |
43-
gradle-packages-${{ runner.os }}-${{ github.job }}
44-
gradle-packages-${{ runner.os }}
45-
4631
# Initializes the CodeQL tools for scanning.
4732
- name: Initialize CodeQL
4833
uses: github/codeql-action/init@v2

.github/workflows/merge-publish.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,21 @@ 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 }}
3523

36-
- name: push docker image
24+
- name: Push docker image
3725
uses: hypertrace/github-actions/gradle@main
3826
with:
3927
args: dockerPushImages

.github/workflows/pr-build.yml

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,39 @@ 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
32+
33+
- name: Run Trivy vulnerability scanner
34+
uses: hypertrace/github-actions/trivy-image-scan@main
35+
with:
36+
image: hypertrace/config-service
37+
output-mode: github
4438

4539
validate-protos:
46-
runs-on: ubuntu-20.04
47-
container:
48-
image: bufbuild/buf:0.35.1
49-
credentials:
50-
username: ${{ secrets.DOCKERHUB_READ_USER }}
51-
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
40+
runs-on: ubuntu-22.04
5241
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
5342
steps:
5443
- name: Check out code
55-
uses: actions/checkout@v2.3.4
44+
uses: actions/checkout@v3
5645
with:
5746
ref: ${{github.event.pull_request.head.ref}}
5847
repository: ${{github.event.pull_request.head.repo.full_name}}
@@ -69,21 +58,4 @@ jobs:
6958
- name: Check for breaking changes
7059
uses: bufbuild/buf-breaking-action@v1
7160
with:
72-
against: '.git#branch=origin/main'
73-
74-
snyk-scan:
75-
runs-on: ubuntu-20.04
76-
steps:
77-
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
78-
- name: Check out code
79-
uses: actions/checkout@v2.3.4
80-
with:
81-
ref: ${{github.event.pull_request.head.ref}}
82-
repository: ${{github.event.pull_request.head.repo.full_name}}
83-
fetch-depth: 0
84-
- name: Setup snyk
85-
uses: snyk/actions/setup@0.3.0
86-
- name: Snyk test
87-
run: snyk test --all-sub-projects --org=hypertrace --severity-threshold=low --policy-path=.snyk --configuration-matching='^runtimeClasspath$' --remote-repo-url='${{ github.server_url }}/${{ github.repository }}.git'
88-
env:
89-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
61+
against: '.git#branch=origin/main'

.github/workflows/pr-test.yml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,21 @@ 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
1717

18-
- name: create checksum file
19-
uses: hypertrace/github-actions/checksum@main
20-
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
@@ -45,25 +32,31 @@ jobs:
4532
args: jacocoIntegrationTestReport
4633

4734
- name: Upload coverage to Codecov
48-
uses: codecov/codecov-action@v2
35+
uses: codecov/codecov-action@v3
4936
with:
5037
name: integration test reports
5138
flags: integration
5239

5340
- name: Publish Unit Test Results
54-
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1.6
41+
uses: EnricoMi/publish-unit-test-result-action@v2
5542
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
5643
with:
5744
github_token: ${{ secrets.GITHUB_TOKEN }}
5845
files: ./**/build/test-results/**/*.xml
5946

6047
validate-helm-charts:
61-
runs-on: ubuntu-20.04
48+
runs-on: ubuntu-22.04
6249
steps:
6350
- name: Check out code
64-
uses: actions/checkout@v2.3.4
51+
uses: actions/checkout@v3
6552
with:
6653
fetch-depth: 0
6754

6855
- name: validate charts
6956
uses: hypertrace/github-actions/validate-charts@main
57+
58+
dependency-check:
59+
runs-on: ubuntu-22.04
60+
steps:
61+
- name: Dependency Check
62+
uses: hypertrace/github-actions/dependency-check@main

.github/workflows/publish.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,21 @@ 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
1818

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 }}
30-
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 }}
3624

37-
- name: publish docker image
25+
- name: Publish docker image
3826
uses: hypertrace/github-actions/gradle@main
3927
with:
4028
args: publish dockerPushImages
@@ -47,11 +35,11 @@ jobs:
4735

4836
publish-helm-charts:
4937
needs: publish-artifacts
50-
runs-on: ubuntu-20.04
38+
runs-on: ubuntu-22.04
5139
steps:
5240
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
5341
- name: Checkout Repository
54-
uses: actions/checkout@v2.3.4
42+
uses: actions/checkout@v3
5543
with:
5644
fetch-depth: 0
5745

@@ -62,9 +50,9 @@ jobs:
6250
helm-gcs-repository: ${{ secrets.HELM_GCS_REPOSITORY }}
6351

6452
publish-release-notes:
65-
runs-on: ubuntu-20.04
53+
runs-on: ubuntu-22.04
6654
steps:
67-
- uses: actions/checkout@v2.3.4
55+
- uses: actions/checkout@v3
6856
with:
6957
fetch-depth: 0
7058
- uses: hypertrace/github-actions/release-notes@main

.snyk

Lines changed: 0 additions & 9 deletions
This file was deleted.

alerting-config-service-api/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import com.google.protobuf.gradle.protoc
77

88
plugins {
99
`java-library`
10-
id("com.google.protobuf") version "0.8.17"
10+
id("com.google.protobuf")
1111
id("org.hypertrace.publish-plugin")
1212
}
1313

build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ plugins {
77
id("org.hypertrace.docker-publish-plugin") version "0.9.4" apply false
88
id("org.hypertrace.integration-test-plugin") version "0.2.0" apply false
99
id("org.hypertrace.code-style-plugin") version "1.1.2" apply false
10+
id("com.google.protobuf") version "0.8.19" apply false
11+
id("org.owasp.dependencycheck") version "8.2.1"
1012
}
1113

1214
subprojects {
@@ -26,3 +28,10 @@ subprojects {
2628

2729
apply(plugin = "org.hypertrace.code-style-plugin")
2830
}
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+
}

config-service-api/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import com.google.protobuf.gradle.protoc
88
plugins {
99
`java-library`
1010
`java-test-fixtures`
11-
id("com.google.protobuf") version "0.8.17"
11+
id("com.google.protobuf")
1212
id("org.hypertrace.publish-plugin")
1313
}
1414

config-service-change-event-api/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import com.google.protobuf.gradle.protoc
33

44
plugins {
55
`java-library`
6-
id("com.google.protobuf") version "0.8.17"
6+
id("com.google.protobuf")
77
id("org.hypertrace.publish-plugin")
88
}
99

@@ -23,5 +23,6 @@ sourceSets {
2323

2424
dependencies {
2525
api(libs.protobuf.java)
26+
api(platform(libs.kafka.bom))
2627
api(libs.kafka.clients)
2728
}

0 commit comments

Comments
 (0)