|
4 | 4 | # |
5 | 5 | # fabric-chaincode-java azure pipeline configuration. |
6 | 6 | # |
7 | | -name: $(BUILD_SOURCEBRANCHNAME)-$(Date:yyyyMMdd)$(Rev:.rrr) |
| 7 | +name: $(SourceBranchName)-$(Date:yyyyMMdd)$(Rev:.rrr) |
8 | 8 |
|
9 | 9 | # Daily build for final quality |
10 | 10 | # cf https://crontab.guru/#0_23_*_*_* |
@@ -43,7 +43,7 @@ variables: |
43 | 43 | - name: pipeline |
44 | 44 | value: ci |
45 | 45 | - name: NEXUS_REPO_URL |
46 | | - value: nexus3.hyperledger.org:10002 |
| 46 | + value: nexus3.hyperledger.org:10003 |
47 | 47 | - name: PUSH_VERSION |
48 | 48 | value: stable |
49 | 49 |
|
@@ -81,18 +81,25 @@ stages: |
81 | 81 | steps: |
82 | 82 | - script: | |
83 | 83 | # Publish docker images to nexus repository |
84 | | - docker login nexus3.hyperledger.org:10001 --username=$(NEXUS_HUB_USERNAME) --password=$(NEXUS_HUB_PASSWORD) |
| 84 | + docker login $(NEXUS_REPO_URL) --username=$env.NEXUS_HUB_USERNAME --password=$env.NEXUS_HUB_PASSWORD |
85 | 85 | # tag javaenv image to $PUSH_VERSION |
86 | 86 | docker tag hyperledger/fabric-javaenv $(NEXUS_REPO_URL)/hyperledger/fabric-javaenv:amd64-$(PUSH_VERSION) |
87 | 87 | # push javaenv to nexus repository |
88 | 88 | docker push $(NEXUS_REPO_URL)/hyperledger/fabric-javaenv:amd64-$(PUSH_VERSION) |
| 89 | + env: |
| 90 | + NEXUS_HUB_USERNAME: $(nexus-user) |
| 91 | + NEXUS_HUB_PASSWORD: $(nexus-password) |
89 | 92 | - script: | |
90 | 93 | ./gradlew publishToMavenLocal |
91 | | - # |
92 | | - export PUSH_VERSION=$(PUSH_VERSION) |
93 | | - # |
94 | | - ./ci/publish_jar_nexus.sh |
| 94 | +# As the next script is more complex and uses loops, run this descretely in a sh file |
| 95 | + - task: Bash@3 |
| 96 | + inputs: |
| 97 | + targetType: 'filePath' |
| 98 | + filePath: '/ci/publish_jar_nexus.sh' |
| 99 | + env: |
| 100 | + PUSH_VERSION: $(PUSH_VERSION) |
95 | 101 |
|
| 102 | +# Publishing step for git tags |
96 | 103 | - stage: Publish_tag |
97 | 104 | condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags')) |
98 | 105 | jobs: |
|
0 commit comments