Skip to content

Commit 23f1f0f

Browse files
ci: update ci, vulns (#161)
* ci: update ci, vulns * ci: update a few missed versions
1 parent bf2f2e4 commit 23f1f0f

File tree

13 files changed

+72
-159
lines changed

13 files changed

+72
-159
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
jobs:
1414
analyze:
1515
name: Analyze
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-22.04
1717
permissions:
1818
actions: read
1919
contents: read
@@ -28,30 +28,15 @@ 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
4934
with:
5035
languages: ${{ matrix.language }}
5136

52-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
53-
- name: Autobuild
54-
uses: github/codeql-action/autobuild@v2
37+
- uses: hypertrace/github-actions/gradle@main
38+
with:
39+
args: assemble
5540

5641
- name: Perform CodeQL Analysis
5742
uses: github/codeql-action/analyze@v2

.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: 9 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,77 +9,41 @@ 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
21-
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 }}
3321

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

45-
- name: Determine docker tag
46-
id: tag
47-
run: echo ::set-output name=tag::$(./gradlew -q printDockerImageDefaultTag | head -1)
48-
49-
- name: Scan docker image
50-
uses: azure/container-scan@v0.1
33+
- name: Run Trivy vulnerability scanner
34+
uses: hypertrace/github-actions/trivy-image-scan@main
5135
with:
52-
image-name: hypertrace/attribute-service:${{ steps.tag.outputs.tag }}
53-
env:
54-
DOCKLE_HOST: "unix:///var/run/docker.sock"
55-
continue-on-error: true
36+
image: hypertrace/attribute-service
5637

5738
validate-helm-charts:
58-
runs-on: ubuntu-20.04
39+
runs-on: ubuntu-22.04
5940
steps:
6041
- name: Check out code
61-
uses: actions/checkout@v2.3.4
42+
uses: actions/checkout@v3
6243
with:
6344
ref: ${{github.event.pull_request.head.ref}}
6445
repository: ${{github.event.pull_request.head.repo.full_name}}
6546
fetch-depth: 0
6647

6748
- name: validate charts
6849
uses: hypertrace/github-actions/validate-charts@main
69-
70-
snyk-scan:
71-
runs-on: ubuntu-20.04
72-
steps:
73-
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
74-
- name: Check out code
75-
uses: actions/checkout@v2.3.4
76-
with:
77-
ref: ${{github.event.pull_request.head.ref}}
78-
repository: ${{github.event.pull_request.head.repo.full_name}}
79-
fetch-depth: 0
80-
- name: Setup snyk
81-
uses: snyk/actions/setup@0.3.0
82-
- name: Snyk test
83-
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'
84-
env:
85-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

.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
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
@@ -45,26 +32,32 @@ 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: copy test reports
5441
uses: hypertrace/github-actions/gradle@main
42+
if: always()
5543
with:
5644
args: copyAllReports --output-dir=/tmp/test-reports
5745

5846
- name: Archive test reports
59-
uses: actions/upload-artifact@v1
47+
uses: actions/upload-artifact@v3
6048
with:
6149
name: test-reports
6250
path: /tmp/test-reports
6351
if: always()
64-
52+
6553
- name: Publish Unit Test Results
66-
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1.6
54+
uses: EnricoMi/publish-unit-test-result-action@v2
6755
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
6856
with:
6957
github_token: ${{ secrets.GITHUB_TOKEN }}
7058
files: ./**/build/test-results/**/*.xml
59+
dependency-check:
60+
runs-on: ubuntu-22.04
61+
steps:
62+
- name: Dependency Check
63+
uses: hypertrace/github-actions/dependency-check@main

.github/workflows/publish.yml

Lines changed: 7 additions & 19 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 }}
@@ -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

attribute-service-api/build.gradle.kts

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,24 @@
1-
import com.google.protobuf.gradle.generateProtoTasks
21
import com.google.protobuf.gradle.id
3-
import com.google.protobuf.gradle.ofSourceSet
4-
import com.google.protobuf.gradle.plugins
5-
import com.google.protobuf.gradle.protobuf
6-
import com.google.protobuf.gradle.protoc
72

83
plugins {
94
`java-library`
10-
id("com.google.protobuf") version "0.8.18"
5+
id("com.google.protobuf") version "0.9.2"
116
id("org.hypertrace.publish-plugin")
127
}
138

14-
val generateLocalGoGrpcFiles = false
15-
169
protobuf {
1710
protoc {
1811
artifact = "com.google.protobuf:protoc:3.21.12"
1912
}
2013
plugins {
21-
id("grpc_java") {
22-
artifact = "io.grpc:protoc-gen-grpc-java:1.44.0"
23-
}
24-
25-
if (generateLocalGoGrpcFiles) {
26-
id("grpc_go") {
27-
path = "<go-path>/bin/protoc-gen-go"
28-
}
14+
id("grpc") {
15+
artifact = "io.grpc:protoc-gen-grpc-java:1.50.0"
2916
}
3017
}
3118
generateProtoTasks {
32-
ofSourceSet("main").forEach {
33-
it.plugins {
34-
// Apply the "grpc" plugin whose spec is defined above, without options.
35-
id("grpc_java")
36-
37-
if (generateLocalGoGrpcFiles) {
38-
id("grpc_go")
39-
}
40-
}
41-
it.builtins {
42-
java
43-
if (generateLocalGoGrpcFiles) {
44-
id("go")
45-
}
19+
ofSourceSet("main").configureEach {
20+
plugins {
21+
id("grpc")
4622
}
4723
}
4824
}
@@ -51,7 +27,7 @@ protobuf {
5127
sourceSets {
5228
main {
5329
java {
54-
srcDirs("src/main/java", "build/generated/source/proto/main/java", "build/generated/source/proto/main/grpc_java")
30+
srcDirs("build/generated/source/proto/main/java", "build/generated/source/proto/main/grpc_java")
5531
}
5632
}
5733
}

attribute-service-client/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ dependencies {
77
api(project(":attribute-service-api"))
88
api("com.typesafe:config:1.4.1")
99

10-
implementation("org.hypertrace.core.grpcutils:grpc-client-utils:0.7.2")
10+
implementation("org.hypertrace.core.grpcutils:grpc-client-utils:0.11.2")
1111
}

attribute-service-factory/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies {
66
api("org.hypertrace.core.serviceframework:platform-grpc-service-framework:0.1.49")
77

88
// Only required because AttributeService constructor test overload uses a doc store API
9-
compileOnly("org.hypertrace.core.documentstore:document-store:0.7.20")
9+
compileOnly("org.hypertrace.core.documentstore:document-store:0.7.26")
1010

1111
implementation(project(":attribute-service-impl"))
1212
}

attribute-service-impl/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ dependencies {
88
api(project(":attribute-service-api"))
99
implementation(project(":attribute-service-tenant-api"))
1010

11-
implementation("org.hypertrace.core.documentstore:document-store:0.7.20")
12-
implementation("org.hypertrace.core.grpcutils:grpc-context-utils:0.9.0")
11+
implementation("org.hypertrace.core.documentstore:document-store:0.7.26")
12+
implementation("org.hypertrace.core.grpcutils:grpc-context-utils:0.11.2")
1313

1414
implementation("com.fasterxml.jackson.core:jackson-databind:2.14.2")
1515
implementation("com.typesafe:config:1.4.1")

attribute-service/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ dependencies {
6464
integrationTestImplementation("com.google.guava:guava:31.1-jre")
6565
integrationTestImplementation(project(":attribute-service-client"))
6666
integrationTestImplementation("org.hypertrace.core.serviceframework:integrationtest-service-framework:0.1.49")
67-
integrationTestImplementation("org.hypertrace.core.grpcutils:grpc-context-utils:0.9.0")
67+
integrationTestImplementation("org.hypertrace.core.grpcutils:grpc-context-utils:0.11.2")
6868
}
6969

7070
application {

0 commit comments

Comments
 (0)