Skip to content

Commit

Permalink
Merge pull request #10 from kaiachain/update-cicd
Browse files Browse the repository at this point in the history
update cicd
  • Loading branch information
Sotatek-TinnNguyen authored Jun 20, 2024
2 parents 08e0f43 + 5d5a37b commit 1c2cc0e
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 81 deletions.
68 changes: 34 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ aliases:
branches:
ignore:
- /release\/.*/
- master
- main

orbs:
codecov: codecov/[email protected]
docker: circleci/[email protected]

executors:
linux-executor: # this executor is for general testing and packaging linux binaries
working_directory: ~/go/src/github.com/klaytn/klaytn
working_directory: ~/go/src/github.com/kaiachain/kaia
resource_class: medium
docker:
- image: klaytn/build_base:1.12-go.1.22.1-solc0.8.13-ubuntu-20.04
- image: kaiachain/build_base:1.12-go.1.22.1-solc0.8.13-ubuntu-20.04
auth:
username: $DOCKER_LOGIN
password: $DOCKER_PASSWORD
linux-others-executor: # this executor is for test-others job
working_directory: /go/src/github.com/klaytn/klaytn
working_directory: /go/src/github.com/kaiachain/kaia
resource_class: xlarge
docker:
- image: klaytn/build_base:1.12-go.1.22.1-solc0.8.13-ubuntu-20.04
- image: kaiachain/build_base:1.12-go.1.22.1-solc0.8.13-ubuntu-20.04
auth:
username: $DOCKER_LOGIN
password: $DOCKER_PASSWORD
Expand All @@ -58,19 +58,19 @@ executors:
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT
darwin-executor: # this executor is for packaging darwin binaries
working_directory: ~/go/src/github.com/klaytn/klaytn
working_directory: ~/go/src/github.com/kaiachain/kaia
macos:
xcode: 14.2.0
resource_class: macos.x86.medium.gen2
rpm-executor: # this executor is for packaging rpm binaries
working_directory: /go/src/github.com/klaytn/klaytn
working_directory: /go/src/github.com/kaiachain/kaia
docker:
- image: klaytn/circleci-rpmbuild:1.22.1-gcc7
- image: kaiachain/circleci-rpmbuild:1.22.1-gcc7
auth:
username: $DOCKER_LOGIN
password: $DOCKER_PASSWORD
default:
working_directory: ~/go/src/github.com/klaytn/klaytn
working_directory: ~/go/src/github.com/kaiachain/kaia
docker:
- image: cimg/go:1.22.1

Expand Down Expand Up @@ -107,7 +107,7 @@ commands:
else
echo "this is not RC version"
fi
echo "export KLAYTN_VERSION=$(go run build/rpm/main.go version)" >> $BASH_ENV
echo "export KAIA_VERSION=$(go run build/rpm/main.go version)" >> $BASH_ENV
build-packaging:
description: "Build for each OS/Network"
parameters:
Expand Down Expand Up @@ -139,8 +139,8 @@ commands:
command: |
export GOPATH=~/go
export PATH=$HOME/go1.22.1/go/bin:$PATH
KLAYTN_VERSION=$(go run build/rpm/main.go version)
for item in << parameters.item >>; do aws s3 cp packages/${item}-*.tar.gz s3://$FRONTEND_BUCKET/packages/klaytn/$KLAYTN_VERSION/; done
KAIA_VERSION=$(go run build/rpm/main.go version)
for item in << parameters.item >>; do aws s3 cp packages/${item}-*.tar.gz s3://$FRONTEND_BUCKET/packages/kaia/$KAIA_VERSION/; done
rpm-tagging:
description: "rpm tagging for cypress"
steps:
Expand All @@ -154,12 +154,12 @@ commands:
name: "upload S3 repo"
command: |
PLATFORM_SUFFIX=$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m)
KLAYTN_VERSION=$(go run build/rpm/main.go version)
KAIA_VERSION=$(go run build/rpm/main.go version)
for item in kcn kpn ken kscn kspn ksen kbn kgen homi; do
TARGET_RPM=$(find $item-linux-x86_64/rpmbuild/RPMS/x86_64/ | awk -v pat="$item(d)?-v" '$0~pat')
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/rhel/7/prod/
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/klaytn/$KLAYTN_VERSION/
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/kaia/$KAIA_VERSION/
done
rpm-tagging-baobab:
description: "rpm tagging for baobab"
Expand All @@ -176,7 +176,7 @@ commands:
for item in kcn kpn ken; do
TARGET_RPM=$(find $item-linux-x86_64/rpmbuild/RPMS/x86_64/ | awk -v pat="$item(d)?-baobab-v" '$0~pat')
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/rhel/7/prod/
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/klaytn/$KLAYTN_VERSION/
aws s3 cp $TARGET_RPM s3://$FRONTEND_BUCKET/packages/kaia/$KAIA_VERSION/
done
createrepo-update:
steps:
Expand All @@ -192,9 +192,9 @@ commands:
name: "Verify tag and file version match"
command: |
echo "tag version is " $CIRCLE_TAG
KLAYTN_VERSION=$(go run build/rpm/main.go version)
echo "version on version.go" $KLAYTN_VERSION
if [ $KLAYTN_VERSION == ${CIRCLE_TAG%-*} ]; then
KAIA_VERSION=$(go run build/rpm/main.go version)
echo "version on version.go" $KAIA_VERSION
if [ $KAIA_VERSION == ${CIRCLE_TAG%-*} ]; then
echo "verification pass"
else
echo "It's not same version."
Expand All @@ -206,10 +206,10 @@ commands:
name: "Verify tag and file version match"
command: |
TAGGER=$(git for-each-ref --format='%(tagger)' refs/tags/$CIRCLE_TAG | sed 's/ .*//')
if [ $TAGGER == 'circleci-klaytn' ]; then
echo "Pass! Tagger is circleci-klaytn"
if [ $TAGGER == 'circleci-kaia' ]; then
echo "Pass! Tagger is circleci-kaia"
else
echo "only circleci-klaytn can tagging major version"
echo "only circleci-kaia can tagging major version"
exit 1
fi
make-pr:
Expand All @@ -230,14 +230,14 @@ commands:
- run:
name: "Create pull request"
command: |
version=$(hub pr list -s open -L 10 -f "%H%n")
echo $version
if [[ $version == *"release/${CIRCLE_TAG%-*}"* ]]; then
echo "PR already exist"
else
echo "hub pull-request -m "[Master] release/$CIRCLE_TAG QA Signoff" -b $CIRCLE_PROJECT_USERNAME:master -h $CIRCLE_PROJECT_USERNAME:${CIRCLE_TAG%-*}"
echo -e "[Master] release/${CIRCLE_TAG%-*} QA Sign-off\n\nThis PR is automatically created by CI to release a new official version of $CIRCLE_PROJECT_REPONAME.\n\nWhen this PR is approved by QA team, a new version will be released." | hub pull-request -b $CIRCLE_PROJECT_USERNAME:master -h $CIRCLE_PROJECT_USERNAME:release/${CIRCLE_TAG%-*} -r $GITHUB_reviewer -l circleci -F-
fi
version=$(hub pr list -s open -L 10 -f "%H%n")
echo $version
if [[ $version == *"release/${CIRCLE_TAG%-*}"* ]]; then
echo "PR already exist"
else
echo "hub pull-request -m "[Main] release/$CIRCLE_TAG QA Signoff" -b $CIRCLE_PROJECT_USERNAME:master -h $CIRCLE_PROJECT_USERNAME:${CIRCLE_TAG%-*}"
echo -e "[Main] release/${CIRCLE_TAG%-*} QA Sign-off\n\nThis PR is automatically created by CI to release a new official version of $CIRCLE_PROJECT_REPONAME.\n\nWhen this PR is approved by QA team, a new version will be released." | hub pull-request -b $CIRCLE_PROJECT_USERNAME:main -h $CIRCLE_PROJECT_USERNAME:release/${CIRCLE_TAG%-*} -r $GITHUB_reviewer -l circleci -F-
fi
- run:
name: "build announce"
command: .circleci/scripts/build_announce.sh
Expand All @@ -249,7 +249,7 @@ commands:
export version=$(go run build/rpm/main.go version) >> $BASH_ENV
echo "git tag $version"
git config --global user.email "[email protected]"
git config --global user.name "circleci-klaytn"
git config --global user.name "circleci-kaia"
git tag -a $version -m "$CIRCLE_STAGE"
git push origin $version
- run:
Expand Down Expand Up @@ -600,7 +600,7 @@ workflows:
requires:
- pass-tests
extra_build_args: '--platform=linux/amd64'
image: klaytn/klaytn
image: kaiachain/kaia
tag: dev
executor: docker/docker
use-remote-docker: true
Expand All @@ -616,7 +616,7 @@ workflows:
requires:
- pass-tests
extra_build_args: '--platform=linux/amd64'
image: klaytn/klaytn
image: kaiachain/kaia
tag: latest,$CIRCLE_TAG
executor: docker/docker
use-remote-docker: true
Expand Down Expand Up @@ -682,7 +682,7 @@ workflows:
- major-tagging:
filters:
branches:
only: master
only: main

nightly-coverage:
triggers:
Expand Down Expand Up @@ -712,4 +712,4 @@ workflows:
branches:
only: dev
jobs:
- rpc-tester-report
- rpc-tester-report
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Please put an x in the boxes related to your change.

*Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.*

- [ ] I have read the [CONTRIBUTING GUIDELINES](https://github.com/klaytn/klaytn/blob/master/CONTRIBUTING.md) doc
- [ ] I have signed the [CLA](https://cla-assistant.io/klaytn/klaytn)
- [ ] I have read the [ ] I have read the [CONTRIBUTING GUIDELINES](https://github.com/kaiachain/kaia/blob/main/CONTRIBUTING.md) doc
- [ ] I have read the [CLA](https://gist.github.com/kaiachain-dev/bbf65cc330275c057463c4c94ce787a6) and signed by comment ```I have read the CLA Document and I hereby sign the CLA``` in first time contribute
- [ ] Lint and unit tests pass locally with my changes (`$ make test`)
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation (if appropriate)
Expand Down
6 changes: 3 additions & 3 deletions .github/worflows/CLA.yml → .github/workflows/CLA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_PERSONAL_ACCESS_TOKEN }}
with:
path-to-signatures: "${{ github.event.repository.name }}/signatures/version1/cla.json"
path-to-document: "https://gist.github.com/e78f99e1c527225637e269cff1bc7e49" # Klaytn Gist
branch: "master"
allowlist: dependabot[bot], KlaytnDev, circleci-klaytn
path-to-document: "https://gist.github.com/kaiachain-dev/bbf65cc330275c057463c4c94ce787a6" # Kaia Gist
branch: "main"
allowlist: dependabot[bot], KaiaDev, circleci-kaia
remote-repository-name: ${{ secrets.CLA_REPOSITORY }}
2 changes: 1 addition & 1 deletion .github/workflows/CodeQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Code Scanning - Action"

on:
pull_request:
branches: [dev, master]
branches: [dev, main]
types: [opened, synchronize]

jobs:
Expand Down
65 changes: 24 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)
# Kaia

# NO LONGER MAINTAINED

Since the launch of Kaia Blockchain this repository has been parked in favour of the new open-source projects in [Kaia's Github](https://github.com/kaiachain). Contributors have now moved there continuing with massive open-source contributions to our blockchain ecosystem. A big thank you to everyone who has contributed to this repository. For more information about Klaytn's chain merge with Finschia blockchain please refer to the launching of Kaia blockchain - [kaia.io](https://kaia.io/).

---

[![Go Report Card](https://goreportcard.com/badge/github.com/klaytn/klaytn)](https://goreportcard.com/report/github.com/klaytn/klaytn)
[![CircleCI](https://circleci.com/gh/klaytn/klaytn/tree/dev.svg?style=svg)](https://circleci.com/gh/klaytn/klaytn/tree/dev)
[![codecov](https://codecov.io/gh/klaytn/klaytn/branch/dev/graph/badge.svg)](https://codecov.io/gh/klaytn/klaytn)
[![GoDoc](https://godoc.org/github.com/klaytn/klaytn?status.svg)](https://pkg.go.dev/github.com/klaytn/klaytn)
[![Gitter](https://badges.gitter.im/klaytn/Lobby.svg)](https://gitter.im/klaytn/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

# Klaytn

Official golang implementation of the Klaytn protocol. Please visit [KlaytnDocs](https://docs.klaytn.foundation/) for more details on Klaytn design, node operation guides and application development resources.
Official golang implementation of the Kaia blockchain. Please visit our [Docs](https://docs.kaia.io/) for more details on Kaia design, node operation guides and application development resources.

## Building from Sources

Building the Klaytn node binaries as well as utility tools, such as `kcn`, `kpn`, `ken`, `kbn`, `kscn`, `kspn`, `ksen`, `kgen`, `homi` and `abigen` requires
both a Go (version 1.14.1 or later) and a C compiler. You can install them using
your favorite package manager.
Once the dependencies are installed, run
Building the Kaia node binaries as well as utility tools, such as `kcn`, `kpn`, `ken`, `kbn`, `kscn`, `kspn`, `ksen`, `kgen`, `homi` and `abigen` requires
both a Go and a C compiler. You can install them using your favorite package manager. Once the dependencies are installed, run

make all (or make {kcn, kpn, ken, kbn, kscn, kspn, ksen, kgen, homi, abigen})

Expand All @@ -31,49 +15,48 @@ After successful build, executable binaries are installed at `build/bin/`.

| Command | Description |
|:----------:|-------------|
| `kcn` | The CLI client for Klaytn Consensus Node. Run `kcn --help` for command-line flags. |
| `kpn` | The CLI client for Klaytn Proxy Node. Run `kpn --help` for command-line flags. |
| `ken` | The CLI client for Klaytn Endpoint Node, which is the entry point into the Klaytn network (main-, test- or private net). It can be used by other processes as a gateway into the Klaytn network via JSON RPC endpoints exposed on top of HTTP, WebSocket, gRPC, and/or IPC transports. Run `ken --help` for command-line flags. |
| `kscn` | The CLI client for Klaytn ServiceChain Consensus Node. Run `kscn --help` for command-line flags. |
| `kspn` | The CLI client for Klaytn ServiceChain Proxy Node. Run `kspn --help` for command-line flags. |
| `ksen` | The CLI client for Klaytn ServiceChain Endpoint Node. Run `ksen --help` for command-line flags. |
| `kbn` | The CLI client for Klaytn Bootnode. Run `kbn --help` for command-line flags. |
| `kgen` | The CLI client for Klaytn Nodekey Generation Tool. Run `kgen --help` for command-line flags. |
| `homi` | The CLI client for Klaytn Helper Tool to generate initialization files. Run `homi --help` for command-line flags. |
| `abigen` | Source code generator to convert Klaytn contract definitions into easy to use, compile-time type-safe Go packages. |
| `kcn` | The CLI client for Kaia Consensus Node. Run `kcn --help` for command-line flags. |
| `kpn` | The CLI client for Kaia Proxy Node. Run `kpn --help` for command-line flags. |
| `ken` | The CLI client for Kaia Endpoint Node, which is the entry point into the Kaia network (main-, test- or private net). It can be used by other processes as a gateway into the Kaia network via JSON RPC endpoints exposed on top of HTTP, WebSocket, gRPC, and/or IPC transports. Run `ken --help` for command-line flags. |
| `kscn` | The CLI client for Kaia ServiceChain Consensus Node. Run `kscn --help` for command-line flags. |
| `kspn` | The CLI client for Kaia ServiceChain Proxy Node. Run `kspn --help` for command-line flags. |
| `ksen` | The CLI client for Kaia ServiceChain Endpoint Node. Run `ksen --help` for command-line flags. |
| `kbn` | The CLI client for Kaia Bootnode. Run `kbn --help` for command-line flags. |
| `kgen` | The CLI client for Kaia Nodekey Generation Tool. Run `kgen --help` for command-line flags. |
| `homi` | The CLI client for Kaia Helper Tool to generate initialization files. Run `homi --help` for command-line flags. |
| `abigen` | Source code generator to convert Kaia contract definitions into easy to use, compile-time type-safe Go packages. |

Both `kcn` and `ken` are capable of running as a full node (default) or an archive
node (retaining all historical state).

## Running a Core Cell

Core Cell (CC) is a set of one consensus node (CN) and one or more proxy nodes
(PNs). Core Cell plays a role of generating blocks in the Klaytn network. We recommend to visit
the [CC Operation Guide](https://docs.klaytn.foundation/docs/nodes/core-cell/)
(PNs). Core Cell plays a role of generating blocks in the Kaia network. We recommend to visit
the [CC Operation Guide](https://docs.kaia.io/docs/nodes/core-cell/)
for the details of CC bootstrapping process.

## Running an Endpoint Node

Endpoint Node (EN) is an entry point from the outside of the network in order to
interact with the Klaytn network. Currently, two official networks are available: Testnet and Mainnet (legacy names: Baobab and Cypress). Please visit the official
[EN Operation Guide](https://docs.klaytn.foundation/docs/nodes/endpoint-node/).
Endpoint Node (EN) is an entry point from the outside of the network in order to interact with the Kaia network. Currently, two official networks are available: Testnet and Mainnet (legacy names: Baobab and Cypress). Please visit the official
[EN Operation Guide](https://docs.kaia.io/docs/nodes/endpoint-node/).

## Running a Service Chain Node

Service chain node is a node for Service Chain which is an auxiliary blockchain independent from the main chain tailored for individual service requiring special node configurations, customized security levels, and scalability for high throughput services. Service Chain expands and augments Klaytn by providing a data integrity mechanism and supporting token transfers between different chains.
Although the service chain feature is under development, we provide the operation guide for testing purposes. Please visit the official document [Service Chain Operation Guide](https://docs.klaytn.foundation/docs/nodes/service-chain/).
Furthermore, for those who are interested in the Klaytn Service Chain, please check out [Klaytn - Scaling Solutions](https://docs.klaytn.foundation/docs/learn/scaling-solutions/).
Service chain node is a node for Service Chain which is an auxiliary blockchain independent from the main chain tailored for individual service requiring special node configurations, customized security levels, and scalability for high throughput services. Service Chain expands and augments Kaia by providing a data integrity mechanism and supporting token transfers between different chains.
Although the service chain feature is under development, we provide the operation guide for testing purposes. Please visit the official document [Service Chain Operation Guide](https://docs.kaia.io/docs/nodes/service-chain/).
Furthermore, for those who are interested in the Kaia Service Chain, please check out [Scaling Solutions](https://docs.kaia.io/docs/learn/scaling-solutions/).

## License

The Klaytn library (i.e. all code outside of the `cmd` directory) is licensed under the
The Kaia library (i.e. all code outside of the `cmd` directory) is licensed under the
[GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html), also
included in our repository in the `COPYING.LESSER` file.

The Klaytn binaries (i.e. all code inside of the `cmd` directory) is licensed under the
The Kaia binaries (i.e. all code inside of the `cmd` directory) is licensed under the
[GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), also included
in our repository in the `COPYING` file.

## Contributing

As an open source project, Klaytn always welcomes your contribution. Please read our [CONTRIBUTING.md](./CONTRIBUTING.md) for a walk-through of the contribution process.
As an open source project, Kaia always welcomes your contribution. Please read our [CONTRIBUTING.md](./CONTRIBUTING.md) for a walk-through of the contribution process.

0 comments on commit 1c2cc0e

Please sign in to comment.