Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing dotnet-client to nuget.org on release #279

Merged
merged 1 commit into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,22 @@ jobs:
docker tag gresearchdev/armada-executor-dev:${TAG} gresearchdev/armada-executor:${RELEASE_TAG}
docker push gresearchdev/armada-executor:${RELEASE_TAG}

release-dotnet-client:
docker:
- image: mcr.microsoft.com/dotnet/core/sdk:3.0.101-alpine3.10
working_directory: /go/src/github.com/G-Research/k8s-batch
steps:
- checkout

- run:
name: Release dotnet client
command: |
RELEASE_TAG=${CIRCLE_TAG#"v"}
dotnet pack client/DotNet/Armada.Client/Armada.Client.csproj -c Release -p:PackageVersion=${RELEASE_TAG} -o ./bin/client/DotNet
dotnet nuget push ./bin/client/DotNet/G-Research.Armada.Client.${RELEASE_TAG}.nupkg -k ${NUGET_API_KEY} -s https://api.nuget.org/v3/index.json

- store_artifacts:
path: bin/client/DotNet/*

workflows:
version: 2
Expand All @@ -190,3 +206,10 @@ workflows:
only: /.*/
branches:
ignore: /.*/
- release-dotnet-client:
filters:
tags:
only: /.*/
branches:
ignore: /.*/

2 changes: 1 addition & 1 deletion client/DotNet/Armada.Client/Armada.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="NSwag.CodeGeneration.CSharp" Version="13.1.3" />
</ItemGroup>

<Target Name="NSwag" BeforeTargets="Build">
<Target Name="NSwag">
<Exec Command="$(NSwagExe_Core30) openapi2csclient /ProtectedMethods:ArmadaClient.GetJobSetEventsAsync /classname:ArmadaClient /namespace:GResearch.Armada.Client /input:../../../internal/armada/api/api.swagger.json /output:ClientGenerated.cs" />
</Target>

Expand Down
3 changes: 2 additions & 1 deletion scripts/proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ go run github.com/wlbr/templify -e -p=api -f=SwaggerJson internal/armada/api/ap
# Fix all imports ordering
go run golang.org/x/tools/cmd/goimports -w -local "github.com/G-Research/armada" ./internal/armada/api/


# Genereate dotnet client to match the swagger
dotnet msbuild ./client/DotNet/Armada.Client /t:NSwag