From 5a47f5be93b55d192809bd0ce7ab736881dd13d4 Mon Sep 17 00:00:00 2001 From: Simon Davies Date: Tue, 23 Mar 2021 20:10:01 +0000 Subject: [PATCH] Merge GH and release pipelines Signed-off-by: Simon Davies --- build/azure-pipelines-gh-release.yml | 29 ---------------------------- build/azure-pipelines-release.yml | 22 ++++++++++++++++----- 2 files changed, 17 insertions(+), 34 deletions(-) delete mode 100644 build/azure-pipelines-gh-release.yml diff --git a/build/azure-pipelines-gh-release.yml b/build/azure-pipelines-gh-release.yml deleted file mode 100644 index 7c2c232..0000000 --- a/build/azure-pipelines-gh-release.yml +++ /dev/null @@ -1,29 +0,0 @@ -trigger: - tags: - include: - - v* -pr: none - -pool: - vmImage: 'Ubuntu 18.04' - -variables: - GOVERSION: "1.14.6" - tag: $[replace(variables['Build.SourceBranch'],'refs/tags/','')] - -steps: - - template: build-and-test.yml - - - script: make xbuild-all - workingDirectory: '$(System.DefaultWorkingDirectory)' - displayName: 'Build Release' - - - task: GitHubRelease@0 - inputs: - gitHubConnection: $(GITHUB_CONNECTIONNAME) - repositoryName: '$(Build.Repository.Name)' - action: 'create' - tagSource: 'auto' - assets: '$(System.DefaultWorkingDirectory)/bin/plugins/kubernetes/$(tag)/**' - addChangeLog: true - compareWith: 'lastFullRelease' \ No newline at end of file diff --git a/build/azure-pipelines-release.yml b/build/azure-pipelines-release.yml index 8f160a8..01bb738 100644 --- a/build/azure-pipelines-release.yml +++ b/build/azure-pipelines-release.yml @@ -12,16 +12,28 @@ pool: variables: GOVERSION: "1.14.6" + tag: $[replace(variables['Build.SourceBranch'],'refs/tags/','')] steps: - - template: build-and-test.yml +# - template: build-and-test.yml - script: make xbuild-all workingDirectory: '$(System.DefaultWorkingDirectory)' displayName: 'Build Release' - - script: make publish - env: - AZURE_STORAGE_CONNECTION_STRING: $(AZURE_STORAGE_CONNECTION_STRING) + - script: | + export AZURE_STORAGE_CONNECTION_STRING=$(AZURE_STORAGE_CONNECTION_STRING) + make publish workingDirectory: '$(System.DefaultWorkingDirectory)' - displayName: 'Publish' \ No newline at end of file + displayName: 'Publish' + + - task: GitHubRelease@0 + condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) + inputs: + gitHubConnection: $(GITHUB_CONNECTIONNAME) + repositoryName: '$(Build.Repository.Name)' + action: 'create' + tagSource: 'auto' + assets: '$(System.DefaultWorkingDirectory)/bin/plugins/kubernetes/$(tag)/**' + addChangeLog: true + compareWith: 'lastFullRelease' \ No newline at end of file