Skip to content

Commit 76c7fe4

Browse files
mbwhitejt-nti
authored andcommitted
Cleanup files
Signed-off-by: Matthew B White <[email protected]>
1 parent 70bdd19 commit 76c7fe4

File tree

6 files changed

+45
-10
lines changed

6 files changed

+45
-10
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,23 @@ The following technical examples are in this repository. Please see the tutorial
4545
- **fabric-chaincode-example-sacc** - Contains an example java chaincode gradle project that includes sample chaincode and basic gradle build instructions.
4646
- **fabric-chaincode-example-sbe** - Contains an example java chaincode gradle project that includes state based endorsement
4747

48-
48+
## 'dev' master branch builds
49+
50+
These 'dev' drivers are built from the master branch only, and have a version format including the date for example `2.3.1.dev.20210303`.
51+
They are published to Artifactory. These can be accessed via the repository at
52+
```
53+
maven {
54+
url "https://hyperledger.jfrog.io/hyperledger/fabric-maven"
55+
}
56+
```
57+
58+
They can be accessed in a build file like this
59+
60+
```
61+
dependencies {
62+
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.3.1.dev.+'
63+
}
64+
```
4965

5066

5167
## Building and testing

RELEASING.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,17 @@ See the [Bump version to 2.2.1](https://github.com/hyperledger/fabric-chaincode-
6060

6161
## Interim Build Publishing
6262

63-
tbc
63+
The nightly Azure Pipeline Builds will also publish the 'dev' drivers to Artifactory. These can be accessed via the repository at
64+
```
65+
maven {
66+
url "https://hyperledger.jfrog.io/hyperledger/fabric-maven"
67+
}
68+
```
69+
70+
These 'dev' drivers are built from the master branch only, and have a version format including the date for example `2.3.1.dev.20210303`. They can be accessed in a build file like this
71+
72+
```
73+
dependencies {
74+
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.3.1.dev.+'
75+
}
76+
```

build.gradle

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@ apply plugin: 'idea'
88
apply plugin: 'eclipse-wtp'
99
version = '2.3.1'
1010

11+
12+
// If the nightly property is set, then this is the scheduled master
13+
// build - and we should publish this to artifactory
14+
//
15+
// Use the .dev.<number> format to match Maven convention
1116
if (properties.containsKey('NIGHTLY')) {
1217
version = version + '.dev.' + getDate()
18+
ext.nightly = true // set property for use in subprojects
19+
} else {
20+
ext.nightly = false
1321
}
1422

1523
allprojects {
@@ -28,6 +36,7 @@ subprojects {
2836

2937
group = 'org.hyperledger.fabric-chaincode-java'
3038
version = rootProject.version
39+
3140

3241
sourceCompatibility = 1.8
3342
targetCompatibility = 1.8
@@ -63,7 +72,7 @@ task printVersionName() {
6372
println rootProject.version
6473
}
6574

66-
75+
// Get the date in the reverse format for sorting
6776
def getDate() {
6877
def date = new Date()
6978
def formattedDate = date.format('yyyyMMdd')

ci/azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ stages:
207207
208208
#
209209
- stage: Publish_tag_nightly
210-
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
210+
condition: and(succeeded(), eq(variables['Build.Reason'], 'Schedule')) # only run on the scheduled builds
211211
jobs:
212212
- job: jar_publish
213213
steps:

fabric-chaincode-protos/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ uploadArchives {
142142
mavenDeployer {
143143
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
144144

145-
if (properties.containsKey('NIGHTLY')) {
146-
logger.info("++++++++++++++++++++++++++++++ Running Nightly")
145+
if (nightly) {
147146
repository(url: "https://hyperledger-fabric.jfrog.io/artifactory/fabric-maven") {
148147
authentication(userName: project.findProperty('artifactoryUsername'), password: project.findProperty('artifactoryPassword'))
149148
}
@@ -152,7 +151,6 @@ uploadArchives {
152151
authentication(userName: project.findProperty('artifactoryUsername'), password: project.findProperty('artifactoryPassword'))
153152
}
154153
} else {
155-
logger.info("Running Release")
156154
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
157155
authentication(userName: project.findProperty('ossrhUsername'), password: project.findProperty('ossrhPassword'))
158156
}
@@ -163,7 +161,7 @@ uploadArchives {
163161
}
164162

165163
pom.project {
166-
name '++++++++++++++++++++++++++++++++++++++JavaChaincodeProtobuf'
164+
name 'JavaChaincodeProtobuf'
167165
packaging 'jar'
168166
description 'Hyperldger Fabric Java chaincode protobuf files'
169167
url 'http://www.hyperledger.org/'

fabric-chaincode-shim/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ uploadArchives {
255255
mavenDeployer {
256256
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
257257

258-
if (properties.containsKey('NIGHTLY')) {
259-
258+
if (nightly) {
260259
repository(url: "https://hyperledger-fabric.jfrog.io/artifactory/fabric-maven") {
261260
authentication(userName: project.findProperty('artifactoryUsername'), password: project.findProperty('artifactoryPassword'))
262261
}

0 commit comments

Comments
 (0)