Release pipeline (#45)

* Release plugin and rework of the Bintray plugin in Gradle, in-code ignoring tests that were being ignored at runtime on the CI.
CJ Hare 6 years ago committed by GitHub
parent f0c185eb73
commit 6ab32903ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Jenkinsfile
  2. 2
      acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/CreateAccountAcceptanceTest.java
  3. 2
      acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/RpcApisTogglesAcceptanceTest.java
  4. 2
      acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/mining/MiningAcceptanceTest.java
  5. 2
      acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/pubsub/NewPendingTransactionAcceptanceTest.java
  6. 2
      acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/web3j/EventEmitterAcceptanceTest.java
  7. 114
      build.gradle
  8. 1
      gradle.properties

2
Jenkinsfile vendored

@ -42,7 +42,7 @@ node {
sh './gradlew --no-daemon --parallel integrationTest'
}
stage('Acceptance Tests') {
sh './gradlew --no-daemon --parallel acceptanceTest --tests Web3Sha3AcceptanceTest --tests PantheonClusterAcceptanceTest --tests MiningAcceptanceTest'
sh './gradlew --no-daemon --parallel acceptanceTest'
}
stage('Check Licenses') {
sh './gradlew --no-daemon --parallel checkLicenses'

@ -9,8 +9,10 @@ import tech.pegasys.pantheon.tests.acceptance.dsl.account.Account;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNode;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@Ignore
public class CreateAccountAcceptanceTest extends AcceptanceTestBase {
private PantheonNode minerNode;

@ -11,10 +11,12 @@ import tech.pegasys.pantheon.tests.acceptance.dsl.AcceptanceTestBase;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNode;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.exceptions.ClientConnectionException;
@Ignore
public class RpcApisTogglesAcceptanceTest extends AcceptanceTestBase {
private PantheonNode rpcEnabledNode;

@ -8,8 +8,10 @@ import tech.pegasys.pantheon.tests.acceptance.dsl.account.Account;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNode;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@Ignore
public class MiningAcceptanceTest extends AcceptanceTestBase {
private PantheonNode minerNode;

@ -16,8 +16,10 @@ import java.math.BigInteger;
import io.vertx.core.Vertx;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@Ignore
public class NewPendingTransactionAcceptanceTest extends AcceptanceTestBase {
private Vertx vertx;

@ -13,6 +13,7 @@ import java.math.BigInteger;
import java.util.concurrent.atomic.AtomicBoolean;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.web3j.crypto.Credentials;
import org.web3j.protocol.core.methods.request.EthFilter;
@ -23,6 +24,7 @@ import rx.Observable;
* This class is based around the EventEmitter solidity contract
*
*/
@Ignore
public class EventEmitterAcceptanceTest extends AcceptanceTestBase {
public static final BigInteger DEFAULT_GAS_PRICE = BigInteger.valueOf(1000);

@ -7,11 +7,14 @@ plugins {
id 'com.github.hierynomus.license' version '0.14.0'
id 'net.ltgt.errorprone' version '0.6'
id 'me.champeau.gradle.jmh' version '0.4.5' apply false
id 'com.jfrog.bintray' version '1.7.3'
id 'com.jfrog.bintray' version '1.8.4'
id 'net.researchgate.release' version '2.6.0'
}
apply from: './versions.gradle'
group = 'tech.pegasys.pantheon'
defaultTasks 'build', 'checkLicenses', 'javadoc'
def buildAliases = ['dev': [
@ -47,15 +50,12 @@ def _strListCmdArg(name) {
return _strListCmdArg(name, null)
}
def baseVersion = '0.8.0'
project.version = baseVersion + '-SNAPSHOT'
allprojects {
apply plugin: 'java-library'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'jacoco'
apply plugin: 'net.ltgt.errorprone'
apply plugin: 'com.jfrog.bintray'
apply from: "${rootDir}/gradle/versions.gradle"
apply from: "${rootDir}/gradle/check-licenses.gradle"
@ -177,9 +177,6 @@ allprojects {
task deploy() {}
subprojects {
tasks.withType(Test) {
@ -231,7 +228,7 @@ subprojects {
task integrationTest(type: Test, dependsOn:["compileTestJava"]){
group = "verification"
description = "Runs the Pantheon Integration Test"
description = "Runs the Pantheon integration tests"
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
@ -259,41 +256,6 @@ subprojects {
dependencies { jmh 'org.apache.logging.log4j:log4j-api' }
}
afterEvaluate {
if (project.jar.enabled) {
publishing {
publications {
MavenDeployment(MavenPublication) {
from components.java
groupId 'tech.pegasys.pantheon'
artifactId project.jar.baseName
version project.version
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['MavenDeployment']
pkg {
repo = rootProject.name.toLowerCase()
name = rootProject.name.capitalize()
userOrg = 'consensys'
licenses = ['Apache-2.0']
version {
name = project.version
desc = rootProject.name.capitalize() + ' distribution'
released = new Date()
vcsTag = project.version
}
}
}
deploy.dependsOn bintrayUpload
}
}
}
jar { enabled = false }
@ -403,3 +365,69 @@ configure(subprojects.findAll {it.name != 'errorprone-checks'}) {
if (!file("ethereum/referencetests/src/test/resources/README.md").exists()) {
throw new GradleException("ethereum/referencetests/src/test/resources/README.md missing: please clone submodules (git submodule update --init --recursive)")
}
apply plugin: 'net.researchgate.release'
task releaseIntegrationTest(type: Test){
for(TaskContainer taskList : subprojects.tasks){
def subProjectIntegrationTask = taskList.findByName('integrationTest')
if (subProjectIntegrationTask != null) {
dependsOn subProjectIntegrationTask
}
}
}
task releaseReferenceTest(type: Test, dependsOn : ':ethereum:core:referenceTests'){
}
task releaseAcceptanceTest(type: Test, dependsOn : ':acceptance-tests:acceptanceTest') {}
release {
preTagCommitMessage = '[Gradle Release Plugin] - pre tag commit: '
tagCommitMessage = '[Gradle Release Plugin] - creating tag: '
newVersionCommitMessage = '[Gradle Release Plugin] - new version commit: '
tagTemplate = '${version}'
versionPropertyFile = 'gradle.properties'
buildTasks = [
'build',
'releaseIntegrationTest',
'releaseAcceptanceTest',
'releaseReferenceTest',
'checkLicenses',
'javadoc'
]
git {
requireBranch = 'release-pipeline'
pushToRemote = 'origin'
}
}
apply plugin: 'com.jfrog.bintray'
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_KEY')
filesSpec {
from distTar.destinationDir.path
from distZip.destinationDir.path
into '.'
}
pkg {
repo = "pegasys-repo"
name = "pantheon"
userOrg = "consensys"
licenses = ["Apache-2.0"]
vcsUrl = "https://github.com/PegaSysEng/pantheon"
version {
name = project.version
released = new Date()
}
}
}
afterReleaseBuild.dependsOn bintrayUpload
bintrayUpload.mustRunAfter(distTar)
bintrayUpload.mustRunAfter(distZip)

@ -1 +1,2 @@
org.gradle.jvmargs=-Xmx1g
version=0.0.8-SNAPSHOT

Loading…
Cancel
Save