Skip to content

Commit

Permalink
Merge pull request #337 from btl5037/azp_gate
Browse files Browse the repository at this point in the history
[FAB-17166] Gate UT, IT and DocBuild
  • Loading branch information
kchristidis committed Dec 2, 2019
2 parents 29dd911 + f0422d6 commit 94c3a09
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ jobs:
path: 'go/src/github.com/hyperledger/fabric'
displayName: Checkout Fabric Code
- script: make basic-checks native
displayName: Verify Build
displayName: Run Basic Checks
- script: ./ci/scripts/evaluate_commits.sh
name: SetJobTriggers

- job: DocBuild
condition: eq(dependencies.VerifyBuild.outputs['SetJobTriggers.buildDoc'], 'true')
dependsOn: VerifyBuild
pool:
vmImage: ubuntu-18.04
container:
Expand All @@ -40,6 +44,8 @@ jobs:
displayName: Publish Documentation Artifacts

- job: UnitTests
condition: eq(dependencies.VerifyBuild.outputs['SetJobTriggers.runTests'], 'true')
dependsOn: VerifyBuild
pool:
vmImage: ubuntu-18.04
steps:
Expand All @@ -53,6 +59,8 @@ jobs:
displayName: Run Unit Tests

- job: IntegrationTests
condition: eq(dependencies.VerifyBuild.outputs['SetJobTriggers.runTests'], 'true')
dependsOn: VerifyBuild
pool:
vmImage: ubuntu-18.04
strategy:
Expand Down
12 changes: 12 additions & 0 deletions ci/scripts/evaluate_commits.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail

if [[ $(git diff-tree --no-commit-id --name-only 'HEAD^..HEAD') == "docs" ]]; then
echo "##vso[task.setvariable variable=buildDoc;isOutput=true]true"
else
echo "##vso[task.setvariable variable=buildDoc;isOutput=true]true"
echo "##vso[task.setvariable variable=runTests;isOutput=true]true"
fi

0 comments on commit 94c3a09

Please sign in to comment.