Skip to content

Commit a0a582d

Browse files
authoredJan 18, 2023
feat(Kubernetes Client): integrate dotnet kubernetes client into KubeOps (#507)
Big "Thank you" to @Silvenga for the initial work on this. This closes #435. This fixes #434. BREAKING CHANGE: This moves to System.Text.Json from Newtonsoft.Json to adhere to the changes in Kubernetes Client upstream. Existing projects must migrate from using `JsonPropertyAttributes` to `JsonPropertyNameAttributes`. The YAML serializer is also shared with `kubernetes-client` and is no longer overridable via injection. `Microsoft.Rest.HttpOperationException` no longer exists, any place this is used must move to `k8s.Autorest.HttpOperationException`.
1 parent 2eb34b4 commit a0a582d

File tree

100 files changed

+1208
-787
lines changed

Some content is hidden

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

100 files changed

+1208
-787
lines changed
 

‎.github/workflows/dotnet-release.yml

+5-14
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,27 @@ on:
77
- next
88

99
jobs:
10-
test:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v3
14-
- name: Setup .NET
15-
uses: actions/setup-dotnet@v3
16-
with:
17-
dotnet-version: 6.0.302
18-
- name: Test
19-
run: ./build.sh --target test --no-logo
2010
semantic-release:
2111
runs-on: ubuntu-latest
22-
needs: test
2312
steps:
2413
- uses: actions/checkout@v3
2514
with:
2615
fetch-depth: 1
16+
2717
- name: Setup .NET
2818
uses: actions/setup-dotnet@v3
2919
with:
30-
dotnet-version: 6.0.302
20+
dotnet-version: 7.x
21+
3122
- name: Semantic Release
3223
uses: cycjimmy/semantic-release-action@v3
3324
with:
3425
semantic_version: 19
3526
extra_plugins: |
3627
@semantic-release/exec
3728
env:
38-
NUGET_SOURCE: 'https://api.nuget.org/v3/index.json'
29+
NUGET_SOURCE: "https://api.nuget.org/v3/index.json"
3930
NUGET_API_KEY: ${{ secrets.NUGET_KEY }}
40-
GH_NUGET_SOURCE: 'https://nuget.pkg.github.com/buehler/index.json'
31+
GH_NUGET_SOURCE: "https://nuget.pkg.github.com/buehler/index.json"
4132
GH_NUGET_API_KEY: ${{ secrets.GITHUB_TOKEN }}
4233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.github/workflows/dotnet-test.yml

+36-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,51 @@
11
name: .NET Testing
22

33
on:
4-
push:
5-
branches:
6-
- "!master"
7-
- "!release"
84
pull_request:
95
branches:
106
- "**"
117

128
jobs:
139
test:
10+
name: Execute Test ${{ matrix.project }}
1411
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
include:
16+
- project: KubeOps.KubernetesClient.Test
17+
kubernetes: true
18+
- project: KubeOps.Test
19+
kubernetes: false
20+
- project: KubeOps.Templates.Test
21+
kubernetes: false
22+
- project: KubeOps.TestOperator.Test
23+
kubernetes: false
1524
steps:
1625
- uses: actions/checkout@v3
26+
1727
- name: Setup .NET
1828
uses: actions/setup-dotnet@v3
1929
with:
20-
dotnet-version: 6.0.302
21-
- name: Test
22-
run: ./build.sh --target test --no-logo
30+
dotnet-version: 7.x
31+
32+
- name: Create Kubernetes Cluster
33+
uses: helm/kind-action@v1.5.0
34+
if: ${{ matrix.kubernetes == true }}
35+
36+
- name: Execute Tests
37+
run: dotnet test --configuration Release tests/${{ matrix.project }}
38+
39+
result:
40+
if: ${{ always() }}
41+
runs-on: ubuntu-latest
42+
name: Final Results
43+
needs: [test]
44+
steps:
45+
- run: |
46+
result="${{ needs.test.result }}"
47+
if [[ $result == "success" || $result == "skipped" ]]; then
48+
exit 0
49+
else
50+
exit 1
51+
fi

0 commit comments

Comments
 (0)
Please sign in to comment.