Update Jenkins Build for Pantheon → Besu considerations (#1)

* Update ignores
* Update Jenkins
* Update configuration

Signed-off-by: Edward Evans <edward.evans@consensys.net>
pull/2/head
Edward 5 years ago committed by GitHub
parent d6a2394e2d
commit 0197f9f257
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .gitignore
  2. 19
      CLA.md
  3. 4
      CONTRIBUTING.md
  4. 9
      DCO.md
  5. 4
      GOVERNANCE.md
  6. 88
      Jenkinsfile
  7. 6
      besu/src/test/resources/everything_config.toml
  8. 6
      docker/.gitignore

2
.gitignore vendored

@ -27,4 +27,4 @@ build/
out/
site/
/kubernetes/reports/
/kubernetes/pantheon-*.tar.gz
/kubernetes/besu-*.tar.gz

@ -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

@ -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,7 +242,7 @@ 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/

@ -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

@ -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:

88
Jenkinsfile vendored

@ -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
)
}

@ -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

6
docker/.gitignore vendored

@ -1,4 +1,4 @@
pantheon-*.tar.gz
pantheon/*
pantheon-*
besu-*.tar.gz
besu/*
besu-*
reports/*
Loading…
Cancel
Save