-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-16850] Set up CI with Azure Pipelines
Signed-off-by: Simon Stone <sstone1@uk.ibm.com> Change-Id: I3821a329ec5eb439ce0f27cfbc71b28e6b0b8a09
- Loading branch information
Simon Stone
committed
Oct 17, 2019
1 parent
b92ff73
commit 750474d
Showing
7 changed files
with
155 additions
and
0 deletions.
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,51 @@ | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
trigger: | ||
- master | ||
- release-1.4 | ||
|
||
jobs: | ||
- job: fabcar_go | ||
displayName: FabCar (Go) | ||
pool: | ||
vmImage: ubuntu-18.04 | ||
dependsOn: [] | ||
timeoutInMinutes: 60 | ||
steps: | ||
- template: install-deps.yml | ||
- template: install-fabric.yml | ||
- template: fabcar-go.yml | ||
- job: fabcar_java | ||
displayName: FabCar (Java) | ||
pool: | ||
vmImage: ubuntu-18.04 | ||
dependsOn: [] | ||
timeoutInMinutes: 60 | ||
steps: | ||
- template: install-deps.yml | ||
- template: install-fabric.yml | ||
- template: fabcar-java.yml | ||
- job: fabcar_javascript | ||
displayName: FabCar (JavaScript) | ||
pool: | ||
vmImage: ubuntu-18.04 | ||
dependsOn: [] | ||
timeoutInMinutes: 60 | ||
steps: | ||
- template: install-deps.yml | ||
- template: install-fabric.yml | ||
- template: fabcar-javascript.yml | ||
- job: fabcar_typescript | ||
displayName: FabCar (TypeScript) | ||
pool: | ||
vmImage: ubuntu-18.04 | ||
dependsOn: [] | ||
timeoutInMinutes: 60 | ||
steps: | ||
- template: install-deps.yml | ||
- template: install-fabric.yml | ||
- template: fabcar-typescript.yml | ||
|
||
|
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,8 @@ | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
steps: | ||
- script: bash startFabric.sh go | ||
workingDirectory: fabcar | ||
displayName: Start Fabric |
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,14 @@ | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
steps: | ||
- script: bash startFabric.sh java | ||
workingDirectory: fabcar | ||
displayName: Start Fabric | ||
- script: retry -- mvn dependency:go-offline | ||
workingDirectory: fabcar/java | ||
displayName: Install FabCar application dependencies | ||
- script: mvn test | ||
workingDirectory: fabcar/java | ||
displayName: Run FabCar application |
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,19 @@ | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
steps: | ||
- script: bash startFabric.sh javascript | ||
workingDirectory: fabcar | ||
displayName: Start Fabric | ||
- script: retry -- npm install | ||
workingDirectory: fabcar/javascript | ||
displayName: Install FabCar application dependencies | ||
- script: | | ||
set -ex | ||
node enrollAdmin | ||
node registerUser | ||
node invoke | ||
node query | ||
workingDirectory: fabcar/javascript | ||
displayName: Run FabCar application |
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,22 @@ | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
steps: | ||
- script: bash startFabric.sh typescript | ||
workingDirectory: fabcar | ||
displayName: Start Fabric | ||
- script: retry -- npm install | ||
workingDirectory: fabcar/typescript | ||
displayName: Install FabCar application dependencies | ||
- script: npm run build | ||
workingDirectory: fabcar/typescript | ||
displayName: Build FabCar application | ||
- script: | | ||
set -ex | ||
node dist/enrollAdmin | ||
node dist/registerUser | ||
node dist/invoke | ||
node dist/query | ||
workingDirectory: fabcar/typescript | ||
displayName: Run FabCar application |
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,7 @@ | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
steps: | ||
- script: sudo sh -c "curl https://raw.githubusercontent.com/kadwanev/retry/master/retry -o /usr/local/bin/retry && chmod +x /usr/local/bin/retry" | ||
displayName: Install retry CLI |
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,34 @@ | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
steps: | ||
- script: | | ||
set -ex | ||
mvn dependency:get -DremoteRepositories=https://nexus.hyperledger.org/content/repositories/snapshots -Dartifact=org.hyperledger.fabric:hyperledger-fabric-1.4.4-stable:linux-amd64.1.4.4-stable-SNAPSHOT:tar.gz | ||
mvn dependency:copy -Dartifact=org.hyperledger.fabric:hyperledger-fabric-1.4.4-stable:linux-amd64.1.4.4-stable-SNAPSHOT:tar.gz -DoutputDirectory=/tmp | ||
cd /usr/local | ||
sudo tar xzvf /tmp/hyperledger-fabric-1.4.4-stable-linux-amd64.1.4.4-stable-SNAPSHOT.tar.gz | ||
displayName: Download Fabric CLI | ||
- script: | | ||
set -ex | ||
mvn dependency:get -DremoteRepositories=https://nexus.hyperledger.org/content/repositories/snapshots -Dartifact=org.hyperledger.fabric-ca:hyperledger-fabric-ca-1.4.4-stable:linux-amd64.1.4.4-stable-SNAPSHOT:tar.gz | ||
mvn dependency:copy -Dartifact=org.hyperledger.fabric-ca:hyperledger-fabric-ca-1.4.4-stable:linux-amd64.1.4.4-stable-SNAPSHOT:tar.gz -DoutputDirectory=/tmp | ||
cd /usr/local | ||
sudo tar xzvf /tmp/hyperledger-fabric-ca-1.4.4-stable-linux-amd64.1.4.4-stable-SNAPSHOT.tar.gz | ||
displayName: Download Fabric CA CLI | ||
- script: | | ||
set -ex | ||
for i in ca ccenv javaenv peer orderer tools; do | ||
docker pull nexus3.hyperledger.org:10001/hyperledger/fabric-$i:amd64-1.4.4-stable | ||
docker tag nexus3.hyperledger.org:10001/hyperledger/fabric-$i:amd64-1.4.4-stable hyperledger/fabric-$i:amd64-1.4.4-stable | ||
docker tag nexus3.hyperledger.org:10001/hyperledger/fabric-$i:amd64-1.4.4-stable hyperledger/fabric-$i:amd64-1.4.4 | ||
docker tag nexus3.hyperledger.org:10001/hyperledger/fabric-$i:amd64-1.4.4-stable hyperledger/fabric-$i:1.4.4 | ||
docker tag nexus3.hyperledger.org:10001/hyperledger/fabric-$i:amd64-1.4.4-stable hyperledger/fabric-$i:latest | ||
done | ||
for i in couchdb; do | ||
docker pull nexus3.hyperledger.org:10001/hyperledger/fabric-$i:0.4.15 | ||
docker tag nexus3.hyperledger.org:10001/hyperledger/fabric-$i:0.4.15 hyperledger/fabric-$i:0.4.15 | ||
docker tag nexus3.hyperledger.org:10001/hyperledger/fabric-$i:0.4.15 hyperledger/fabric-$i:latest | ||
done | ||
displayName: Pull Fabric Docker images |