Remove publishing steps from Jenkins Build (#182)

* Remove publishing steps from Jenkins Build

We are moving to CircleCI for our primary CI/CD solution

Signed-off-by: Edward Evans <edward.joshua.evans@gmail.com>

* Enable circle publishing

Signed-off-by: Edward Evans <edward.joshua.evans@gmail.com>
pull/193/head
Edward 5 years ago committed by GitHub
parent 3d867532de
commit 1b2cf2323d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 48
      .circleci/config.yml
  2. 86
      Jenkinsfile
  3. 2
      ethereum/referencetests/src/test/resources

@ -201,28 +201,28 @@ workflows:
- buildDocker:
requires:
- unitTests
# - publish:
# filters:
# branches:
# only:
# - master
#- /^release-.*/
# requires:
# - integrationTests
# - unitTests
# - acceptanceTests
# - referenceTests
# - buildDocker
# - publishDocker:
# filters:
# branches:
# only:
# - master
#- /^release-.*/
# requires:
# - integrationTests
# - unitTests
# - acceptanceTests
# - referenceTests
# - buildDocker
- publish:
filters:
branches:
only:
- master
- /^release-.*/
requires:
- integrationTests
- unitTests
- acceptanceTests
- referenceTests
- buildDocker
- publishDocker:
filters:
branches:
only:
- master
- /^release-.*/
requires:
- integrationTests
- unitTests
- acceptanceTests
- referenceTests
- buildDocker

86
Jenkinsfile vendored

@ -193,7 +193,7 @@ exit $status
}
}
parallel DockerImage: {
DockerImage: {
def stage_name = 'Docker image node: '
def docker_folder = 'docker'
def reports_folder = docker_folder + '/reports'
@ -229,94 +229,10 @@ exit $status
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()
def additionalTags = []
if (env.BRANCH_NAME == 'master') {
additionalTags.add('develop')
}
if (! isSnapshotVersion(version)) {
additionalTags.add('latest')
additionalTags.add(version.split(/\./)[0..1].join('.'))
}
additionalTags.each { tag ->
docker.image(image).push tag.trim()
}
}
}
}
}
}
}, BintrayPublish: {
def stage_name = "Publish distributions: "
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 + 'Calculate variables') {
def gradleProperties = readProperties file: 'gradle.properties'
version = gradleProperties.version
}
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) {
currentBuild.result = 'FAILURE'
} finally {
// If we're on master and it failed, notify slack
if (shouldPublish()) {
def currentResult = currentBuild.result ?: 'SUCCESS'
def channel = '#priv-pegasys-prod-dev'
if (currentResult == 'SUCCESS') {
def previousResult = currentBuild.previousBuild?.result
if (previousResult != null && (previousResult == 'FAILURE' || previousResult == 'UNSTABLE')) {
slackSend(
color: 'good',
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: "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: "Besu branch ${env.BRANCH_NAME} build is UNSTABLE.\nBuild Number: #${env.BUILD_NUMBER}\n${env.BUILD_URL}",
channel: channel
)
}
}
}

@ -1 +1 @@
Subproject commit 0327d9f76ce2a292a99e7a9dfc93627368ce589e
Subproject commit cfbcd15f91d4d6e1785d9cae5c5c37f47e8bad46
Loading…
Cancel
Save