Skip to content
Merged

Ci #4

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
97 changes: 97 additions & 0 deletions .github/azure-pipelines-ci.yml
Original file line number Diff line number Diff line change
@@ -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)'
...
2 changes: 1 addition & 1 deletion Auth/LearningHub.Nhs.Auth/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion LearningHub.Nhs.UserApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) HEE.nhs.uk.
// </copyright>

#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;
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down Expand Up @@ -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 [[email protected]](mailto:[email protected])
If you are interested in contributing to the Learning Hub, please contact [[email protected]](mailto:[email protected])