Skip to content

Commit 2eb7364

Browse files
authored
chore: updating CICD to support java server sdk package (#19)
This PR copies existing java-server-sdk code from the public repo and takes the same approach as other migrated packages. I made a separate commit for the code copy to make that easier to verify. All code in lib/sdk/server should be identical to the [existing repo ](https://github.com/launchdarkly/java-server-sdk)with no changes intended except for release-please annotations put on [Version.java](https://github.com/launchdarkly/java-core/pull/19/files#diff-880b7c7410f8d25590e54584048633f4068b855561e85ca77ea767b7514bb82f). Please check them carefully.
1 parent 82d3710 commit 2eb7364

File tree

303 files changed

+42269
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

303 files changed

+42269
-1
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: 'Bug report for the java-server-sdk package'
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'package: java-server-sdk, bug'
6+
assignees: ''
7+
---
8+
9+
**Is this a support request?**
10+
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the code in this library. If you're not sure whether the problem you are having is specifically related to this library, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going [here](https://support.launchdarkly.com/) and clicking "submit a request", or by emailing [email protected].
11+
12+
Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.
13+
14+
**Describe the bug**
15+
A clear and concise description of what the bug is.
16+
17+
**To reproduce**
18+
Steps to reproduce the behavior.
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Logs**
24+
If applicable, add any log output related to your problem.
25+
26+
**SDK version**
27+
The version of this SDK that you are using.
28+
29+
**Language version, developer tools**
30+
For instance, Go 1.11 or Ruby 2.5.3. If you are using a language that requires a separate compiler, such as C, please include the name and version of the compiler too.
31+
32+
**OS/platform**
33+
For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3. If your code is running in a browser, please also include the browser type and version.
34+
35+
**Additional context**
36+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request for the java-server-sdk package
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'package: java-server-sdk, enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I would love to see the SDK [...does something new...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context about the feature request here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Contract Tests
2+
description: Runs Contract Tests
3+
inputs:
4+
workspace_path:
5+
description: 'Path to the package.'
6+
required: true
7+
token:
8+
description: 'Github token, used for contract tests'
9+
required: false
10+
default: ''
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Run contract tests
16+
shell: bash
17+
run: make contract-tests -C ${{ inputs.workspace_path }}

.github/workflows/java-server-sdk.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: java-server-sdk
2+
3+
on:
4+
push:
5+
branches: [main, 'feat/**']
6+
paths-ignore:
7+
- '**.md' #Do not need to run CI for markdown changes.
8+
pull_request:
9+
branches: [main, 'feat/**']
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
test-platforms-and-versions:
15+
strategy:
16+
matrix:
17+
os: [windows-2019, ubuntu-20.04]
18+
javaversion: [8, 11, 17, 19]
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- name: Shared CI Steps
24+
uses: ./.github/actions/ci
25+
with:
26+
workspace_path: 'lib/sdk/server'
27+
java_version: ${{ matrix.javaversion }}
28+
29+
- name: Contract Tests
30+
- uses: ./.github/actions/contract-tests
31+
with:
32+
service_project_file: pkgs/sdk/server/contract-tests/TestService.csproj
33+
service_dll_file: pkgs/sdk/server/contract-tests/bin/debug/net6.0/ContractTestService.dll
34+
token: ${{ secrets.GITHUB_TOKEN }}
35+
36+
test-contract-tests:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v3
40+
41+
- name: Shared CI Steps
42+
uses: ./.github/actions/ci
43+
with:
44+
workspace_path: 'lib/sdk/server'
45+
java_version: 8
46+
47+
- name: Contract Tests
48+
uses: ./.github/actions/contract-tests
49+
with:
50+
workspace_path: 'lib/sdk/server'
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
53+
test-packaging:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v3
57+
58+
- name: Shared CI Steps
59+
uses: ./.github/actions/ci
60+
with:
61+
workspace_path: 'lib/sdk/server'
62+
java_version: 8
63+
64+
- name: Publish Maven Local
65+
shell: bash
66+
run: lib/sdk/server/gradlew publishToMavenLocal -p lib/sdk/server -P LD_SKIP_SIGNING=1
67+
68+
- name: Run Packaging Test
69+
shell: bash
70+
run: make all -C lib/sdk/server/packaging-test

.github/workflows/manual-publish-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- lib/java-server-sdk-otel
1010
- lib/shared/common
1111
- lib/shared/internal
12+
- lib/sdk/server
1213
dry_run:
1314
description: 'Is this a dry run. If so no docs will be published.'
1415
type: boolean

.github/workflows/manual-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- lib/java-server-sdk-otel
1111
- lib/shared/common
1212
- lib/shared/internal
13+
- lib/sdk/server
1314
prerelease:
1415
description: 'Is this a prerelease.'
1516
type: boolean

.github/workflows/release-please.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,38 @@ jobs:
2020
token: ${{ secrets.GITHUB_TOKEN }}
2121
target-branch: ${{ github.ref_name }}
2222

23+
release-server-sdk:
24+
runs-on: ubuntu-latest
25+
needs: release-please
26+
permissions:
27+
id-token: write
28+
contents: write
29+
pull-requests: write
30+
if: ${{ needs.release-please.outputs.package-server-sdk-released == 'true'}}
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- uses: launchdarkly/gh-actions/actions/[email protected]
35+
name: Get secrets
36+
with:
37+
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
38+
ssm_parameter_pairs: '/production/common/releasing/sonatype/username = SONATYPE_USER_NAME,
39+
/production/common/releasing/sonatype/password = SONATYPE_PASSWORD'
40+
s3_path_pairs: 'launchdarkly-releaser/java/code-signing-keyring.gpg = code-signing-keyring.gpg'
41+
42+
- uses: ./.github/actions/full-release
43+
with:
44+
workspace_path: lib/sdk/server
45+
dry_run: false
46+
prerelease: false
47+
code_signing_keyring: 'code-signing-keyring.gpg'
48+
signing_key_id: ${{ env.SIGNING_KEY_ID }}
49+
signing_key_passphrase: ${{ env.SIGNING_KEY_PASSPHRASE }}
50+
sonatype_username: ${{ env.SONATYPE_USER_NAME }}
51+
sonatype_password: ${{ env.SONATYPE_PASSWORD }}
52+
aws_role: ${{ vars.AWS_ROLE_ARN }}
53+
token: ${{ secrets.GITHUB_TOKEN }}
54+
2355
release-server-sdk-otel:
2456
runs-on: ubuntu-latest
2557
needs: release-please

.release-please-manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"lib/java-server-sdk-otel": "0.1.0",
33
"lib/shared/common": "2.1.1",
4-
"lib/shared/internal": "1.3.0"
4+
"lib/shared/internal": "1.3.0",
5+
"lib/sdk/server": "7.4.1"
56
}

.sdk_metadata.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": 1,
3+
"sdks": {
4+
"java-server-sdk": {
5+
"name": "Java Server SDK",
6+
"type": "server-side",
7+
"path": "lib/sdk/server",
8+
"languages": [
9+
"Java"
10+
]
11+
}
12+
}
13+
}

lib/sdk/server/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Eclipse project files
2+
.classpath
3+
.project
4+
.settings
5+
6+
# Intellij project files
7+
*.iml
8+
*.ipr
9+
*.iws
10+
.idea/
11+
12+
#Gradle
13+
.gradletasknamecache
14+
.gradle/
15+
build/
16+
bin/
17+
out/
18+
classes/
19+
20+
packaging-test/temp/
21+
benchmarks/lib/

0 commit comments

Comments
 (0)