Skip to content

Commit

Permalink
Merge branch 'hyperledger:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
chl-git authored May 9, 2023
2 parents 3619ec8 + 6af952a commit a5666b1
Show file tree
Hide file tree
Showing 2,694 changed files with 203,235 additions and 185,251 deletions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright the Hyperledger Fabric contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# How to modify this file: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms

name: Bug Report
description: Let us know what went wrong
labels: ["bug"]
body:
- type: textarea
id: bug
attributes:
label: Description
description: What went wrong?
validations:
required: true
- type: textarea
id: repro
attributes:
label: Steps to reproduce
description: How to reproduce the issue (ideally, provide cli instructions)
validations:
required: false
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright the Hyperledger Fabric contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

blank_issues_enabled: true
contact_links:
- name: Support, Help, Questions, Chat
url: "https://hyperledger-fabric.readthedocs.io/en/latest/CONTRIBUTING.html#communications-and-getting-help"
about: "Use the communication resources to get Help and Chat with other users"
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright the Hyperledger Fabric contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# How to modify this file: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms

name: Feature Request
description: Submit your requests and suggestions to improve!
labels: ["enhancement"]
body:
- type: textarea
id: status
attributes:
label: Current Status
description: Describe the current status.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected
description: Describe what you expect.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Solution
description: Describe a Solution (or multiple solution paths )
validations:
required: false
- type: dropdown
id: help
attributes:
label: Please let us know if you plan to work on this.
multiple: true
options:
- Yes!
- No.
- Maybe.
validations:
required: false
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/workitem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright the Hyperledger Fabric contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# How to modify this file: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms

name: Work Item
description: "For Core-Contributors: File a Concrete Work-Item"
labels: ["workitem"]
body:
- type: textarea
id: status
attributes:
label: Current Status
description: Describe the current status.
validations:
required: true
- type: textarea
id: goal
attributes:
label: Goal
description: Describe what your goal is.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Solution
description: Describe your Solution (or multiple solution paths )
validations:
required: true
155 changes: 155 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Copyright the Hyperledger Fabric contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

name: Release

on:
workflow_dispatch: # workflow_dispatch must be enabled in main branch to support release action on older release branches
push:
tags: [ v2.* ]

env:
GO_VER: 1.20.3
UBUNTU_VER: 20.04
FABRIC_VER: ${{ github.ref_name }}
DOCKER_REGISTRY: ${{ github.repository_owner == 'hyperledger' && 'docker.io' || 'ghcr.io' }}

permissions:
contents: read

jobs:
build-binaries:
name: Build Fabric Binaries
strategy:
matrix:
include:
- image: fabric-ubuntu-20.04
target: linux
arch: amd64
- image: fabric-ubuntu-20.04
target: linux
arch: arm64
- image: macos-11
target: darwin
arch: amd64
- image: macos-11
target: darwin
arch: arm64
- image: fabric-windows-latest
target: windows
arch: amd64
runs-on: fabric-ubuntu-20.04
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VER }}
- name: Checkout Fabric Code
uses: actions/checkout@v3
- name: Compile Binary and Create Tarball
run: ./ci/scripts/create_binary_package.sh
env:
TARGET: ${{ matrix.target }}-${{ matrix.arch }}
RELEASE: ${{ env.FABRIC_VER }}

- name: Publish Release Artifact
uses: actions/upload-artifact@v3
with:
# <name> of the artifact must not collide between platform/arch builds
name: release-${{ matrix.target }}-${{ matrix.arch }}
# <path> of the artifact may include multiple files.
path: release/${{ matrix.target }}-${{ matrix.arch }}/*.tar.gz

build-and-push-docker-images:
name: Build and Push
runs-on: fabric-ubuntu-20.04

permissions:
contents: read
packages: write

strategy:
matrix:
include:
- COMPONENT: baseos
CONTEXT: images/baseos
- COMPONENT: ccenv
CONTEXT: images/ccenv
- COMPONENT: peer
CONTEXT: .
- COMPONENT: orderer
CONTEXT: .
- COMPONENT: tools
CONTEXT: .

steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
config-inline: |
[worker.oci]
max-parallelism = 1
- name: Checkout
uses: actions/checkout@v3

- name: Login to the ${{ env.DOCKER_REGISTRY }} Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ env.DOCKER_REGISTRY == 'docker.io' && secrets.DOCKERHUB_USERNAME || github.actor }}
password: ${{ env.DOCKER_REGISTRY == 'docker.io' && secrets.DOCKERHUB_TOKEN || secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ github.repository_owner }}/fabric-${{ matrix.COMPONENT }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
- name: Build and push ${{ matrix.COMPONENT }} Image
id: push
uses: docker/build-push-action@v3
with:
context: ${{ matrix.CONTEXT }}
file: images/${{ matrix.COMPONENT }}/Dockerfile
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
FABRIC_VER=${{ env.FABRIC_VER }}
UBUNTU_VER=${{ env.UBUNTU_VER }}
GO_VER=${{ env.GO_VER }}
GO_TAGS=
create-release:
name: Create GitHub Release
needs:
- build-binaries
- build-and-push-docker-images
runs-on: fabric-ubuntu-20.04
permissions:
contents: write
steps:
- name: Checkout Fabric Code
uses: actions/checkout@v3
- name: Download Artifacts
id: download
uses: actions/download-artifact@v3
- name: Release Fabric Version
uses: ncipollo/release-action@v1
with:
allowUpdates: "true"
artifacts: "release-*-*/*.tar.gz"
bodyFile: release_notes/${{ env.FABRIC_VER }}.md
tag: ${{ env.FABRIC_VER }}
token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion .github/workflows/slash-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
types:
- created
- edited
permissions: {}
jobs:
notify:
permissions:
issues: write # to comment on or close issue

name: Invalid Issue Usage
if: contains(github.event.comment.body, '/invalid') && github.event.issue.state == 'open'
runs-on: ubuntu-latest
Expand All @@ -23,7 +27,7 @@ jobs:
GitHub Issues is a tool for tracking bugs, feature requests, and work in general that relates directly to the Fabric codebase. It is not for general help requests. Please use one of the following forums to request help for your issue:
- RocketChat: https://chat.hyperledger.org
- Discord: https://discord.com/servers/hyperledger-foundation-905194001349627914
- Fabric Mailing List: [email protected]
- name: Close Issue
uses: lindluni/[email protected]
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/trigger.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/verify-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Copyright the Hyperledger Fabric contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

name: Verify Build
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
workflow_dispatch:

env:
GOPATH: /opt/go
PATH: /opt/go/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
GO_VER: 1.20.3

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
basic-checks:
name: Basic Checks
runs-on: fabric-ubuntu-20.04
steps:
- uses: actions/setup-go@v3
name: Install Go
with:
go-version: ${{ env.GO_VER }}
- uses: actions/checkout@v3
name: Checkout Fabric Code
with:
fetch-depth: 0
- run: make basic-checks
name: Run Basic Checks
unit-tests:
name: Unit Tests
needs: basic-checks
runs-on: fabric-ubuntu-20.04
steps:
- uses: actions/setup-go@v3
name: Install Go
with:
go-version: ${{ env.GO_VER }}
- uses: actions/checkout@v3
name: Checkout Fabric Code
- run: ci/scripts/setup_hsm.sh
name: Install SoftHSM
- run: make unit-test
name: Run Unit Tests
integration-tests:
name: Integration Tests
needs: basic-checks
strategy:
fail-fast: false
matrix:
INTEGRATION_TEST_SUITE: ["raft","pvtdata","pvtdatapurge","ledger","lifecycle","e2e smartbft","discovery gossip devmode pluggable","gateway idemix pkcs11 configtx configtxlator","sbe nwo msp"]
runs-on: fabric-ubuntu-20.04
steps:
- uses: actions/setup-go@v3
name: Install Go
with:
go-version: ${{ env.GO_VER }}
- uses: actions/checkout@v3
name: Checkout Fabric Code
- run: ci/scripts/setup_hsm.sh
name: Install SoftHSM
- run: make integration-test INTEGRATION_TEST_SUITE="${{matrix.INTEGRATION_TEST_SUITE}}"
name: Run Integration Tests
Loading

0 comments on commit a5666b1

Please sign in to comment.