-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup CI pipeline for the repository (#2)
* Formatting Dockerfile and pom.xml file Signed-off-by: S m, Aruna <[email protected]> * Add GH Actions 1. Test, build for all the PRs 2. Test, build after every merge to the main branch 3. Test, build and generate a new docker image for release. This can be improved further by adding a auto-version increment option for the pom.xml. Until then the version has to be manually incremented for every new release. Signed-off-by: S m, Aruna <[email protected]> * Add CODEOWNERS file Signed-off-by: S m, Aruna <[email protected]> * Add CODE_OF_CONDUCT.md file Signed-off-by: S m, Aruna <[email protected]>
- Loading branch information
Showing
7 changed files
with
122 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Pull Request CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone the repository | ||
uses: "actions/checkout@v2" | ||
- name: Setup JDK 8 | ||
uses: "actions/setup-java@v2" | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt-openj9' | ||
- name: Run tests | ||
run: mvn -B clean verify | ||
- name: Run build | ||
run: mvn -B package -DskipTests=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Merge Build and Sanity | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone the repository | ||
uses: "actions/checkout@v2" | ||
- name: Setup JDK 8 | ||
uses: "actions/setup-java@v2" | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt-openj9' | ||
- name: Run tests and lints | ||
run: mvn -B clean verify | ||
- name: Run build | ||
run: mvn -B clean package -DskipTests=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone the repository | ||
uses: "actions/checkout@v2" | ||
- name: Setup JDK 8 | ||
uses: "actions/setup-java@v2" | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt-openj9' | ||
- name: Run tests and lints | ||
run: mvn -B clean verify | ||
- name: Run build | ||
run: mvn -B clean package -DskipTests=true | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: "${{ secrets.PAT_USERNAME }}" | ||
password: "${{ secrets.PAT }}" | ||
- name: Generate a container image | ||
run: | | ||
version=$(mvn -q \ | ||
-Dexec.executable=echo \ | ||
-Dexec.args='${project.version}' \ | ||
--non-recursive \ | ||
exec:exec) | ||
docker build . -t ghcr.io/${USERNAME_OR_ORG}/hlf-connector:${version} | ||
docker push ghcr.io/${USERNAME_OR_ORG}/hlf-connector:${version} | ||
shell: bash | ||
env: | ||
USERNAME_OR_ORG: "${{ github.repository_owner }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Fabric Connector Maintainers | ||
* @hyperledger-labs/hlf-connector-maintainers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Code of Conduct Guidelines | ||
========================== | ||
|
||
Please review the Hyperledger [Code of | ||
Conduct](https://wiki.hyperledger.org/community/hyperledger-project-code-of-conduct) | ||
before participating. It is important that we keep things civil. | ||
|
||
<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>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters