Skip to content

Commit

Permalink
Feature/173197 persons api client nu get package (#575)
Browse files Browse the repository at this point in the history
* Added a new step to the build workfow to build and publish a nuget package

* Changed the target condition so it wont run in CI

* Added a change for testing the new workflow

* Added environment varibale CI to the CI yaml file

* Added build-args in the docker-build

* Fixed the casing in teh target condition

* Modified target condition

* Modified target condition

* Added CI argument to the docker file, passed in from the docker build

* Passed in CI argument to the project build process

* Added CI argument to the docker build

* Added CI argument to the build-and-push-image.yml file

* Added changes to test Client Nuget Package deployment

* added CI argumetn tot he build command in continious integration file

---------

Co-authored-by: Farshad DASHTI <[email protected]>
  • Loading branch information
FrostyApeOne and Farshad DASHTI authored Aug 14, 2024
1 parent 2ead004 commit 085780f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
CI: true
run: |
dotnet-sonarscanner begin /k:"DFE-Digital_academies-api" /o:"dfe-digital" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.coverageReportPaths=CoverageReport/SonarQube.xml
dotnet build --no-restore
dotnet build --no-restore -p:CI=${CI}
dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage"
reportgenerator -reports:./**/coverage.cobertura.xml -targetdir:./CoverageReport -reporttypes:SonarQube
dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
Expand Down
2 changes: 1 addition & 1 deletion Dfe.PersonsApi.Client/Generated/Client.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public virtual async System.Threading.Tasks.Task<MemberOfParliament> GetMemberOf
if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new PersonsApiException("Constituency not found ", status_, responseText_, headers_, null);
throw new PersonsApiException("Constituency not found", status_, responseText_, headers_, null);
}
else
if (status_ == 400)
Expand Down
2 changes: 1 addition & 1 deletion Dfe.PersonsApi.Client/Generated/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
}
},
"404": {
"description": "Constituency not found "
"description": "Constituency not found"
},
"400": {
"description": "Constituency cannot be null or empty"
Expand Down
2 changes: 1 addition & 1 deletion PersonsApi/Controllers/ConstituenciesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ConstituenciesController(IPersonsQueries personQueries)
[HttpGet("{constituencyName}/mp")]
[SwaggerOperation(Summary = "Retrieve Member of Parliament by constituency name", Description = "Receives a constituency name and returns a Person object representing the Member of Parliament.")]
[SwaggerResponse(200, "A Person object representing the Member of Parliament.", typeof(MemberOfParliament))]
[SwaggerResponse(404, "Constituency not found ")]
[SwaggerResponse(404, "Constituency not found")]
[SwaggerResponse(400, "Constituency cannot be null or empty")]
public async Task<IActionResult> GetMemberOfParliamentByConstituencyAsync([FromRoute] string constituencyName, CancellationToken cancellationToken)
{
Expand Down

0 comments on commit 085780f

Please sign in to comment.