|
2 | 2 |
|
3 | 3 | The following artifacts are created as a result of releasing Fabric Chaincode Java: |
4 | 4 |
|
5 | | -- docker images |
6 | | - - [fabric-javaenv](https://hub.docker.com/r/hyperledger/fabric-javaenv) |
7 | | -- Java libraries |
8 | | - - [fabric-chaincode-shim](https://search.maven.org/search?q=a:fabric-chaincode-shim) |
9 | | - |
10 | | -**Note:** A docker image with a matching V.R version is required before releasing a new version of Fabric. |
| 5 | +- `fabric-javaenv` Docker images: |
| 6 | + - [Docker Hub](https://hub.docker.com/r/hyperledger/fabric-javaenv) |
| 7 | + - [GitHub Packages](https://github.com/orgs/hyperledger/packages/container/package/fabric-javaenv) |
| 8 | +- `fabric-chaincode-shim` Java libraries: |
| 9 | + - [Maven Central](https://central.sonatype.com/artifact/org.hyperledger.fabric-chaincode-java/fabric-chaincode-shim) |
| 10 | + - [GitHub Packages](https://github.com/hyperledger/fabric-chaincode-java/packages/50049) |
11 | 11 |
|
12 | 12 | ## Before releasing |
13 | 13 |
|
14 | | -It's useful to create an issue to keep track of each release, for example [Release v2.1.0](https://jira.hyperledger.org/browse/FABCJ-283). |
15 | | - |
16 | 14 | The following tasks are required before releasing: |
17 | 15 |
|
18 | | -- Update version numbers in `build.gradle` files to the required version |
19 | | -- Update test, sample, and docs files to match the new version |
20 | | -- Update the [`COMPATIBILITY.md`](./COMPATIBILITY.md) |
21 | | - |
22 | | -See the [[FABCJ-289] release: 2.2.0 LTS](https://github.com/hyperledger/fabric-chaincode-java/pull/124) pull request for an example, although be careful to search for all versions in the codebase as they're easy to miss and things change! |
23 | | - |
24 | | -Ensure the last branch build passed since exactly this repository state will be released. |
| 16 | +- Ensure the version number in `build.gradle` is the required release version. |
| 17 | +- Check the last branch build passed since exactly this repository state will be released. |
25 | 18 |
|
26 | 19 | ## Create release |
27 | 20 |
|
28 | 21 | Creating a GitHub release on the [releases page](https://github.com/hyperledger/fabric-chaincode-java/releases) will trigger the build to publish the new release. |
29 | 22 |
|
30 | | -When drafting the release, create a new tag for the new version (with a `v` prefix), e.g. `v2.1.4` |
| 23 | +When drafting the release, create a new tag for the new version (with a `v` prefix). For example: `v2.1.4` |
31 | 24 |
|
32 | 25 | See previous releases for examples of the title and description. |
33 | 26 |
|
34 | | -## Publish Java libraries |
35 | | - |
36 | | -Log on to the [nexus repository manager](https://oss.sonatype.org/#welcome) to manually publish the JARs which were pushed by the release build. |
37 | | - |
38 | | -Find the results of the release build under _Build Promotion > Staging Repositories_ and perform the following steps: |
39 | | - |
40 | | -1. Close |
41 | | - |
42 | | - You should see a series of close activities (see note) |
43 | | - |
44 | | -2. Release using the automatically drop option |
45 | | - |
46 | | - You should see a series of release activities (see note) |
47 | | - |
48 | | -Note: you may need to refresh to update the activities view. |
49 | | - |
50 | | -When the release has completed and the _Staging Repositories_ list is empty, the Java chaincode libraries should appear in the maven repository. They can take some time to appear in the UI but they should exist in the repository sooner. |
51 | | - |
52 | 27 | ## After releasing |
53 | 28 |
|
54 | | -- Update version numbers in `build.gradle` files to the next version |
55 | | -- Update test, sample, and docs files to match the new version |
56 | | - |
57 | | -See the [Bump version to 2.2.1](https://github.com/hyperledger/fabric-chaincode-java/pull/127) pull request for an example. It should include almost all the files changed to prepare for the release, except for the release notes and changelog which do not need updating. |
58 | | - |
59 | | -## Interim Build Publishing |
60 | | - |
61 | | -The nightly Azure Pipeline Builds will also publish the 'dev' drivers to Artifactory. These can be accessed via the repository at |
62 | | - |
63 | | -``` |
64 | | - maven { |
65 | | - url "https://hyperledger.jfrog.io/hyperledger/fabric-maven" |
66 | | - } |
67 | | -``` |
68 | | - |
69 | | -These 'dev' drivers are built from the main 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 |
70 | | - |
71 | | -``` |
72 | | -dependencies { |
73 | | - compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.3.1.dev.+' |
74 | | - } |
75 | | -``` |
| 29 | +- Update the version number in `build.gradle` to the next version. |
| 30 | +- Update version numbers in `fabric-chaincode-docker/build.gradle` to match the next version. |
| 31 | +- Update the `fabric-chaincode-shim` dependency version in all `build.gradle` and `pom.xml` files within `fabric-chaincode-integration-test/src/contracts` to match the next version. |
| 32 | +- Update the `fabric-chaincode-shim` dependency version in all `build.gradle`, `build.gradle.kts` and `pom.xml` files within `examples` to mast the last _released_ version. |
| 33 | +- Check that `COMPATIBILITY.md` is correct and update if required. |
0 commit comments