-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Brett Logan <lindluni@github.com>
- Loading branch information
Showing
3 changed files
with
111 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Copyright the Hyperledger Fabric cont ributors. 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.15.7 | ||
|
||
stages: | ||
- stage: BuildBinaries | ||
dependsOn: [] | ||
displayName: "Build Fabric CA Binaries" | ||
jobs: | ||
- job: Build | ||
pool: | ||
vmImage: ubuntu-16.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-ca' | ||
displayName: Checkout Fabric CA Code | ||
- script: make dist/$(TARGET) | ||
displayName: Compile Binary and Create Tarball | ||
- publish: release/$(TARGET)/hyperledger-fabric-ca-$(TARGET)-$(RELEASE).tar.gz | ||
artifact: hyperledger-fabric-ca-$(TARGET)-$(RELEASE).tar.gz | ||
displayName: Publish Release Artifact | ||
|
||
- stage: BuildAndPushDockerImages | ||
dependsOn: [] | ||
displayName: "Build and Push Fabric CA Docker Images" | ||
jobs: | ||
- job: Docker | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
steps: | ||
- template: install_deps.yml | ||
- checkout: self | ||
path: 'go/src/github.com/hyperledger/fabric-ca' | ||
displayName: Checkout Fabric CA 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-16.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: fabric-ca-release | ||
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 CA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
# Copyright IBM Corp. All Rights Reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
set -euo pipefail | ||
|
||
make docker | ||
|
||
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}" | ||
|
||
docker tag "hyperledger/fabric-ca" "hyperledger/fabric-ca:amd64-${RELEASE}" | ||
docker push "hyperledger/fabric-ca:amd64-${RELEASE}" | ||
|
||
docker tag "hyperledger/fabric-ca" "hyperledger/fabric-ca:${RELEASE}" | ||
docker push "hyperledger/fabric-ca:${RELEASE}" | ||
|
||
docker tag "hyperledger/fabric-ca" "hyperledger/fabric-ca:amd64-${TWO_DIGIT_RELEASE}" | ||
docker push "hyperledger/fabric-ca:amd64-${TWO_DIGIT_RELEASE}" | ||
|
||
docker tag "hyperledger/fabric-ca" "hyperledger/fabric-ca:${TWO_DIGIT_RELEASE}" | ||
docker push "hyperledger/fabric-ca:${TWO_DIGIT_RELEASE}" |