-
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
81aabf4
commit fe96f60
Showing
7 changed files
with
150 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,29 @@ | ||
# | ||
# 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-latest:linux-amd64.latest-SNAPSHOT:tar.gz | ||
mvn dependency:copy -Dartifact=org.hyperledger.fabric:hyperledger-fabric-latest:linux-amd64.latest-SNAPSHOT:tar.gz -DoutputDirectory=/tmp | ||
cd /usr/local | ||
sudo tar xzvf /tmp/hyperledger-fabric-latest-linux-amd64.latest-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-latest:linux-amd64.latest-SNAPSHOT:tar.gz | ||
mvn dependency:copy -Dartifact=org.hyperledger.fabric-ca:hyperledger-fabric-ca-latest:linux-amd64.latest-SNAPSHOT:tar.gz -DoutputDirectory=/tmp | ||
cd /usr/local | ||
sudo tar xzvf /tmp/hyperledger-fabric-ca-latest-linux-amd64.latest-SNAPSHOT.tar.gz | ||
displayName: Download Fabric CA CLI | ||
- script: | | ||
set -ex | ||
for i in baseos ca ccenv javaenv nodeenv peer orderer tools; do | ||
docker pull nexus3.hyperledger.org:10001/hyperledger/fabric-$i:amd64-2.0.0-stable | ||
docker tag nexus3.hyperledger.org:10001/hyperledger/fabric-$i:amd64-2.0.0-stable hyperledger/fabric-$i:amd64-2.0.0-stable | ||
docker tag nexus3.hyperledger.org:10001/hyperledger/fabric-$i:amd64-2.0.0-stable hyperledger/fabric-$i:amd64-2.0.0 | ||
docker tag nexus3.hyperledger.org:10001/hyperledger/fabric-$i:amd64-2.0.0-stable hyperledger/fabric-$i:2.0.0 | ||
docker tag nexus3.hyperledger.org:10001/hyperledger/fabric-$i:amd64-2.0.0-stable hyperledger/fabric-$i:latest | ||
done | ||
displayName: Pull Fabric Docker images |