1+ # Copyright IBM Corp. All Rights Reserved.
2+ #
3+ # SPDX-License-Identifier: Apache-2.0
4+ #
5+ # fabric-chaincode-java azure pipeline configuration.
6+ #
7+ trigger :
8+ branches :
9+ include :
10+ - ' master'
11+ - ' release-1.4'
12+ tags :
13+ include :
14+ - ' *'
15+
16+ # These are custom defined variables, the pipeline one is currently used for the build scripts
17+ # to know to produce tests results in XML format for Azure to consume, for developers
18+ # this isn't set so command line output is given
19+ #
20+ variables :
21+ component : fabric-chaincode-node
22+ pipeline : ci
23+
24+ pool :
25+ vmImage : ' ubuntu-latest'
26+
27+ #
28+ # The stages and jobs, potential for rationalization and optimization
29+ # Keeping it simple and explict whilst we gain experience
30+ stages :
31+ - stage : Build_and_test
32+ jobs :
33+ - job : main
34+ steps :
35+ - script : env
36+ - task : Gradle@2
37+ inputs :
38+ workingDirectory : ' '
39+ gradleWrapperFile : ' gradlew'
40+ gradleOptions : ' -Xmx3072m'
41+ javaHomeOption : ' JDKVersion'
42+ jdkVersionOption : ' 1.8'
43+ jdkArchitectureOption : ' x64'
44+ publishJUnitResults : true
45+ testResultsFiles : ' $(System.DefaultWorkingDirectory)/**/TEST-*.xml'
46+ tasks : ' build'
47+ - task : PublishCodeCoverageResults@1
48+ inputs :
49+ summaryFileLocation : ' $(System.DefaultWorkingDirectory)/**/fabric-chaincode-shim/build/reports/jacoco/test/jacocoTestReport.xml'
50+ - stage : Publish_tag
51+ condition : and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
52+ jobs :
53+ - job : update_version
54+ steps :
55+ - script : |
56+ env | sort
57+ echo "Update the version number"
58+ echo "Make sure release notes are present"
59+ echo "Make sure change history is present"
60+ - job : npm_publish
61+ steps :
62+ - script : |
63+ echo "Setup .npmrc"
64+ echo "Use pipeline secret to login"
65+ echo "publish"
66+ - job : jsdoc_publish
67+ steps :
68+ - script : |
69+ echo "checkout docs branch"
70+ echo "checking"
0 commit comments