Skip to content

Commit b4b4381

Browse files
pflynn-virtruclaude
andcommitted
chore(ci): add dev artifact workflow and standardize Java 17/temurin
- Add dev artifact workflow to publish cmdline.jar on push to main - Force-update dev tag to latest commit before publishing release - Standardize all workflows to Java 17 with eclipse-temurin distribution - Use @main for platform test actions (bleeding edge testing) - Run xtest in parallel with platform-integration - Remove multi-KAS steps from platform-integration (covered by xtest) - Test against platform main and latest (not lts) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f93d332 commit b4b4381

3 files changed

Lines changed: 62 additions & 53 deletions

File tree

.github/workflows/checks.yaml

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
7575
with:
7676
java-version: "17"
77-
distribution: "adopt"
77+
distribution: "temurin"
7878
server-id: github
7979
- name: Cache SonarCloud packages
8080
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
@@ -102,7 +102,7 @@ jobs:
102102
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
103103
with:
104104
java-version: "17"
105-
distribution: "adopt"
105+
distribution: "temurin"
106106
server-id: github
107107
- name: Build java SDK
108108
run: |
@@ -239,63 +239,17 @@ jobs:
239239
fi
240240
working-directory: cmdline
241241

242-
- name: Start additional kas
243-
uses: opentdf/platform/test/start-additional-kas@main
244-
with:
245-
kas-port: 8282
246-
kas-name: beta
247-
248-
- name: Make sure that the second platform is up
249-
run: |
250-
grpcurl -plaintext localhost:8282 kas.AccessService/PublicKey
251-
- name: Validate multikas through the command line interface
252-
run: |
253-
printf 'here is some data to encrypt' > data
254-
255-
java -jar target/cmdline.jar \
256-
--client-id=opentdf-sdk \
257-
--client-secret=secret \
258-
--platform-endpoint=http://localhost:8080 \
259-
-h\
260-
encrypt --kas-url=http://localhost:8080,http://localhost:8282 -f data -m 'here is some metadata' > test.tdf
261-
262-
java -jar target/cmdline.jar \
263-
--client-id=opentdf-sdk \
264-
--client-secret=secret \
265-
--platform-endpoint=http://localhost:8080 \
266-
-h\
267-
decrypt -f test.tdf --kas-allowlist http://localhost:8080,http://localhost:8282 > decrypted
268-
269-
java -jar target/cmdline.jar \
270-
--client-id=opentdf-sdk \
271-
--client-secret=secret \
272-
--platform-endpoint=http://localhost:8080 \
273-
-h\
274-
metadata -f test.tdf --kas-allowlist http://localhost:8080,http://localhost:8282 > metadata
275-
276-
if ! diff -q data decrypted; then
277-
printf 'decrypted data is incorrect [%s]' "$(< decrypted)"
278-
exit 1
279-
fi
280-
281-
if [ "$(< metadata)" != 'here is some metadata' ]; then
282-
printf 'metadata is incorrect [%s]\n' "$(< metadata)"
283-
exit 1
284-
fi
285-
working-directory: cmdline
286-
287242
platform-xtest:
288243
permissions:
289244
contents: read
290245
packages: read
291246
checks: write
292247
pull-requests: write
293-
needs: platform-integration
294248
uses: opentdf/tests/.github/workflows/xtest.yml@main
295249
with:
296250
focus-sdk: java
297251
java-ref: ${{ github.ref }} latest
298-
platform-ref: main lts
252+
platform-ref: main latest
299253

300254
ci:
301255
needs:
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish Dev Artifact
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
publish-dev-artifact:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
16+
- name: Setup Buf
17+
uses: bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99 # v1.50.0
18+
with:
19+
github_token: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- name: Cache Maven packages
22+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
23+
with:
24+
path: ~/.m2
25+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
26+
restore-keys: ${{ runner.os }}-m2
27+
28+
- name: Set up JDK
29+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
30+
with:
31+
java-version: "17"
32+
distribution: "temurin"
33+
34+
- name: Build cmdline
35+
run: mvn --batch-mode clean package -DskipTests
36+
env:
37+
BUF_INPUT_HTTPS_USERNAME: opentdf-bot
38+
BUF_INPUT_HTTPS_PASSWORD: ${{ secrets.PERSONAL_ACCESS_TOKEN_OPENTDF }}
39+
40+
- name: Update dev tag
41+
run: |
42+
git tag -f dev
43+
git push origin dev -f
44+
45+
- name: Publish dev release
46+
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
47+
with:
48+
tag_name: dev
49+
name: "dev (${{ github.sha }})"
50+
body: |
51+
Development build from main branch.
52+
53+
**Commit:** [`${{ github.sha }}`](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
54+
prerelease: true
55+
files: cmdline/target/cmdline.jar

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
if: github.ref == 'refs/heads/main'
3636
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
3737
with:
38-
java-version: "11"
39-
distribution: "adopt"
38+
java-version: "17"
39+
distribution: "temurin"
4040
# write settings.xml
4141
server-id: github-pkg
4242
server-username: GITHUB_ACTOR
@@ -57,8 +57,8 @@ jobs:
5757
if: startsWith(github.ref, 'refs/tags/')
5858
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
5959
with:
60-
java-version: "11"
61-
distribution: "adopt"
60+
java-version: "17"
61+
distribution: "temurin"
6262
# write settings.xml
6363
server-id: central
6464
server-username: MAVEN_USERNAME

0 commit comments

Comments
 (0)