From 38c24fb9bd093a936391649f5033a2d94064529b Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 21 Feb 2020 12:13:26 +0000 Subject: [PATCH] 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