Skip to content

Commit

Permalink
update azp for release (#108)
Browse files Browse the repository at this point in the history
* update azp for release

Signed-off-by: Yang Cheng <[email protected]>
  • Loading branch information
stone-ch authored Nov 25, 2020
1 parent bc6b0a1 commit f5ad762
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
36 changes: 32 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@ pool:

jobs:
- job: ut
displayName: unit-test
strategy:
matrix:
linux:
imageName: 'ubuntu-latest'
mac:
imageName: 'macOS-latest'
# windows:
# imageName: 'windows-latest'
displayName: ut
pool:
vmImage: $(imageName)
steps:
- task: GoTool@0
inputs:
Expand All @@ -31,7 +41,7 @@ jobs:
command: 'build'
arguments: './...'
workingDirectory: '$(System.DefaultWorkingDirectory)'

- job: dockerbuild
displayName: dockerbuild
steps:
Expand All @@ -41,8 +51,8 @@ jobs:
command: 'build'
Dockerfile: '**/Dockerfile'

- job:
displayName: integration-test
- job: integrationTest
displayName: integrationTest
dependsOn:
- ut
- dockerbuild
Expand All @@ -61,3 +71,21 @@ jobs:
FABRIC_VERSION: ''
steps:
- script: ./test/integration-test.sh $(FABRIC_VERSION) $(INTERGATION_CASE)

- job: BuildAndReleaseBinaries
displayName: BuildAndReleaseBinaries
dependsOn:
- integrationTest
steps:
- script: GOOS=linux GOARCH=amd64 go build -o linux-amd64/tape ./cmd/tape && cp config.yaml linux-amd64 && tar -czvf "tape-linux-amd64.tar.gz" linux-amd64 && GOOS=darwin GOARCH=amd64 go build -o darwin-amd64/tape ./cmd/tape && cp config.yaml darwin-amd64 && tar -czvf "tape-darwin-amd64.tar.gz" darwin-amd64 && GOOS=windows GOARCH=amd64 go build -o windows-amd64/tape ./cmd/tape && cp config.yaml windows-amd64 && tar -czvf "tape-windows-amd64.tar.gz" windows-amd64
displayName: Compile Binary and Create Tarball
- task: GithubRelease@0
displayName: 'Create GitHub Release'
inputs:
repositoryName: '$(Build.Repository.Name)'
gitHubConnection: github.com_stone-ch
action: 'create'
tagSource: 'auto'
tagPattern: 'v.*'
assets: |
./*.tar.gz
2 changes: 1 addition & 1 deletion test/integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex
DIR=$PWD
docker build -t tape:latest .

curl -vsS https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash
curl -vsS https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- 2.2.0 1.4.7

cd ./fabric-samples/
case $1 in
Expand Down

0 comments on commit f5ad762

Please sign in to comment.