diff --git a/.gitignore b/.gitignore index 8bee7c2777..624ca27a69 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,4 @@ build/ out/ site/ /kubernetes/reports/ -/kubernetes/pantheon-*.tar.gz +/kubernetes/besu-*.tar.gz diff --git a/CLA.md b/CLA.md deleted file mode 100644 index eb96a89f89..0000000000 --- a/CLA.md +++ /dev/null @@ -1,19 +0,0 @@ -Sign the CLA -============= - -This page is the step-by-step guide to signing the Consensys AG -Individual Contributor License Agreement. - -1. First and foremost, read [the current version of the CLA]. - It is written to be as close to plain English as possible. - -2. Make an account on [GitHub] if you don't already have one. - -3. After creating your first pull request, you will see a merge - pre-requisite requiring to you read and sign the CLA. - -If you have any questions, you can reach us on [RocketChat]. - -[RocketChat]: https://chat.hyperledger.org/channel/besu -[GitHub]: https://github.com/ -[the current version of the CLA]: https://gist.github.com/rojotek/978b48a5e8b68836856a8961d6887992 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb7b346ba1..20ab21368f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -196,7 +196,7 @@ The process described here has several goals: Please follow these steps to have your contribution considered by the approvers: -1. Complete the CLA, as described in [CLA.md]. +1. Ensure all commits have a Sign-off for DCO, as described in [DCO.md]. 2. Follow all instructions in [PULL-REQUEST-TEMPLATE.md](.github/pull_request_template.md). 3. Include appropriate test coverage. Testing is 100% automated. There is no such thing as a manual test. 4. Follow the [Style Guides](#style-guides). @@ -242,8 +242,8 @@ These are not strictly enforced during the build, but should be adhered to and c [private@pegasys.tech]: mailto:private@pegasys.tech [Rocketchat]: https://chat.hyperledger.org/channel/besu [Besu documentation]: https://besu.hyperledger.org/ -[CLA.md]: /CLA.md +[DCO.md]: ./DCO.md [Code Reviews]: /docs/community/code-reviews.md [MkDocs]: https://www.mkdocs.org/ [How to Write a Git Commit Message]: https://chris.beams.io/posts/git-commit/ -[Chris Beams]: https://github.com/cbeams \ No newline at end of file +[Chris Beams]: https://github.com/cbeams diff --git a/DCO.md b/DCO.md new file mode 100644 index 0000000000..a10deeec06 --- /dev/null +++ b/DCO.md @@ -0,0 +1,9 @@ +DCO +=== + +As per section 13.a of the [Hyperledger Charter](https://www.hyperledger.org/about/charter) all code submitted to the Hyperledger Foundation needs to have a [Developer Certificate of Origin](http://developercertificate.org/) (DCO) sign-off. + +The sign off needs to be using your legal name, not a pseudonym. Git has a built-in mechanism to allow this with the `-s` or `--signoff` argument to `git commit` command, providing your `user.name` and `user.email` have been setup correctly. + +If you have any questions, you can reach us on [Besu chat]. +[Besu chat]: https://chat.hyperledger.org/channel/besu diff --git a/GOVERNANCE.md b/GOVERNANCE.md index ca6b200bea..c91a54a133 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -21,9 +21,9 @@ See [community membership] Decision making will be handled by the Approvers (see [community membership]). If consensus cannot be reached, the Benevolent Dictator will provide the final word on the decision. -# CLA +# DCO -All contributors must sign the CLA, as described in [CLA.md]. +All contributors must send commits with sign-off to comply with [DCO](DCO.md) ## Attribution This document was influenced by the following: diff --git a/Jenkinsfile b/Jenkinsfile index 79d346b969..e31bbfb40d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,33 @@ if (!shouldPublish()) { try { timeout(time: 1, unit: 'HOURS') { - parallel UnitTests: { + parallel DCOCheck: { + def stage_name = "DCO tests node: " + node { + checkout scm + docker.image(build_image).inside() { + stage(stage_name + 'Check') { + sh '''#!/bin/bash +status=0 +while IFS= read -r -a line; do + my_array+=( "$line" ) + done < <( git branch -r | grep -v origin/HEAD ) +for branch in "${my_array[@]}" +do + branch=$(echo "$branch" | xargs) + echo "Checking commits in branch $branch for commits missing DCO..." + while read -r results; do + status=1 + commit_hash="$(echo "$results" | cut -d' ' -f1)" + >&2 echo "$commit_hash is missing Signed-off-by line." + done < <(git log "$branch" --no-merges --pretty="%H %ae" --grep 'Signed-off-by' --invert-grep -- ) +done +exit $status +''' + } + } + } + }, UnitTests: { def stage_name = "Unit tests node: " node { checkout scm @@ -73,7 +99,7 @@ try { archiveArtifacts 'build/reports/**' archiveArtifacts 'build/distributions/**' - stash allowEmpty: true, includes: 'build/distributions/pantheon-*.tar.gz', name: 'distTarBall' + stash allowEmpty: true, includes: 'build/distributions/besu-*.tar.gz', name: 'distTarBall' junit '**/build/test-results/**/*.xml' } @@ -224,32 +250,32 @@ try { } } } -// }, BintrayPublish: { -// def stage_name = "Bintray publish node: " -// node { -// if (shouldPublish()) { -// checkout scm -// -// docker.image(docker_image_dind).withRun('--privileged') { d -> -// docker.image(build_image).inside("--link ${d.id}:docker") { -// stage(stage_name + 'Prepare') { -// sh './gradlew --no-daemon --parallel clean assemble' -// } -// stage(stage_name + 'Publish') { -// withCredentials([ -// usernamePassword( -// credentialsId: 'pegasys-bintray', -// usernameVariable: 'BINTRAY_USER', -// passwordVariable: 'BINTRAY_KEY' -// ) -// ]) { -// sh './gradlew --no-daemon --parallel bintrayUpload' -// } -// } -// } -// } -// } -// } + }, BintrayPublish: { + def stage_name = "Bintray publish node: " + node { + if (shouldPublish()) { + checkout scm + + docker.image(docker_image_dind).withRun('--privileged') { d -> + docker.image(build_image).inside("--link ${d.id}:docker") { + stage(stage_name + 'Prepare') { + sh './gradlew --no-daemon --parallel clean assemble' + } + stage(stage_name + 'Publish') { + withCredentials([ + usernamePassword( + credentialsId: 'pegasys-bintray', + usernameVariable: 'BINTRAY_USER', + passwordVariable: 'BINTRAY_KEY' + ) + ]) { + sh './gradlew --no-daemon --parallel bintrayUpload' + } + } + } + } + } + } } } } catch (e) { @@ -264,20 +290,20 @@ try { if (previousResult != null && (previousResult == 'FAILURE' || previousResult == 'UNSTABLE')) { slackSend( color: 'good', - message: "Pantheon branch ${env.BRANCH_NAME} build is back to HEALTHY.\nBuild Number: #${env.BUILD_NUMBER}\n${env.BUILD_URL}", + message: "Besu branch ${env.BRANCH_NAME} build is back to HEALTHY.\nBuild Number: #${env.BUILD_NUMBER}\n${env.BUILD_URL}", channel: channel ) } } else if (currentBuild.result == 'FAILURE') { slackSend( color: 'danger', - message: "Pantheon branch ${env.BRANCH_NAME} build is FAILING.\nBuild Number: #${env.BUILD_NUMBER}\n${env.BUILD_URL}", + message: "Besu branch ${env.BRANCH_NAME} build is FAILING.\nBuild Number: #${env.BUILD_NUMBER}\n${env.BUILD_URL}", channel: channel ) } else if (currentBuild.result == 'UNSTABLE') { slackSend( color: 'warning', - message: "Pantheon branch ${env.BRANCH_NAME} build is UNSTABLE.\nBuild Number: #${env.BUILD_NUMBER}\n${env.BUILD_URL}", + message: "Besu branch ${env.BRANCH_NAME} build is UNSTABLE.\nBuild Number: #${env.BUILD_NUMBER}\n${env.BUILD_URL}", channel: channel ) } diff --git a/besu/src/test/resources/everything_config.toml b/besu/src/test/resources/everything_config.toml index bfef88e438..c5ffd7dd9f 100644 --- a/besu/src/test/resources/everything_config.toml +++ b/besu/src/test/resources/everything_config.toml @@ -2,14 +2,14 @@ # The odds are you are reading this because you added a CLI and didn't add it # here and a test broke. To fix the test add your CLI to this file. # -# Please use a plausible value, Pantheon has to at least be able to parse it. +# Please use a plausible value, Besu has to at least be able to parse it. # If it is a multi-valued CLI make it a TOML array. # If it is a number or boolean make it a number or boolean # All other config options are strings, and must be quoted. # Please provide some sensible grouping. # Node Information -data-path="~/pantheondata" +data-path="~/besudata" logging="INFO" node-private-key-file="./path/to/privateKey" @@ -73,7 +73,7 @@ metrics-push-enabled=false metrics-push-host="5.5.5.1" metrics-push-port=212 metrics-push-interval=42 -metrics-push-prometheus-job="pantheon-everything" +metrics-push-prometheus-job="besu-everything" # Mining miner-enabled=false @@ -108,4 +108,4 @@ Xincoming-tx-messages-keep-alive-seconds=60 revert-reason-enabled=false # Storage plugin to use -key-value-storage="rocksdb" \ No newline at end of file +key-value-storage="rocksdb" diff --git a/docker/.gitignore b/docker/.gitignore index 9bde4bb3cb..f66d61166c 100644 --- a/docker/.gitignore +++ b/docker/.gitignore @@ -1,4 +1,4 @@ -pantheon-*.tar.gz -pantheon/* -pantheon-* -reports/* \ No newline at end of file +besu-*.tar.gz +besu/* +besu-* +reports/*