Skip to content

Commit

Permalink
Apply changes from development branch to release branch
Browse files Browse the repository at this point in the history
Signed-off-by: Mark S. Lewis <[email protected]>
  • Loading branch information
bestbeforetoday committed Mar 7, 2023
1 parent 34147d6 commit 2b00586
Show file tree
Hide file tree
Showing 28 changed files with 170 additions and 210 deletions.
2 changes: 1 addition & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ repository:
name: fabric-sdk-java
description: null
homepage: https://wiki.hyperledger.org/display/fabric
default_branch: master
default_branch: main
has_downloads: true
has_issues: false
has_projects: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Pull request
on:
pull_request:
branches:
- release-2.2
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,30 @@ name: Push
on:
push:
branches:
- release-2.2
- main

jobs:
build:
uses: ./.github/workflows/test.yml

publish:
needs: build
name: Publish Java artifact to GitHub Packages
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: temurin
cache: maven
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
run: ${{ github.workspace }}/.github/scripts/maven_publish_snapshot.sh
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
publish-github:
name: Publish Java artifact to GitHub Packages
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: temurin
cache: maven
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
run: ${{ github.workspace }}/.github/scripts/maven_publish_release.sh github

publish-ossrh:
name: Publish Java artifact to Maven Central
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: temurin
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
run: ${{ github.workspace }}/.github/scripts/maven_publish_release.sh ossrh
9 changes: 9 additions & 0 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Scheduled build

on:
schedule:
- cron: "5 0 * * *"

jobs:
main:
uses: ./.github/workflows/test.yml
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Changelog

Notable changes in each release are documented on the project's [GitHub releases](https://github.com/hyperledger/fabric-sdk-java/releases) page. Historic changelog is retained below for reference.

## v2.2.19
Tue 29 Nov 2022 15:34:43 GMT

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ docs to learn how to make contributions to this exciting project.

## Code of Conduct Guidelines <a name="conduct"></a>

See our [Code of Conduct Guidelines](../blob/master/CODE_OF_CONDUCT.md).
See our [Code of Conduct Guidelines](../blob/main/CODE_OF_CONDUCT.md).

## Maintainers <a name="maintainers"></a>

Should you have any questions or concerns, please reach out to one of the project's [Maintainers](../blob/master/MAINTAINERS.md).
Should you have any questions or concerns, please reach out to one of the project's [Maintainers](../blob/main/MAINTAINERS.md).

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
4 changes: 2 additions & 2 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ Maintainers
|------|--------|------|----------------------
| Andrew Coleman | [andrew-coleman][andrew-coleman] | andrew-coleman | [email protected] |
| Mark Lewis | [bestbeforetoday][bestbeforetoday] | bestbeforetoday | [email protected] |
| Gari Singh | [mastersingh24][mastersingh24] | mastersingh24 | <[email protected]>

**Retired Maintainers**

| Name | GitHub | email |
|---|---|---|
| Rick Rineholt | cr22rc | cr22rc@gmail.com |
| Gari Singh | [mastersingh24][mastersingh24] | mastersingh24 | <gari.r.singh@gmail.com> |
| Jim Zhang | jimthematrix | [email protected] |
| Muhammad Altaf | malik-altaf | [email protected] |
| Pardha Vishnumolakala| psaradhi | [email protected] |
| Rick Rineholt | cr22rc | [email protected] |
| Satheesh Kathamuthu | xspeedcruiser | [email protected] |

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
Expand Down
49 changes: 27 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Hyperledger Fabric SDK for Java
# Hyperledger Fabric SDK for Java <a href="https://github.com/hyperledger/fabric-sdk-java/actions/workflows/schedule.yml"><img src="https://github.com/hyperledger/fabric-sdk-java/actions/workflows/schedule.yml/badge.svg" alt="Build status" style="float: right"></a>

> **Note:** This API is deprecated. When developing applications for Hyperledger Fabric v2.4 and later, you should use the [Fabric Gateway client API](https://hyperledger.github.io/fabric-gateway/). When developing applications for earlier Fabric versions, you are strongly encouraged to use the high-level API detailed below.
This project provides a low-level API for interacting with Hyperledger Fabric blockchain networks, and is used by the
high-level **Hyperledger Fabric Gateway SDK for Java**:
- Documentation: https://hyperledger.github.io/fabric-gateway-java/
- GitHub repository: https://github.com/hyperledger/fabric-gateway-java/

For building Hyperledger Fabric blockchain client applications, you are strongly encouraged to use the high level API.

The information below is intended for contributors to this repository.

Expand Down Expand Up @@ -104,22 +105,10 @@ You may also need to on your <span style="color:red"><b>v2.1</b> </span> Fabric

## Known limitations and restrictions

* TCerts are not supported: JIRA FAB-1401
* TCerts are not supported: [JIRA FAB-1401](https://jira.hyperledger.org/browse/FAB-1401)

---

## v2.1 builds of Fabric and Fabric-ca needed for the integration test

To get a functioning Fabric v2.1 network needed by the SDK Integration tests.
In the directory `src/test/fixture/sdkintegration` issue :

`./fabric.sh restart`

This command needs to be rerun each time the Integration tests are run.

### Setting Up Eclipse
To get started using the Fabric Java SDK with Eclipse, refer to the instructions at: ./docs/EclipseSetup.md

## SDK dependencies
SDK depends on few third party libraries that must be included in your classpath when using the JAR file. To get a list of dependencies, refer to pom.xml file or run
<code>mvn dependency:tree</code> or <code>mvn dependency:list</code>.
Expand All @@ -135,6 +124,10 @@ To run the integration tests Fabric and Fabric CA is needed which require

## Using the SDK

### Setting Up Eclipse

If you want to get started using the Fabric Java SDK with Eclipse, refer to the instructions at: ./docs/EclipseSetup.md

### Compiling

Once your JAVA_HOME points to your installation of JDK 1.8 (or above) and JAVA_HOME/bin and Apache maven are in your PATH, issue the following command to build the jar file:
Expand All @@ -154,9 +147,12 @@ To run the unit tests, please use <code>mvn install</code> which will run the un
**[INFO] BUILD SUCCESS** **_At the end is usually a very reliable indication that all tests have passed successfully!_**

### Running the integration tests
You must be running local instances of Fabric-ca, Fabric peers, and Fabric orderers to be able to run the integration tests. See above for for how to get a Fabric network running.
Use this `maven` command to run the integration tests:
* _mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc_

The script below both sets up the test environment and runs the tests.

```sh
./scripts/run-integration-tests.sh
```

### End to end test scenario

Expand Down Expand Up @@ -300,7 +296,7 @@ Go lang chaincode dependencies must be contained in vendor folder.

### Where can I find the Javadoc?

Look in the [Maven repository](http://central.maven.org/maven2/org/hyperledger/fabric-sdk-java/fabric-sdk-java/)
Look in the [Maven repository](https://search.maven.org/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java)
for the release in question there should be a file fabric-sdk-java-_&lt;release&gt;_-javadoc.jar

For SNAPSHOT builds look in [Sonatype repository](https://oss.sonatype.org/content/repositories/snapshots/org/hyperledger/fabric-sdk-java/fabric-sdk-java/)
Expand All @@ -321,7 +317,7 @@ can be on all requests overridden by setting the user context on that specific r
### Idemix users or Idemix test cases (IdemixIdentitiesTest) just seems to hang or take forever.

Most likely this is running on a virtual machine that does not have sufficient entropy.
Google for adding entropy on virtual machines or look at [virtual machines entropy](http://giovannitorres.me/increasing-entropy-on-virtual-machines.html)
Google for adding entropy on virtual machines or look at [virtual machines entropy](https://web.archive.org/web/20191202062101/http://giovannitorres.me/increasing-entropy-on-virtual-machines.html)
If linux try installing rng-tools package as this suggests.

### Firewalls, load balancers, network proxies
Expand Down Expand Up @@ -411,7 +407,16 @@ CORE_LOGGING_LEVEL=DEBUG
Fabric CA
by starting command have the -d parameter.

Upload full logs to the JIRA not just where the issue occurred if possible
Upload full logs to JIRA, not just where the issue occurred if possible

### Tracing

The SDK is set up to trace all gRPC communications:
* All outgoing messages bear trace metadata, allowing correlation with peers.
* Each request/response is computed as a span.
* If you use OpenTelemetry in your program, the gRPC span will correlate using the thread local context to the parent context.

The SDK accepts all environment variables as described in the [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md).

### Tracing

Expand Down
25 changes: 25 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Releasing

The following artifacts are created as a result of releasing the Hyperledger Fabric SDK for Java:

- [fabric-sdk-java](https://central.sonatype.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java/2.2.0/versions)

## Before releasing

The following tasks are required before releasing:

- Check that the last merge or scheduled build for the release branch passed successfully.

## Create release

Creating a GitHub release on the [releases page](https://github.com/hyperledger/fabric-sdk-java/releases) will trigger the build to publish the new release.

When drafting the release, create a new tag for the new version (with a `v` prefix), e.g. `vX.Y.Z`

See previous releases for examples of the title and description.

## After releasing

The following tasks are required after releasing:

- Update the `version` element in [pom.xml](pom.xml) to the next point release.
Loading

0 comments on commit 2b00586

Please sign in to comment.