diff --git a/.github/azure-pipelines-ci.yml b/.github/azure-pipelines-ci.yml new file mode 100644 index 0000000..ef18a34 --- /dev/null +++ b/.github/azure-pipelines-ci.yml @@ -0,0 +1,97 @@ +# Agent Queue 'Azure Pipelines' was used with unrecognized Agent Specification, vmImage property must be specified to determine image - https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#software +variables: +- name: BuildParameters.RestoreBuildProjects + value: '**/*.csproj' +- name: BuildParameters.TestProjects + value: '**/*[Tt]ests/*.csproj' +trigger: + - CI +name: $(date:yyyyMMdd)$(rev:.r) +resources: + repositories: + - repository: self + type: git + ref: refs/heads/CI +jobs: +- job: Job_1 + displayName: Agent job + pool: + vmImage: windows-latest + steps: + - checkout: self + clean: true + fetchTags: false + - task: NodeTool@0 + displayName: Use Node 12.19 + inputs: + versionSpec: 12.19 + - task: Npm@1 + displayName: npm custom + inputs: + command: custom + workingDir: Auth/LearningHub.Nhs.Auth + verbose: false + customCommand: install -f + - task: Npm@1 + displayName: run webpack build + inputs: + command: custom + workingDir: Auth/LearningHub.Nhs.Auth + verbose: false + customCommand: run build + - task: NuGetToolInstaller@1 + displayName: Use NuGet 5.8 + inputs: + versionSpec: 5.8 + - task: NuGetCommand@2 + displayName: NuGet restore + inputs: + feedRestore: d99eaf2c-ad74-4a35-876e-f7dc1e45a604 + - task: DotNetCoreCLI@2 + displayName: Restore + inputs: + command: restore + projects: $(BuildParameters.RestoreBuildProjects) + - task: DotNetCoreCLI@2 + displayName: Build + inputs: + projects: $(BuildParameters.RestoreBuildProjects) + arguments: --configuration $(BuildConfiguration) /p:Platform=x64 + - task: DotNetCoreCLI@2 + displayName: Test + enabled: False + inputs: + command: test + projects: $(BuildParameters.TestProjects) + arguments: --configuration $(BuildConfiguration) + - task: DotNetCoreCLI@2 + displayName: Publish Auth + inputs: + command: publish + publishWebProjects: false + projects: '**/*LearningHub.Nhs.Auth.csproj' + arguments: --configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/Auth + zipAfterPublish: True + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Auth + condition: succeededOrFailed() + inputs: + PathtoPublish: $(build.artifactstagingdirectory)/Auth + ArtifactName: Auth + TargetPath: '\\my\share\$(Build.DefinitionName)\$(Build.BuildNumber)' + - task: DotNetCoreCLI@2 + displayName: Publish UserAPI + inputs: + command: publish + publishWebProjects: false + projects: '**/*LearningHub.Nhs.UserApi.csproj' + arguments: --configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/UserAPI + zipAfterPublish: True + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact UserAPI + condition: succeededOrFailed() + inputs: + PathtoPublish: $(build.artifactstagingdirectory)/UserAPI + ArtifactName: UserAPI + TargetPath: '\\my\share\$(Build.DefinitionName)\$(Build.BuildNumber)' +... diff --git a/Auth/LearningHub.Nhs.Auth/Program.cs b/Auth/LearningHub.Nhs.Auth/Program.cs index b9eef4a..585bfab 100644 --- a/Auth/LearningHub.Nhs.Auth/Program.cs +++ b/Auth/LearningHub.Nhs.Auth/Program.cs @@ -17,7 +17,7 @@ var builder = WebApplication.CreateBuilder(args); -builder.Configuration.AddUserSecrets(string.Empty); +builder.Configuration.AddUserSecrets("a2ecb5d2-cf13-4551-9cb6-3d86dfbcf8ef"); builder.Logging.ClearProviders(); diff --git a/LearningHub.Nhs.UserApi/Program.cs b/LearningHub.Nhs.UserApi/Program.cs index eb0be58..fcf27c4 100644 --- a/LearningHub.Nhs.UserApi/Program.cs +++ b/LearningHub.Nhs.UserApi/Program.cs @@ -2,7 +2,7 @@ // Copyright (c) HEE.nhs.uk. // -#pragma warning disable SA1200 // Using directives should be placed correctly +#pragma warning disable SA1200 // Using directives should be placed correctly using System; using LearningHub.Nhs.UserApi; using LearningHub.Nhs.UserApi.Middleware; diff --git a/README.md b/README.md index 65ca487..df36cce 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Introduction +# Introduction This is the official open source repository for the [Learning Hub](https://learninghub.nhs.uk/) user profile and authentication service. This repository is used to provide user authentication for the main [Learning Hub repository](https://github.com/TechnologyEnhancedLearning/LearningHub.Nhs.WebUI). @@ -156,4 +156,4 @@ Click the **+** button to create a new package source with name `LHPackages` and # Contribute -If you are interested in contributing to the Learning Hub, please contact [support@learninghub.nhs.uk](mailto:support@learninghub.nhs.uk) \ No newline at end of file +If you are interested in contributing to the Learning Hub, please contact [support@learninghub.nhs.uk](mailto:support@learninghub.nhs.uk)