From eb23bae7ef0910021dc0f0beda05d206f6189e6d Mon Sep 17 00:00:00 2001 From: Edward Evans Date: Mon, 16 Sep 2019 11:48:16 +1000 Subject: [PATCH 1/7] Use correct name for dist tarball Signed-off-by: Edward Evans --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 79d346b969e..f5ac61e18b0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -73,7 +73,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' } From a2f711a344d72f1210fe74c761a816ae6969c5cb Mon Sep 17 00:00:00 2001 From: Edward Evans Date: Mon, 16 Sep 2019 11:48:44 +1000 Subject: [PATCH 2/7] Re-enable bintray uploads Signed-off-by: Edward Evans --- Jenkinsfile | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f5ac61e18b0..de244138d5b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -224,32 +224,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) { From de27cf132a9e253422fccbb56fd6fcc2280a35b1 Mon Sep 17 00:00:00 2001 From: Edward Evans Date: Mon, 16 Sep 2019 11:49:06 +1000 Subject: [PATCH 3/7] Update messaging for Slack to use the new name Signed-off-by: Edward Evans --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index de244138d5b..eaab8a5612c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -264,20 +264,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 ) } From 38bc7cf20e96bf16c1ae2d1190c45e33ef7fe503 Mon Sep 17 00:00:00 2001 From: Edward Evans Date: Mon, 16 Sep 2019 11:49:18 +1000 Subject: [PATCH 4/7] Add a full DCO check to the Jenkins build Signed-off-by: Edward Evans --- Jenkinsfile | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index eaab8a5612c..e31bbfb40dc 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 From bab7d41381b9aebcb1c3818b94dbd01c15f89fb9 Mon Sep 17 00:00:00 2001 From: Edward Evans Date: Mon, 16 Sep 2019 11:56:12 +1000 Subject: [PATCH 5/7] Migrate from CLA to DCO Signed-off-by: Edward Evans --- CLA.md | 19 ------------------- CONTRIBUTING.md | 6 +++--- DCO.md | 9 +++++++++ GOVERNANCE.md | 4 ++-- 4 files changed, 14 insertions(+), 24 deletions(-) delete mode 100644 CLA.md create mode 100644 DCO.md diff --git a/CLA.md b/CLA.md deleted file mode 100644 index eb96a89f896..00000000000 --- 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 bb7b346ba14..20ab21368f0 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 00000000000..a10deeec06a --- /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 ca6b200bead..c91a54a1330 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: From 339f7aeedaf7625c8384b1287e66bf590121fae3 Mon Sep 17 00:00:00 2001 From: Edward Evans Date: Mon, 16 Sep 2019 12:06:58 +1000 Subject: [PATCH 6/7] Ignore besu artefacts, not pantheon ones Signed-off-by: Edward Evans --- .gitignore | 2 +- docker/.gitignore | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 8bee7c27776..624ca27a694 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/docker/.gitignore b/docker/.gitignore index 9bde4bb3cb7..f66d61166c1 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/* From a8965857d2cacbd92e9a094ebe6ac5fbb8ca5a9d Mon Sep 17 00:00:00 2001 From: Edward Evans Date: Mon, 16 Sep 2019 12:07:19 +1000 Subject: [PATCH 7/7] Update everything config for besu Signed-off-by: Edward Evans --- besu/src/test/resources/everything_config.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/besu/src/test/resources/everything_config.toml b/besu/src/test/resources/everything_config.toml index bfef88e4386..c5ffd7dd9fb 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"