From 7dabca9990bf71ac0f55892932f484683400fbe5 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 11:34:46 +0000 Subject: [PATCH 01/30] Added better build steps --- .azuredevops/pipelines/build.yaml | 0 .azuredevops/pipelines/main.yaml | 18 ++ .../pipelines/templates/build-steps.yaml | 49 +++++ .../pipelines/templates/publish-steps.yaml | 171 ++++++++++++++++++ .../pipelines/templates/variables.yaml | 27 +++ azure-pipelines.yml | 4 +- 6 files changed, 267 insertions(+), 2 deletions(-) create mode 100644 .azuredevops/pipelines/build.yaml create mode 100644 .azuredevops/pipelines/main.yaml create mode 100644 .azuredevops/pipelines/templates/build-steps.yaml create mode 100644 .azuredevops/pipelines/templates/publish-steps.yaml create mode 100644 .azuredevops/pipelines/templates/variables.yaml diff --git a/.azuredevops/pipelines/build.yaml b/.azuredevops/pipelines/build.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/.azuredevops/pipelines/main.yaml b/.azuredevops/pipelines/main.yaml new file mode 100644 index 000000000..a6fb9e880 --- /dev/null +++ b/.azuredevops/pipelines/main.yaml @@ -0,0 +1,18 @@ +name: '$(Build.SourceBranchName)_$(Date:yyyy.MM.dd)$(Rev:.r)' + +trigger: none + +variables: + - template: templates/variables.yml + +jobs: +- job: Build + pool: + vmImage: ${{ variables.vmImage }} + steps: + - template: templates/build-steps.yml +- job: Publish + pool: + vmImage: ${{ variables.vmImage }} + steps: + - template: templates/publish-steps.yml \ No newline at end of file diff --git a/.azuredevops/pipelines/templates/build-steps.yaml b/.azuredevops/pipelines/templates/build-steps.yaml new file mode 100644 index 000000000..b21fa3804 --- /dev/null +++ b/.azuredevops/pipelines/templates/build-steps.yaml @@ -0,0 +1,49 @@ +steps: +## This is needed due to https://github.com/microsoft/azure-pipelines-tasks/issues/8429 +## For the set version tool... +- task: DotNetCoreInstaller@1 + displayName: 'Use .NET Core sdk ' + inputs: + packageType: 'sdk' + version: '3.x' +- task: DotNetCoreInstaller@1 + displayName: 'Use .NET Core sdk for versioning' + inputs: + packageType: 'sdk' + version: '2.1.x' + + +- task: PowerShell@2 + displayName: 'Get Release Notes' + inputs: + targetType: 'inline' + script: | + $response = Invoke-WebRequest -Uri "https://ombireleasenote.azurewebsites.net/api/ReleaseNotesFunction?buildId=$(Build.BuildId)" + Write-Host "##vso[task.setvariable variable=ReleaseNotes;]$response" + +- task: PowerShell@2 + displayName: 'Set Version' + inputs: + targetType: 'inline' + script: | + dotnet tool install -g dotnet-setversion + setversion -r $(BuildVersion) + +- task: Yarn@3 + displayName: 'Install UI Dependancies' + inputs: + projectDirectory: '$(UiLocation)' + arguments: 'install' + +- task: Yarn@3 + displayName: 'Build and Publish Angular App' + inputs: + projectDirectory: '$(UiLocation)' + arguments: 'run build' + +- task: DotNetCoreCLI@2 + displayName: Run Unit Tests + inputs: + comand: 'test' + projects: '$(TestProject)' + continueOnError: true \ No newline at end of file diff --git a/.azuredevops/pipelines/templates/publish-steps.yaml b/.azuredevops/pipelines/templates/publish-steps.yaml new file mode 100644 index 000000000..80ec2ce5c --- /dev/null +++ b/.azuredevops/pipelines/templates/publish-steps.yaml @@ -0,0 +1,171 @@ +steps: + +- task: DotNetCoreCLI@2 + displayName: Publish Win10-x64 + inputs: + command: 'publish' + publishWebProjects: true + arguments: '-c $(BuildConfiguration) -r "win10-x64" -o $(Build.ArtifactStagingDirectory)/win-64' + zipAfterPublish: false + modifyOutputPath: false + +- task: CopyFiles@2 + displayName: 'Copy Angular App Win10-x64' + inputs: + SourceFolder: '$(UiLocation)dist' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/win-64/ClientApp/dist' + +- task: DotNetCoreCLI@2 + displayName: Publish Win10-x86 + inputs: + command: 'publish' + publishWebProjects: true + arguments: '-c $(BuildConfiguration) -r "win10-x86" -o $(Build.ArtifactStagingDirectory)/win-86' + zipAfterPublish: false + modifyOutputPath: false + +- task: CopyFiles@2 + displayName: 'Copy Angular App Win10-x86' + inputs: + SourceFolder: '$(UiLocation)dist' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/win-86/ClientApp/dist' + +- task: DotNetCoreCLI@2 + displayName: Publish OSX-x64 + inputs: + command: 'publish' + publishWebProjects: true + arguments: '-c $(BuildConfiguration) -r "osx-x64" -o $(Build.ArtifactStagingDirectory)/osx-64' + zipAfterPublish: false + modifyOutputPath: false + +- task: CopyFiles@2 + displayName: 'Copy Angular App OSX-x64' + inputs: + SourceFolder: '$(UiLocation)dist' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/osx-64/ClientApp/dist' + +- task: DotNetCoreCLI@2 + displayName: Publish Linux-x64 + inputs: + command: 'publish' + publishWebProjects: true + arguments: '-c $(BuildConfiguration) -r "linux-x64" -o $(Build.ArtifactStagingDirectory)/linux-64' + zipAfterPublish: false + modifyOutputPath: false + +- task: CopyFiles@2 + displayName: 'Copy Angular App Linux-x64' + inputs: + SourceFolder: '$(UiLocation)dist' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/linux-64/ClientApp/dist' + +- task: DotNetCoreCLI@2 + displayName: Publish Linux-ARM + inputs: + command: 'publish' + publishWebProjects: true + arguments: '-c $(BuildConfiguration) -r "linux-arm" -o $(Build.ArtifactStagingDirectory)/linux-arm' + zipAfterPublish: false + modifyOutputPath: false + +- task: CopyFiles@2 + displayName: 'Copy Angular App Linux-ARM' + inputs: + SourceFolder: '$(UiLocation)dist' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/linux-arm/ClientApp/dist' + +- task: DotNetCoreCLI@2 + displayName: Publish Linux-ARM-x64 + inputs: + command: 'publish' + publishWebProjects: true + arguments: '-c $(BuildConfiguration) -r "linux-arm64" -o $(Build.ArtifactStagingDirectory)/linux-arm64' + zipAfterPublish: false + modifyOutputPath: false + +- task: CopyFiles@2 + displayName: 'Copy Angular App Linux-ARM64' + inputs: + SourceFolder: '$(UiLocation)dist' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/linux-arm64/ClientApp/dist' + +### Zip them up + +- task: ArchiveFiles@2 + displayName: Zip Win-x64 + inputs: + rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/win-64' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/win-x64-$(Build.BuildId).zip' + replaceExistingArchive: true + +- task: ArchiveFiles@2 + displayName: Zip Win-x86 + inputs: + rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/win-86' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/win-x86-$(Build.BuildId).zip' + replaceExistingArchive: true + +- task: ArchiveFiles@2 + displayName: Zip OSX-x64 + inputs: + rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/osx-64' + includeRootFolder: false + archiveType: 'tar' + archiveFile: '$(Build.ArtifactStagingDirectory)/osx-x64-$(Build.BuildId).tar.gz' + replaceExistingArchive: true + +- task: ArchiveFiles@2 + displayName: Zip Linux-x64 + inputs: + rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/linux-64' + includeRootFolder: false + archiveType: 'tar' + archiveFile: '$(Build.ArtifactStagingDirectory)/linux-x64-$(Build.BuildId).tar.gz' + replaceExistingArchive: true + +- task: ArchiveFiles@2 + displayName: Zip Linux-ARM + inputs: + rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/linux-arm' + includeRootFolder: false + archiveType: 'tar' + archiveFile: '$(Build.ArtifactStagingDirectory)/linux-arm-$(Build.BuildId).tar.gz' + replaceExistingArchive: true + +- task: ArchiveFiles@2 + displayName: Zip Linux-ARM-x64 + inputs: + rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/linux-arm64' + includeRootFolder: false + archiveType: 'tar' + archiveFile: '$(Build.ArtifactStagingDirectory)/linux-arm64-$(Build.BuildId).tar.gz' + replaceExistingArchive: true + +- task: GitHubRelease@1 + inputs: + gitHubConnection: 'github.com_tidusjar' + repositoryName: 'tidusjar/Ombi.Releases' + action: 'create' + target: 'c7fcbb77b58aef1076d635a9ef99e4374abc8672' + tagSource: 'userSpecifiedTag' + tag: '$(gitTag)' + releaseNotesSource: 'inline' + releaseNotesInline: '$(ReleaseNotes)' + assets: | + $(Build.ArtifactStagingDirectory)/*.zip + $(Build.ArtifactStagingDirectory)/*.gz + isPreRelease: true + changeLogCompareToRelease: 'lastNonDraftRelease' + changeLogType: 'commitBased' + condition: and(succeeded(), eq(variables['PublishToGithub'], 'true')) \ No newline at end of file diff --git a/.azuredevops/pipelines/templates/variables.yaml b/.azuredevops/pipelines/templates/variables.yaml new file mode 100644 index 000000000..3d1d83c3e --- /dev/null +++ b/.azuredevops/pipelines/templates/variables.yaml @@ -0,0 +1,27 @@ +variables: + - name: "BuildConfiguration" + value: "Release" + + - name: "vmImage" + value: "ubuntu-latest" + + - name: "Solution" + value: "**/*.sln" + + - name: "TestProject" + value: "**/*.Tests.csproj" + + - name: "NetCoreVersion" + value: "3.1" + + - name: "PublishLocation" + value: "$(Build.SourcesDirectory)/src/Ombi/bin/Release/netcoreapp$(NetCoreVersion)" + + - name: "GitTag" + value: "v$(buildVersion)" + + - name: "UiLocation" + value: "$(Build.SourcesDirectory)/src/Ombi/ClientApp/" + + - name: "BuildVersion" + value: "4.0.$(Build.BuildId)" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fdf1ae345..63bf242b4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,7 @@ trigger: branches: include: - - feature/* + - feature/v4* exclude: - develop - master @@ -19,7 +19,7 @@ variables: testProj: '**/*.Tests.csproj' csProj: '**/*.csproj' buildConfiguration: 'Release' - publishLocation: '$(Build.SourcesDirectory)/src/Ombi/bin/Release/netcoreapp3.0' + publishLocation: '$(Build.SourcesDirectory)/src/Ombi/bin/Release/netcoreapp3.1' pool: vmImage: 'ubuntu-latest' From e45dfba6ac43c3a89e3107f2712fea9773f97451 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 11:37:04 +0000 Subject: [PATCH 02/30] wip --- .azuredevops/pipelines/{build.yaml => build.yml} | 0 .azuredevops/pipelines/{main.yaml => main.yml} | 0 .../pipelines/templates/{build-steps.yaml => build-steps.yml} | 0 .../pipelines/templates/{publish-steps.yaml => publish-steps.yml} | 0 .../pipelines/templates/{variables.yaml => variables.yml} | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename .azuredevops/pipelines/{build.yaml => build.yml} (100%) rename .azuredevops/pipelines/{main.yaml => main.yml} (100%) rename .azuredevops/pipelines/templates/{build-steps.yaml => build-steps.yml} (100%) rename .azuredevops/pipelines/templates/{publish-steps.yaml => publish-steps.yml} (100%) rename .azuredevops/pipelines/templates/{variables.yaml => variables.yml} (100%) diff --git a/.azuredevops/pipelines/build.yaml b/.azuredevops/pipelines/build.yml similarity index 100% rename from .azuredevops/pipelines/build.yaml rename to .azuredevops/pipelines/build.yml diff --git a/.azuredevops/pipelines/main.yaml b/.azuredevops/pipelines/main.yml similarity index 100% rename from .azuredevops/pipelines/main.yaml rename to .azuredevops/pipelines/main.yml diff --git a/.azuredevops/pipelines/templates/build-steps.yaml b/.azuredevops/pipelines/templates/build-steps.yml similarity index 100% rename from .azuredevops/pipelines/templates/build-steps.yaml rename to .azuredevops/pipelines/templates/build-steps.yml diff --git a/.azuredevops/pipelines/templates/publish-steps.yaml b/.azuredevops/pipelines/templates/publish-steps.yml similarity index 100% rename from .azuredevops/pipelines/templates/publish-steps.yaml rename to .azuredevops/pipelines/templates/publish-steps.yml diff --git a/.azuredevops/pipelines/templates/variables.yaml b/.azuredevops/pipelines/templates/variables.yml similarity index 100% rename from .azuredevops/pipelines/templates/variables.yaml rename to .azuredevops/pipelines/templates/variables.yml From 38c24fb9bd093a936391649f5033a2d94064529b Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 12:13:26 +0000 Subject: [PATCH 03/30] wip --- .azuredevops/pipelines/main.yml | 2 +- .../pipelines/templates/publish-os-steps.yml | 40 +++++++++++++ .../pipelines/templates/publish-stepsnew.yml | 56 +++++++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 .azuredevops/pipelines/templates/publish-os-steps.yml create mode 100644 .azuredevops/pipelines/templates/publish-stepsnew.yml diff --git a/.azuredevops/pipelines/main.yml b/.azuredevops/pipelines/main.yml index a6fb9e880..9a6f953fe 100644 --- a/.azuredevops/pipelines/main.yml +++ b/.azuredevops/pipelines/main.yml @@ -15,4 +15,4 @@ jobs: pool: vmImage: ${{ variables.vmImage }} steps: - - template: templates/publish-steps.yml \ No newline at end of file + - template: templates/publish-stepsnew.yml \ No newline at end of file diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml new file mode 100644 index 000000000..8afb25a11 --- /dev/null +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -0,0 +1,40 @@ + +parameters: +- name: name # defaults for any parameters that aren't specified + default: '' +- name: Runtime + default: '' +- name: OutputName + default: '' + +jobs: +- job: Publish ${{ parameters.name }} + pool: + vmImage: ${vmImage} + steps: + +- task: DotNetCoreCLI@2 + displayName: publish $(parameters.name) + inputs: + command: 'publish' + publishWebProjects: true + arguments: '-c $(BuildConfiguration) -r "$(parameters.Runtime)" -o $(Build.ArtifactStagingDirectory)/$(parameters.OutputName)' + zipAfterPublish: false + modifyOutputPath: false + +- task: CopyFiles@2 + displayName: 'Copy Angular App $(parameters.name)' + inputs: + SourceFolder: '$(UILocation)dist' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)/ClientApp/dist' + + +- task: ArchiveFiles@2 + displayName: Zip $(parameters.name) + inputs: + rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)-$(Build.BuildId).zip' + replaceExistingArchive: true diff --git a/.azuredevops/pipelines/templates/publish-stepsnew.yml b/.azuredevops/pipelines/templates/publish-stepsnew.yml new file mode 100644 index 000000000..6b543c807 --- /dev/null +++ b/.azuredevops/pipelines/templates/publish-stepsnew.yml @@ -0,0 +1,56 @@ + +jobs: +- template: publish-os-steps.yml + parameters: + name: 'Win10-x64' + Runtime: win10-x64 + OutputName: win-64 + +- template: publish-os-steps.yml + parameters: + name: 'Win10-x86' + Runtime: win10-x86 + OutputName: win-86 + +- template: publish-os-steps.yml + parameters: + name: 'OSX-x64' + Runtime: osx-x64 + OutputName: osx-64 + +- template: publish-os-steps.yml + parameters: + name: 'Linux-x64' + Runtime: linux-x64 + OutputName: linux-64 + +- template: publish-os-steps.yml + parameters: + name: 'Linux-ARM' + Runtime: linux-arm + OutputName: linux-arm + +- template: publish-os-steps.yml + parameters: + name: 'Linux-ARM-x64' + Runtime: linux-arm64 + OutputName: linux-arm64 + + +# - task: GitHubRelease@1 +# inputs: +# gitHubConnection: 'github.com_tidusjar' +# repositoryName: 'tidusjar/Ombi.Releases' +# action: 'create' +# target: 'c7fcbb77b58aef1076d635a9ef99e4374abc8672' +# tagSource: 'userSpecifiedTag' +# tag: '$(gitTag)' +# releaseNotesSource: 'inline' +# releaseNotesInline: '$(ReleaseNotes)' +# assets: | +# $(Build.ArtifactStagingDirectory)/*.zip +# $(Build.ArtifactStagingDirectory)/*.gz +# isPreRelease: true +# changeLogCompareToRelease: 'lastNonDraftRelease' +# changeLogType: 'commitBased' +# condition: and(succeeded(), eq(variables['PublishToGithub'], 'true')) \ No newline at end of file From 213420658e07f2989fd5dab5e5b2a75e8c015365 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 12:18:41 +0000 Subject: [PATCH 04/30] wip --- .../templates/{publish-stepsnew.yml => publish-job.yml} | 9 +++++++++ 1 file changed, 9 insertions(+) rename .azuredevops/pipelines/templates/{publish-stepsnew.yml => publish-job.yml} (90%) diff --git a/.azuredevops/pipelines/templates/publish-stepsnew.yml b/.azuredevops/pipelines/templates/publish-job.yml similarity index 90% rename from .azuredevops/pipelines/templates/publish-stepsnew.yml rename to .azuredevops/pipelines/templates/publish-job.yml index 6b543c807..2ad90910d 100644 --- a/.azuredevops/pipelines/templates/publish-stepsnew.yml +++ b/.azuredevops/pipelines/templates/publish-job.yml @@ -1,5 +1,14 @@ +variables: + - template: templates/variables.yml + jobs: +- job: Build + pool: + vmImage: ${{ variables.vmImage }} + steps: + - template: build-steps.yml + - template: publish-os-steps.yml parameters: name: 'Win10-x64' From af72f85f61fa02528d7c2dfffa62d387ef991978 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 12:19:34 +0000 Subject: [PATCH 05/30] wip --- .azuredevops/pipelines/{templates => }/publish-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .azuredevops/pipelines/{templates => }/publish-job.yml (97%) diff --git a/.azuredevops/pipelines/templates/publish-job.yml b/.azuredevops/pipelines/publish-job.yml similarity index 97% rename from .azuredevops/pipelines/templates/publish-job.yml rename to .azuredevops/pipelines/publish-job.yml index 2ad90910d..a4ffce26b 100644 --- a/.azuredevops/pipelines/templates/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -7,7 +7,7 @@ jobs: pool: vmImage: ${{ variables.vmImage }} steps: - - template: build-steps.yml + - template: templates/build-steps.yml - template: publish-os-steps.yml parameters: From 7d9121f1788931ec78c5d886f46404c3479dc941 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 13:11:01 +0000 Subject: [PATCH 06/30] wip --- .azuredevops/pipelines/publish-job.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index a4ffce26b..e9509cac3 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -9,37 +9,37 @@ jobs: steps: - template: templates/build-steps.yml -- template: publish-os-steps.yml +- template: templates/publish-os-steps.yml parameters: name: 'Win10-x64' Runtime: win10-x64 OutputName: win-64 -- template: publish-os-steps.yml +- template: templates/publish-os-steps.yml parameters: name: 'Win10-x86' Runtime: win10-x86 OutputName: win-86 -- template: publish-os-steps.yml +- template: templates/publish-os-steps.yml parameters: name: 'OSX-x64' Runtime: osx-x64 OutputName: osx-64 -- template: publish-os-steps.yml +- template: templates/publish-os-steps.yml parameters: name: 'Linux-x64' Runtime: linux-x64 OutputName: linux-64 -- template: publish-os-steps.yml +- template: templates/publish-os-steps.yml parameters: name: 'Linux-ARM' Runtime: linux-arm OutputName: linux-arm -- template: publish-os-steps.yml +- template: templates/publish-os-steps.yml parameters: name: 'Linux-ARM-x64' Runtime: linux-arm64 From cf95a05eaaf80e7a4cdad0ec96c704467829d983 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 13:11:51 +0000 Subject: [PATCH 07/30] wip --- .../pipelines/templates/publish-os-steps.yml | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index 8afb25a11..d519facbe 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -13,28 +13,28 @@ jobs: vmImage: ${vmImage} steps: -- task: DotNetCoreCLI@2 - displayName: publish $(parameters.name) - inputs: - command: 'publish' - publishWebProjects: true - arguments: '-c $(BuildConfiguration) -r "$(parameters.Runtime)" -o $(Build.ArtifactStagingDirectory)/$(parameters.OutputName)' - zipAfterPublish: false - modifyOutputPath: false - -- task: CopyFiles@2 - displayName: 'Copy Angular App $(parameters.name)' - inputs: - SourceFolder: '$(UILocation)dist' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)/ClientApp/dist' - - -- task: ArchiveFiles@2 - displayName: Zip $(parameters.name) - inputs: - rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)' - includeRootFolder: false - archiveType: 'zip' - archiveFile: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)-$(Build.BuildId).zip' - replaceExistingArchive: true + - task: DotNetCoreCLI@2 + displayName: publish $(parameters.name) + inputs: + command: 'publish' + publishWebProjects: true + arguments: '-c $(BuildConfiguration) -r "$(parameters.Runtime)" -o $(Build.ArtifactStagingDirectory)/$(parameters.OutputName)' + zipAfterPublish: false + modifyOutputPath: false + + - task: CopyFiles@2 + displayName: 'Copy Angular App $(parameters.name)' + inputs: + SourceFolder: '$(UILocation)dist' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)/ClientApp/dist' + + + - task: ArchiveFiles@2 + displayName: Zip $(parameters.name) + inputs: + rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)-$(Build.BuildId).zip' + replaceExistingArchive: true From fb4aa5a08d72acc2b2caedf5cb314d0bab424cfc Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 13:12:35 +0000 Subject: [PATCH 08/30] name --- .azuredevops/pipelines/publish-job.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index e9509cac3..53e3f0b46 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -11,37 +11,37 @@ jobs: - template: templates/publish-os-steps.yml parameters: - name: 'Win10-x64' + name: 'Win10_x64' Runtime: win10-x64 OutputName: win-64 - template: templates/publish-os-steps.yml parameters: - name: 'Win10-x86' + name: 'Win10_x86' Runtime: win10-x86 OutputName: win-86 - template: templates/publish-os-steps.yml parameters: - name: 'OSX-x64' + name: 'OSX_x64' Runtime: osx-x64 OutputName: osx-64 - template: templates/publish-os-steps.yml parameters: - name: 'Linux-x64' + name: 'Linux_x64' Runtime: linux-x64 OutputName: linux-64 - template: templates/publish-os-steps.yml parameters: - name: 'Linux-ARM' + name: 'Linux_ARM' Runtime: linux-arm OutputName: linux-arm - template: templates/publish-os-steps.yml parameters: - name: 'Linux-ARM-x64' + name: 'Linux_ARM_x64' Runtime: linux-arm64 OutputName: linux-arm64 From 372d3b95f6482e4e8e5b0decb9420542ca1a8588 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 13:13:42 +0000 Subject: [PATCH 09/30] wip --- .../pipelines/templates/publish-os-steps.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index d519facbe..0b6ae42c8 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -14,24 +14,24 @@ jobs: steps: - task: DotNetCoreCLI@2 - displayName: publish $(parameters.name) + displayName: publish ${{ parameters.name }} inputs: command: 'publish' publishWebProjects: true arguments: '-c $(BuildConfiguration) -r "$(parameters.Runtime)" -o $(Build.ArtifactStagingDirectory)/$(parameters.OutputName)' zipAfterPublish: false modifyOutputPath: false - + - task: CopyFiles@2 - displayName: 'Copy Angular App $(parameters.name)' + displayName: 'Copy Angular App ${{ parameters.name }}' inputs: SourceFolder: '$(UILocation)dist' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)/ClientApp/dist' - - + + - task: ArchiveFiles@2 - displayName: Zip $(parameters.name) + displayName: Zip ${{ parameters.name }} inputs: rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)' includeRootFolder: false From a48885ac3f6f9de32188b8799ada0fee611e0110 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 13:14:40 +0000 Subject: [PATCH 10/30] wip --- .azuredevops/pipelines/publish-job.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index 53e3f0b46..952632400 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -11,37 +11,37 @@ jobs: - template: templates/publish-os-steps.yml parameters: - name: 'Win10_x64' + name: 'Win10x64' Runtime: win10-x64 OutputName: win-64 - template: templates/publish-os-steps.yml parameters: - name: 'Win10_x86' + name: 'Win10x86' Runtime: win10-x86 OutputName: win-86 - template: templates/publish-os-steps.yml parameters: - name: 'OSX_x64' + name: 'OSXx64' Runtime: osx-x64 OutputName: osx-64 - template: templates/publish-os-steps.yml parameters: - name: 'Linux_x64' + name: 'Linuxx64' Runtime: linux-x64 OutputName: linux-64 - template: templates/publish-os-steps.yml parameters: - name: 'Linux_ARM' + name: 'LinuxARM' Runtime: linux-arm OutputName: linux-arm - template: templates/publish-os-steps.yml parameters: - name: 'Linux_ARM_x64' + name: 'LinuxARMx64' Runtime: linux-arm64 OutputName: linux-arm64 From 437a9500a2098286355fbd79ad4206a8ffcb591d Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 13:15:24 +0000 Subject: [PATCH 11/30] wip --- .azuredevops/pipelines/templates/publish-os-steps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index 0b6ae42c8..733c2d2d7 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -8,7 +8,7 @@ parameters: default: '' jobs: -- job: Publish ${{ parameters.name }} +- job: Publish_${{ parameters.name }} pool: vmImage: ${vmImage} steps: From 87652000ba690be05725e482e8e17b2fa8eb4593 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 13:16:15 +0000 Subject: [PATCH 12/30] wip --- .azuredevops/pipelines/templates/publish-os-steps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index 733c2d2d7..9494ba75f 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -10,7 +10,7 @@ parameters: jobs: - job: Publish_${{ parameters.name }} pool: - vmImage: ${vmImage} + vmImage: $(vmImage) steps: - task: DotNetCoreCLI@2 From faa27ee3e9e32a4cfcef055dda7c93b4383aaaba Mon Sep 17 00:00:00 2001 From: tidusjar Date: Mon, 24 Feb 2020 08:50:24 +0000 Subject: [PATCH 13/30] Fixed #3406 --- src/Ombi/Controllers/V1/IdentityController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ombi/Controllers/V1/IdentityController.cs b/src/Ombi/Controllers/V1/IdentityController.cs index 6e9ee2e72..2a8122633 100644 --- a/src/Ombi/Controllers/V1/IdentityController.cs +++ b/src/Ombi/Controllers/V1/IdentityController.cs @@ -135,7 +135,7 @@ namespace Ombi.Controllers.V1 public async Task CreateWizardUser([FromBody] CreateUserWizardModel user) { var users = UserManager.Users; - if (users.Any(x => !x.UserName.Equals("api", StringComparison.InvariantCultureIgnoreCase))) + if (users.Any(x => x.NormalizedUserName != "API")) { // No one should be calling this. Only the wizard return new SaveWizardResult { Result = false, Errors = new List { "Looks like there is an existing user!" } }; From 4edb6ed8bbde03301e401632f477f0d5ed75f1bf Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:05:19 +0000 Subject: [PATCH 14/30] Update publish-os-steps.yml --- .azuredevops/pipelines/templates/publish-os-steps.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index 9494ba75f..bdac92c27 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -1,7 +1,5 @@ parameters: -- name: name # defaults for any parameters that aren't specified - default: '' - name: Runtime default: '' - name: OutputName @@ -18,7 +16,7 @@ jobs: inputs: command: 'publish' publishWebProjects: true - arguments: '-c $(BuildConfiguration) -r "$(parameters.Runtime)" -o $(Build.ArtifactStagingDirectory)/$(parameters.OutputName)' + arguments: '-c $(BuildConfiguration) -r "${{ parameters.Runtime }}" -o $(Build.ArtifactStagingDirectory)/${{ parameters.OutputName }}' zipAfterPublish: false modifyOutputPath: false @@ -27,7 +25,7 @@ jobs: inputs: SourceFolder: '$(UILocation)dist' Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)/ClientApp/dist' + TargetFolder: '$(Build.ArtifactStagingDirectory)/${{ parameters.OutputName}}/ClientApp/dist' - task: ArchiveFiles@2 @@ -36,5 +34,5 @@ jobs: rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)' includeRootFolder: false archiveType: 'zip' - archiveFile: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)-$(Build.BuildId).zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/${{ parameters.OutputName }}-$(Build.BuildId).zip' replaceExistingArchive: true From 389b510a9eed5e9969dca3a3375173fc88d1652f Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:06:15 +0000 Subject: [PATCH 15/30] oh you were using this lol --- .azuredevops/pipelines/templates/publish-os-steps.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index bdac92c27..b4c91bdc3 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -1,5 +1,7 @@ parameters: +- name: name + default: '' - name: Runtime default: '' - name: OutputName From 9152dd8422664849ffb22504b4c83034d19d72ad Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:10:32 +0000 Subject: [PATCH 16/30] Update publish-job.yml for Azure Pipelines --- .azuredevops/pipelines/publish-job.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index 952632400..55ce532d9 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -1,14 +1,17 @@ variables: - template: templates/variables.yml - -jobs: -- job: Build - pool: - vmImage: ${{ variables.vmImage }} - steps: - - template: templates/build-steps.yml +stages: +- stage: build_angular + jobs: + - job: Build + pool: + vmImage: ${{ variables.vmImage }} + steps: + - template: templates/build-steps.yml + +- stage: publish - template: templates/publish-os-steps.yml parameters: name: 'Win10x64' From 388c136f609dd375315ec10a1cf8cc9d3cbc55d6 Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:12:11 +0000 Subject: [PATCH 17/30] Update publish-job.yml for Azure Pipelines --- .azuredevops/pipelines/publish-job.yml | 71 +++++++++++++------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index 55ce532d9..b6978f62a 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -12,41 +12,42 @@ stages: - template: templates/build-steps.yml - stage: publish -- template: templates/publish-os-steps.yml - parameters: - name: 'Win10x64' - Runtime: win10-x64 - OutputName: win-64 - -- template: templates/publish-os-steps.yml - parameters: - name: 'Win10x86' - Runtime: win10-x86 - OutputName: win-86 - -- template: templates/publish-os-steps.yml - parameters: - name: 'OSXx64' - Runtime: osx-x64 - OutputName: osx-64 - -- template: templates/publish-os-steps.yml - parameters: - name: 'Linuxx64' - Runtime: linux-x64 - OutputName: linux-64 - -- template: templates/publish-os-steps.yml - parameters: - name: 'LinuxARM' - Runtime: linux-arm - OutputName: linux-arm - -- template: templates/publish-os-steps.yml - parameters: - name: 'LinuxARMx64' - Runtime: linux-arm64 - OutputName: linux-arm64 + jobs: + - template: templates/publish-os-steps.yml + parameters: + name: 'Win10x64' + Runtime: win10-x64 + OutputName: win-64 + + - template: templates/publish-os-steps.yml + parameters: + name: 'Win10x86' + Runtime: win10-x86 + OutputName: win-86 + + - template: templates/publish-os-steps.yml + parameters: + name: 'OSXx64' + Runtime: osx-x64 + OutputName: osx-64 + + - template: templates/publish-os-steps.yml + parameters: + name: 'Linuxx64' + Runtime: linux-x64 + OutputName: linux-64 + + - template: templates/publish-os-steps.yml + parameters: + name: 'LinuxARM' + Runtime: linux-arm + OutputName: linux-arm + + - template: templates/publish-os-steps.yml + parameters: + name: 'LinuxARMx64' + Runtime: linux-arm64 + OutputName: linux-arm64 # - task: GitHubRelease@1 From 10d5108d09d210e266d25a77379797f5d984b997 Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:14:26 +0000 Subject: [PATCH 18/30] Update publish-os-steps.yml --- .azuredevops/pipelines/templates/publish-os-steps.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index b4c91bdc3..188a62b1a 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -27,13 +27,13 @@ jobs: inputs: SourceFolder: '$(UILocation)dist' Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/${{ parameters.OutputName}}/ClientApp/dist' + TargetFolder: '$(Build.ArtifactStagingDirectory)/${{ parameters.OutputName }}/ClientApp/dist' - task: ArchiveFiles@2 displayName: Zip ${{ parameters.name }} inputs: - rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/$(parameters.OutputName)' + rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/${{ parameters.OutputName }}' includeRootFolder: false archiveType: 'zip' archiveFile: '$(Build.ArtifactStagingDirectory)/${{ parameters.OutputName }}-$(Build.BuildId).zip' From 62a7db88fda8f8540374d5aa1149095ab559b695 Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:27:43 +0000 Subject: [PATCH 19/30] Update build-steps.yml --- .azuredevops/pipelines/templates/build-steps.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.azuredevops/pipelines/templates/build-steps.yml b/.azuredevops/pipelines/templates/build-steps.yml index b21fa3804..795f6b103 100644 --- a/.azuredevops/pipelines/templates/build-steps.yml +++ b/.azuredevops/pipelines/templates/build-steps.yml @@ -40,10 +40,16 @@ steps: inputs: projectDirectory: '$(UiLocation)' arguments: 'run build' + +- task: PublishPipelineArtifact@1 + inputs: + targetPath: '$(UiLocation)/dist' + artifact: 'angular_dist' + publishLocation: 'pipeline' - task: DotNetCoreCLI@2 displayName: Run Unit Tests inputs: comand: 'test' projects: '$(TestProject)' - continueOnError: true \ No newline at end of file + continueOnError: true From 03d108b056a472fa6b012ab05a98fa60b10c2a56 Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:30:14 +0000 Subject: [PATCH 20/30] Update publish-os-steps.yml --- .azuredevops/pipelines/templates/publish-os-steps.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index 188a62b1a..c9b426ad8 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -21,11 +21,17 @@ jobs: arguments: '-c $(BuildConfiguration) -r "${{ parameters.Runtime }}" -o $(Build.ArtifactStagingDirectory)/${{ parameters.OutputName }}' zipAfterPublish: false modifyOutputPath: false + + - task: DownloadPipelineArtifact@2 + inputs: + buildType: 'current' + artifactName: 'angular_dist' + targetPath: '$(Build.ArtifactStagingDirectory)/angular_dist' - task: CopyFiles@2 displayName: 'Copy Angular App ${{ parameters.name }}' inputs: - SourceFolder: '$(UILocation)dist' + SourceFolder: '$(Build.ArtifactStagingDirectory)/angular_dist' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/${{ parameters.OutputName }}/ClientApp/dist' From efcc3c2f498752bda9aad27948a4a0d66f66fe79 Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:30:40 +0000 Subject: [PATCH 21/30] Update build-steps.yml --- .azuredevops/pipelines/templates/build-steps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azuredevops/pipelines/templates/build-steps.yml b/.azuredevops/pipelines/templates/build-steps.yml index 795f6b103..1facc84e6 100644 --- a/.azuredevops/pipelines/templates/build-steps.yml +++ b/.azuredevops/pipelines/templates/build-steps.yml @@ -43,7 +43,7 @@ steps: - task: PublishPipelineArtifact@1 inputs: - targetPath: '$(UiLocation)/dist' + targetPath: '$(UiLocation)dist' artifact: 'angular_dist' publishLocation: 'pipeline' From 3b628f8a46d46353b693c1ec7a25281b5c591426 Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:31:33 +0000 Subject: [PATCH 22/30] Update publish-job.yml for Azure Pipelines --- .azuredevops/pipelines/publish-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index b6978f62a..95d98eff0 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -3,7 +3,7 @@ variables: - template: templates/variables.yml stages: -- stage: build_angular +- stage: build jobs: - job: Build pool: From 3398d5401e20d87ad8d81a80b5e3a2801e30a84d Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:52:33 +0000 Subject: [PATCH 23/30] Update publish-os-steps.yml --- .../pipelines/templates/publish-os-steps.yml | 83 +++++++++---------- 1 file changed, 37 insertions(+), 46 deletions(-) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index c9b426ad8..0147fbd11 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -1,46 +1,37 @@ - -parameters: -- name: name - default: '' -- name: Runtime - default: '' -- name: OutputName - default: '' - -jobs: -- job: Publish_${{ parameters.name }} - pool: - vmImage: $(vmImage) - steps: - - - task: DotNetCoreCLI@2 - displayName: publish ${{ parameters.name }} - inputs: - command: 'publish' - publishWebProjects: true - arguments: '-c $(BuildConfiguration) -r "${{ parameters.Runtime }}" -o $(Build.ArtifactStagingDirectory)/${{ parameters.OutputName }}' - zipAfterPublish: false - modifyOutputPath: false - - - task: DownloadPipelineArtifact@2 - inputs: - buildType: 'current' - artifactName: 'angular_dist' - targetPath: '$(Build.ArtifactStagingDirectory)/angular_dist' - - - task: CopyFiles@2 - displayName: 'Copy Angular App ${{ parameters.name }}' - inputs: - SourceFolder: '$(Build.ArtifactStagingDirectory)/angular_dist' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/${{ parameters.OutputName }}/ClientApp/dist' - - - - task: ArchiveFiles@2 - displayName: Zip ${{ parameters.name }} - inputs: - rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/${{ parameters.OutputName }}' - includeRootFolder: false - archiveType: 'zip' - archiveFile: '$(Build.ArtifactStagingDirectory)/${{ parameters.OutputName }}-$(Build.BuildId).zip' - replaceExistingArchive: true +steps: +- task: DotNetCoreCLI@2 + displayName: publish $(runtime) + inputs: + command: 'publish' + publishWebProjects: true + arguments: '-c $(BuildConfiguration) -r "$(runtime)" -o $(Build.ArtifactStagingDirectory)/$(runtime)' + zipAfterPublish: false + modifyOutputPath: false + +- task: DownloadPipelineArtifact@2 + inputs: + buildType: 'current' + artifactName: 'angular_dist' + targetPath: '$(Build.ArtifactStagingDirectory)/angular_dist + +- task: CopyFiles@2 + displayName: Copy Angular App $(runtime) + inputs: + SourceFolder: '$(Build.ArtifactStagingDirectory)/angular_dist' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/$(runtime)/ClientApp/dist + +- task: ArchiveFiles@2 + displayName: Zip $(runtime) + inputs: + rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/$(runtime)' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/$(runtime).zip' + replaceExistingArchive: true + +- task: PublishPipelineArtifact@1 + inputs: + targetPath: '$(Build.ArtifactStagingDirectory)/$(runtime).zip' + artifact: '$(runtime)' + publishLocation: 'pipeline' From a88bf954049c272e6ea9351afc61ddefb6f7a27f Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:52:50 +0000 Subject: [PATCH 24/30] Update publish-job.yml for Azure Pipelines --- .azuredevops/pipelines/publish-job.yml | 54 +++++++++----------------- 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index 95d98eff0..9cbe1e3f5 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -13,41 +13,25 @@ stages: - stage: publish jobs: - - template: templates/publish-os-steps.yml - parameters: - name: 'Win10x64' - Runtime: win10-x64 - OutputName: win-64 - - - template: templates/publish-os-steps.yml - parameters: - name: 'Win10x86' - Runtime: win10-x86 - OutputName: win-86 - - - template: templates/publish-os-steps.yml - parameters: - name: 'OSXx64' - Runtime: osx-x64 - OutputName: osx-64 - - - template: templates/publish-os-steps.yml - parameters: - name: 'Linuxx64' - Runtime: linux-x64 - OutputName: linux-64 - - - template: templates/publish-os-steps.yml - parameters: - name: 'LinuxARM' - Runtime: linux-arm - OutputName: linux-arm - - - template: templates/publish-os-steps.yml - parameters: - name: 'LinuxARMx64' - Runtime: linux-arm64 - OutputName: linux-arm64 + - job: + strategy: + matrix: + win10-x64: + runtime: win10-x64 + win10-x86: + runtime: win10-x86 + osx-64: + runtime: osx-x64 + linux-64: + runtime: linux-64 + linux-arm: + runtime: linux-arm + linux-arm64: + runtime: linux-arm64 + pool: + vmImage: $(vmImage) + steps: + - template: templates/publish-os-steps.yml # - task: GitHubRelease@1 From f6b238f906c36a915534699b799d02037648d4d0 Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:53:53 +0000 Subject: [PATCH 25/30] Update publish-os-steps.yml --- .azuredevops/pipelines/templates/publish-os-steps.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index 0147fbd11..db4527f86 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -1,6 +1,6 @@ steps: - task: DotNetCoreCLI@2 - displayName: publish $(runtime) + displayName: 'publish $(runtime)' inputs: command: 'publish' publishWebProjects: true @@ -15,14 +15,14 @@ steps: targetPath: '$(Build.ArtifactStagingDirectory)/angular_dist - task: CopyFiles@2 - displayName: Copy Angular App $(runtime) + displayName: 'Copy Angular App $(runtime)' inputs: SourceFolder: '$(Build.ArtifactStagingDirectory)/angular_dist' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/$(runtime)/ClientApp/dist - task: ArchiveFiles@2 - displayName: Zip $(runtime) + displayName: 'Zip $(runtime)' inputs: rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/$(runtime)' includeRootFolder: false From dcfcb7e8cf06c976a9d8d1e8c466425425227ccc Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:55:48 +0000 Subject: [PATCH 26/30] Update publish-job.yml for Azure Pipelines --- .azuredevops/pipelines/publish-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index 9cbe1e3f5..b1885a768 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -29,7 +29,7 @@ stages: linux-arm64: runtime: linux-arm64 pool: - vmImage: $(vmImage) + vmImage: ${{ variables.vmImage }} steps: - template: templates/publish-os-steps.yml From a82184efbe440c4171a09aa0f64ac1b8731dcc0c Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:56:57 +0000 Subject: [PATCH 27/30] Update publish-os-steps.yml --- .azuredevops/pipelines/templates/publish-os-steps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index db4527f86..f313bc348 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -12,7 +12,7 @@ steps: inputs: buildType: 'current' artifactName: 'angular_dist' - targetPath: '$(Build.ArtifactStagingDirectory)/angular_dist + targetPath: '$(Build.ArtifactStagingDirectory)/angular_dist' - task: CopyFiles@2 displayName: 'Copy Angular App $(runtime)' From 703867da21102e5fbb18669c50efff4819bb5c54 Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 21:57:19 +0000 Subject: [PATCH 28/30] Update publish-os-steps.yml --- .azuredevops/pipelines/templates/publish-os-steps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azuredevops/pipelines/templates/publish-os-steps.yml b/.azuredevops/pipelines/templates/publish-os-steps.yml index f313bc348..b0e4a45a8 100644 --- a/.azuredevops/pipelines/templates/publish-os-steps.yml +++ b/.azuredevops/pipelines/templates/publish-os-steps.yml @@ -19,7 +19,7 @@ steps: inputs: SourceFolder: '$(Build.ArtifactStagingDirectory)/angular_dist' Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/$(runtime)/ClientApp/dist + TargetFolder: '$(Build.ArtifactStagingDirectory)/$(runtime)/ClientApp/dist' - task: ArchiveFiles@2 displayName: 'Zip $(runtime)' From 02891a7141dc2e38d10a0161d77b95bcc8e67908 Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 22:11:24 +0000 Subject: [PATCH 29/30] Update publish-job.yml for Azure Pipelines --- .azuredevops/pipelines/publish-job.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index b1885a768..884ad69ec 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -20,10 +20,10 @@ stages: runtime: win10-x64 win10-x86: runtime: win10-x86 - osx-64: + osx-x64: runtime: osx-x64 - linux-64: - runtime: linux-64 + linux-x64: + runtime: linux-x64 linux-arm: runtime: linux-arm linux-arm64: @@ -33,6 +33,20 @@ stages: steps: - template: templates/publish-os-steps.yml +- stage: deploy + jobs: + - job: + steps: + - task: DownloadBuildArtifacts@0 + inputs: + buildType: 'current' + downloadType: 'specific' + itemPattern: '**.zip' + downloadPath: '$(System.ArtifactsDirectory)' + + - pwsh: | + Get-ChildItem ($env:SYSTEM_ARTIFACTSDIRECTORY) + # - task: GitHubRelease@1 # inputs: From 2e1b60e32478a757fc64a0a7da8e4775363f1605 Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Sat, 7 Mar 2020 22:25:14 +0000 Subject: [PATCH 30/30] Update publish-job.yml for Azure Pipelines --- .azuredevops/pipelines/publish-job.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index 884ad69ec..41fae01f0 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -37,15 +37,13 @@ stages: jobs: - job: steps: - - task: DownloadBuildArtifacts@0 + - task: DownloadPipelineArtifact@2 inputs: buildType: 'current' - downloadType: 'specific' - itemPattern: '**.zip' - downloadPath: '$(System.ArtifactsDirectory)' + targetPath: '$(System.ArtifactsDirectory)' - pwsh: | - Get-ChildItem ($env:SYSTEM_ARTIFACTSDIRECTORY) + Get-ChildItem -Recurse ($env:SYSTEM_ARTIFACTSDIRECTORY) # - task: GitHubRelease@1