No snapshots to bintray + fixup docs link in readme (#2)

* updating jenkinsfile to skip publishing snapshots to bintray
* updating docs link in readme

Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>
pull/3/head
Joshua Fernandes 5 years ago committed by GitHub
parent 0197f9f257
commit 1ff1b2f5d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 130
      Jenkinsfile
  2. 4
      README.md

130
Jenkinsfile vendored

@ -190,87 +190,99 @@ exit $status
}
parallel DockerImage: {
def stage_name = 'Docker image node: '
def docker_folder = 'docker'
def reports_folder = docker_folder + '/reports'
def dockerfile = docker_folder + '/Dockerfile'
def version = ''
def image = ''
node {
checkout scm
docker.image(build_image).inside() {
stage(stage_name + 'Dockerfile lint') {
sh "docker run --rm -i hadolint/hadolint < ${dockerfile}"
}
def stage_name = 'Docker image node: '
def docker_folder = 'docker'
def reports_folder = docker_folder + '/reports'
def dockerfile = docker_folder + '/Dockerfile'
def version = ''
def image = ''
node {
checkout scm
docker.image(build_image).inside() {
stage(stage_name + 'Dockerfile lint') {
sh "docker run --rm -i hadolint/hadolint < ${dockerfile}"
}
stage(stage_name + 'Build image') {
sh './gradlew distDocker'
}
stage(stage_name + 'Build image') {
sh './gradlew distDocker'
}
stage(stage_name + 'Calculate variables') {
def gradleProperties = readProperties file: 'gradle.properties'
version = gradleProperties.version
def imageRepos = 'hyperledger'
image = "${imageRepos}/besu:${version}"
}
stage(stage_name + 'Calculate variables') {
def gradleProperties = readProperties file: 'gradle.properties'
version = gradleProperties.version
def imageRepos = 'hyperledger'
image = "${imageRepos}/besu:${version}"
}
try {
stage(stage_name + 'Test image') {
sh "mkdir -p ${reports_folder}"
sh "cd ${docker_folder} && bash test.sh ${image}"
}
} finally {
archiveArtifacts "${reports_folder}/**"
junit "${reports_folder}/*.xml"
sh "rm -rf ${reports_folder}"
try {
stage(stage_name + 'Test image') {
sh "mkdir -p ${reports_folder}"
sh "cd ${docker_folder} && bash test.sh ${image}"
}
} finally {
archiveArtifacts "${reports_folder}/**"
junit "${reports_folder}/*.xml"
sh "rm -rf ${reports_folder}"
}
if (shouldPublish()) {
def registry = 'https://registry.hub.docker.com'
def userAccount = 'dockerhub-pegasysengci'
stage(stage_name + 'Push image') {
docker.withRegistry(registry, userAccount) {
docker.image(image).push()
if (shouldPublish()) {
def registry = 'https://registry.hub.docker.com'
def userAccount = 'dockerhub-pegasysengci'
stage(stage_name + 'Push image') {
docker.withRegistry(registry, userAccount) {
docker.image(image).push()
def additionalTags = []
if (env.BRANCH_NAME == 'master') {
additionalTags.add('develop')
}
def additionalTags = []
if (env.BRANCH_NAME == 'master') {
additionalTags.add('develop')
}
if (! version ==~ /.*-SNAPSHOT/) {
additionalTags.add('latest')
additionalTags.add(version.split(/\./)[0..1].join('.'))
}
if (! version ==~ /.*-SNAPSHOT/) {
additionalTags.add('latest')
additionalTags.add(version.split(/\./)[0..1].join('.'))
}
additionalTags.each { tag ->
docker.image(image).push tag.trim()
}
additionalTags.each { tag ->
docker.image(image).push tag.trim()
}
}
}
}
}
}, BintrayPublish: {
}
}, BintrayPublish: {
def stage_name = "Bintray publish node: "
def version = ''
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 + 'Calculate variables') {
def gradleProperties = readProperties file: 'gradle.properties'
version = gradleProperties.version
}
stage(stage_name + 'Publish') {
withCredentials([
usernamePassword(
credentialsId: 'pegasys-bintray',
usernameVariable: 'BINTRAY_USER',
passwordVariable: 'BINTRAY_KEY'
)
]) {
sh './gradlew --no-daemon --parallel bintrayUpload'
// we dont publish snapshots to bintray
if (! version ==~ /.*-SNAPSHOT/) {
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'
}
}
}
}
}

@ -1,6 +1,6 @@
# Besu Ethereum Client
[![Build Status](https://jenkins.pegasys.tech/job/Besu/job/master/badge/icon)](https://jenkins.pegasys.tech/job/Besu/job/master/)
[![Documentation Status](https://readthedocs.org/projects/hyperledger-besu/badge/?version=latest)](https://docs.besu.pegasys.tech/en/latest/?badge=latest)
[![Documentation Status](https://readthedocs.org/projects/hyperledger-besu/badge/?version=latest)](https://besu.hyperledger.org/en/latest/?badge=latest)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/PegasysEng/besu/blob/master/LICENSE)
[ ![Download](https://api.bintray.com/packages/hyperledger/besu-repo/besu/images/download.svg) ](https://bintray.com/hyperledger/besu-repo/besu/_latestVersion)
[![RocketChat chat](https://open.rocket.chat/images/join-chat.svg)](https://chat.hyperledger.org/channel/besu)
@ -17,7 +17,7 @@ If you've commented on existing issue and have been waiting for a reply, feel fr
## Besu Users
The process for installing and running Besu as a user is different to when developing. Some processes in our [user documentation](https://docs.besu.pegasys.tech/en/latest/) are different to those described in this Readme.
The process for installing and running Besu as a user is different to when developing. Some processes in our [user documentation](https://besu.hyperledger.org/en/latest/) are different to those described in this Readme.
## Besu Developers

Loading…
Cancel
Save