forked from hyperledger/fabric
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines-release.yml
89 lines (84 loc) · 2.66 KB
/
azure-pipelines-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Copyright the Hyperledger Fabric contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
name: RELEASE-$(Date:yyyyMMdd)$(Rev:.rrr)
trigger: none
pr: none
variables:
- group: credentials
- name: GOPATH
value: $(Agent.BuildDirectory)/go
- name: GOVER
value: 1.16.7
stages:
- stage: BuildBinaries
dependsOn: []
displayName: "Build Fabric Binaries"
jobs:
- job: Build
pool:
vmImage: ubuntu-18.04
container: golang:$(GOVER)
strategy:
matrix:
Linux-amd64:
TARGET: linux-amd64
MacOS-amd64:
TARGET: darwin-amd64
Windows-amd64:
TARGET: windows-amd64
steps:
- checkout: self
path: 'go/src/github.com/hyperledger/fabric'
displayName: Checkout Fabric Code
- script: ./ci/scripts/create_binary_package.sh
displayName: Compile Binary and Create Tarball
- publish: release/$(TARGET)/hyperledger-fabric-$(TARGET)-$(RELEASE).tar.gz
artifact: hyperledger-fabric-$(TARGET)-$(RELEASE).tar.gz
displayName: Publish Release Artifact
- stage: BuildAndPushDockerImages
dependsOn: []
displayName: "Build and Push Fabric Docker Images"
jobs:
- job: Docker
pool:
vmImage: ubuntu-18.04
steps:
- template: install_deps.yml
- checkout: self
path: 'go/src/github.com/hyperledger/fabric'
displayName: Checkout Fabric Code
- script: ./ci/scripts/publish_docker.sh
env:
DOCKER_PASSWORD: $(DockerHub-Password)
DOCKER_USERNAME: $(DockerHub-Username)
displayName: Publish Docker Images
- stage: DraftRelease
displayName: "Draft GitHub Release"
dependsOn:
- BuildBinaries
- BuildAndPushDockerImages
jobs:
- job: Release
pool:
vmImage: ubuntu-18.04
steps:
- download: current
patterns: '*.tar.gz'
displayName: Download Artifacts
- checkout: self
- task: GitHubRelease@0
inputs:
action: create
addChangeLog: true
assets: $(Pipeline.Workspace)/*amd64*/*
compareWith: lastFullRelease
gitHubConnection: hyperledger
isDraft: true
releaseNotesFile: release_notes/v$(RELEASE).md
repositoryName: $(Build.Repository.Name)
releaseNotesSource: file
tag: v$(RELEASE)
tagSource: manual
title: v$(RELEASE)
displayName: Draft Release of Fabric