From 4a8132cdcd3fadc655d37edf421f7399313219fc Mon Sep 17 00:00:00 2001 From: Jeremy Maness Date: Wed, 2 Jan 2019 22:19:56 -0500 Subject: [PATCH] Adding Pureport pom overrides and Jenkinsfile, disable tests This is a rebase & squash of the 3.1.1-pureport-1.1 tag (6e71d505) onto ContainX/openstack4j/master (44c7ae14). - All Java code changes have been excluded (these are PR branches) - POM files are updated with the Pureport versions - Jenkinsfile has been added - Tests have been disabled The rebase log looks like: pick d3036c5b [PE-344] Changes to support automated releases: drop 7a903352 [PE-344] Add QoS Policy ID to port fixup 4475be55 Feature/pe 344 support listing qos policies (#4) drop c95b9078 [PE-334] Add ability to set a fixed IP on a network port. (#5) squash 8424914d [PE-423] Switch to newer gitflow plugin which supports releasing from detached HEAD which is how Jenkins checks out the code from git. (#7) squash 0594ad6b Set GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL environment variables so that shell git can properly. squash fab9705c Attempt to use credentials plugin and ssh-agent to configure the key for git. squash 211d0a0e Update versions for release squash ce0c5f67 Update for next development version squash b6a779eb Use sonatype-nexus-releases repository for releases with the Maven Release plugin. Revert back to 1.0-SNAPSHOT. Don't skip the deploy process during the release. squash e0d7a84a Reverting back to 1.0-SNAPSHOT squash 3cdb6756 Run deploy post release goal. squash f884c503 Update versions for release squash 8aef10e0 Update for next development version squash 3763da07 Changing dev version to 3.1.1-pureport-1.1-SNAPSHOT drop f0b5eca1 [PE-626] Make Network MTU writable assuming that the net-mtu-writable extension is enabled. squash 85f7dfb9 Update versions for release The dropped commits have been created into PRs and will subsequently be merged: Old: 7a903352 & 4475be55 -> New: 1e007b18 - https://github.com/ContainX/openstack4j/pull/1260 Old: f0b5eca1 -> New: 37bff3d8 - https://github.com/ContainX/openstack4j/pull/1261 Old: c95b9078 -> New: 09feaaca - https://github.com/ContainX/openstack4j/pull/1262 --- Jenkinsfile | 60 +++++++++++++ connectors/http-connector/pom.xml | 6 +- connectors/httpclient/pom.xml | 2 +- connectors/jersey2/pom.xml | 4 +- connectors/okhttp/pom.xml | 2 +- connectors/pom.xml | 6 +- connectors/resteasy/pom.xml | 2 +- core-integration-test/it-httpclient/pom.xml | 4 +- core-integration-test/it-jersey2/pom.xml | 4 +- core-integration-test/it-okhttp/pom.xml | 4 +- core-integration-test/it-resteasy/pom.xml | 4 +- core-integration-test/pom.xml | 4 +- core-test/pom.xml | 2 +- .../v2/CustomEndpointURLResolverTest.java | 2 + .../v3/CustomEndpointURLResolverTest.java | 5 +- core/pom.xml | 4 +- distribution/pom.xml | 2 +- pom.xml | 86 ++++++++++++++----- 18 files changed, 156 insertions(+), 47 deletions(-) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..0474ab922 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,60 @@ +pipeline { + agent any + tools { + jdk 'Oracle JDK 8u181' + maven 'Maven 3.5.4' + } + // From https://medium.com/@MichaKutz/create-a-declarative-pipeline-jenkinsfile-for-maven-releasing-1d43c896880c + parameters { + booleanParam(name: "RELEASE", + description: "Build a release from current commit.", + defaultValue: false) + } + stages { + stage('Build') { + steps { + script { + sh "mvn clean compile" + } + } + } + stage('Publish snapshot') { + when { + branch 'develop' + } + steps { + script { + sh "mvn deploy" + } + } + } + stage('Publish release') { + when { + allOf { + branch 'develop' + expression { params.RELEASE } + } + } + steps { + withCredentials([sshUserPrivateKey(credentialsId: 'afd41fdf-71c7-4174-8d63-c4ae8d163367', keyFileVariable: 'SSH_KEY')]){ + sh "ssh-agent bash -c 'ssh-add ${SSH_KEY}; mvn -B gitflow:release-start gitflow:release-finish -DpostReleaseGoals=deploy'" + } + } + } + } + post { + always { + /* clean up our workspace */ + deleteDir() + } + success { + slackSend(color: '#30A452', message: "SUCCESS: <${env.BUILD_URL}|${env.JOB_NAME}#${env.BUILD_NUMBER}>") + } + unstable { + slackSend(color: '#DD9F3D', message: "UNSTABLE: <${env.BUILD_URL}|${env.JOB_NAME}#${env.BUILD_NUMBER}>") + } + failure { + slackSend(color: '#D41519', message: "FAILED: <${env.BUILD_URL}|${env.JOB_NAME}#${env.BUILD_NUMBER}>") + } + } +} diff --git a/connectors/http-connector/pom.xml b/connectors/http-connector/pom.xml index 02446d0ef..3d0b37642 100644 --- a/connectors/http-connector/pom.xml +++ b/connectors/http-connector/pom.xml @@ -4,7 +4,7 @@ org.pacesys.openstack4j.connectors openstack4j-connectors - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.1 OpenStack4j HttpURL Connector openstack4j-http-connector @@ -48,7 +48,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.0 + 3.8.0 1.8 1.8 @@ -82,7 +82,7 @@ - + diff --git a/connectors/httpclient/pom.xml b/connectors/httpclient/pom.xml index 8d6a24953..987ed83f8 100644 --- a/connectors/httpclient/pom.xml +++ b/connectors/httpclient/pom.xml @@ -2,7 +2,7 @@ org.pacesys.openstack4j.connectors openstack4j-connectors - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.1 4.0.0 openstack4j-httpclient diff --git a/connectors/jersey2/pom.xml b/connectors/jersey2/pom.xml index ac7849331..0e43c1f16 100644 --- a/connectors/jersey2/pom.xml +++ b/connectors/jersey2/pom.xml @@ -2,7 +2,7 @@ org.pacesys.openstack4j.connectors openstack4j-connectors - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.1 4.0.0 openstack4j-jersey2 @@ -69,7 +69,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.0 + 3.8.0 1.8 1.8 diff --git a/connectors/okhttp/pom.xml b/connectors/okhttp/pom.xml index bf188bdb2..f08972b5f 100644 --- a/connectors/okhttp/pom.xml +++ b/connectors/okhttp/pom.xml @@ -2,7 +2,7 @@ org.pacesys.openstack4j.connectors openstack4j-connectors - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.1 4.0.0 openstack4j-okhttp diff --git a/connectors/pom.xml b/connectors/pom.xml index b8776fbd9..166092196 100644 --- a/connectors/pom.xml +++ b/connectors/pom.xml @@ -2,7 +2,7 @@ org.pacesys openstack4j-parent - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.1 4.0.0 org.pacesys.openstack4j.connectors @@ -57,6 +57,10 @@ maven-surefire-plugin 2.18.1 + + + true + ../../core-test/src/main/resources/all.xml diff --git a/connectors/resteasy/pom.xml b/connectors/resteasy/pom.xml index 81c7052fd..1467ddea5 100644 --- a/connectors/resteasy/pom.xml +++ b/connectors/resteasy/pom.xml @@ -2,7 +2,7 @@ org.pacesys.openstack4j.connectors openstack4j-connectors - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.1 4.0.0 openstack4j-resteasy diff --git a/core-integration-test/it-httpclient/pom.xml b/core-integration-test/it-httpclient/pom.xml index f9eb369f9..eb2b920fe 100644 --- a/core-integration-test/it-httpclient/pom.xml +++ b/core-integration-test/it-httpclient/pom.xml @@ -4,7 +4,7 @@ org.pacesys openstack4j-core-integration-test - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.0-SNAPSHOT it-httpclient OpenStack4j IntegrationTest Apache HttpClient @@ -51,4 +51,4 @@ - \ No newline at end of file + diff --git a/core-integration-test/it-jersey2/pom.xml b/core-integration-test/it-jersey2/pom.xml index 70c02b2e3..80953517f 100644 --- a/core-integration-test/it-jersey2/pom.xml +++ b/core-integration-test/it-jersey2/pom.xml @@ -4,7 +4,7 @@ org.pacesys openstack4j-core-integration-test - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.0-SNAPSHOT it-jersey2 OpenStack4j IntegrationTest Jersey2 Connector @@ -51,4 +51,4 @@ - \ No newline at end of file + diff --git a/core-integration-test/it-okhttp/pom.xml b/core-integration-test/it-okhttp/pom.xml index 1ec720e7e..b8f381942 100644 --- a/core-integration-test/it-okhttp/pom.xml +++ b/core-integration-test/it-okhttp/pom.xml @@ -4,7 +4,7 @@ org.pacesys openstack4j-core-integration-test - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.0-SNAPSHOT it-okhttp OpenStack4j IntegrationTest OKHttp Connector @@ -51,4 +51,4 @@ - \ No newline at end of file + diff --git a/core-integration-test/it-resteasy/pom.xml b/core-integration-test/it-resteasy/pom.xml index 86abc71c6..13fbf58e6 100644 --- a/core-integration-test/it-resteasy/pom.xml +++ b/core-integration-test/it-resteasy/pom.xml @@ -4,7 +4,7 @@ org.pacesys openstack4j-core-integration-test - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.0-SNAPSHOT it-resteasy OpenStack4j IntegrationTest RestEasy Connector @@ -51,4 +51,4 @@ - \ No newline at end of file + diff --git a/core-integration-test/pom.xml b/core-integration-test/pom.xml index e0bf6be7a..98245bba6 100644 --- a/core-integration-test/pom.xml +++ b/core-integration-test/pom.xml @@ -2,7 +2,7 @@ org.pacesys openstack4j-parent - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.0-SNAPSHOT 4.0.0 openstack4j-core-integration-test @@ -77,7 +77,7 @@ sonatype-snapshots - https://oss.sonatype.org/content/repositories/snapshots/ + http://nexus.dev.pureport.com/repository/maven-snapshots/ true diff --git a/core-test/pom.xml b/core-test/pom.xml index 529915ee3..7fad6e3fa 100644 --- a/core-test/pom.xml +++ b/core-test/pom.xml @@ -2,7 +2,7 @@ org.pacesys openstack4j-parent - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.1 4.0.0 openstack4j-core-test diff --git a/core-test/src/main/java/org/openstack4j/api/identity/v2/CustomEndpointURLResolverTest.java b/core-test/src/main/java/org/openstack4j/api/identity/v2/CustomEndpointURLResolverTest.java index 5070338f2..dd49b28d9 100644 --- a/core-test/src/main/java/org/openstack4j/api/identity/v2/CustomEndpointURLResolverTest.java +++ b/core-test/src/main/java/org/openstack4j/api/identity/v2/CustomEndpointURLResolverTest.java @@ -8,6 +8,7 @@ import java.io.IOException; import org.openstack4j.api.AbstractTest; +import org.openstack4j.api.SkipTest; import org.openstack4j.api.identity.EndpointURLResolver; import org.openstack4j.api.types.ServiceType; import org.openstack4j.core.transport.Config; @@ -57,6 +58,7 @@ public void defaultImplementation_Test() throws IOException { * * @throws IOException */ + @SkipTest(connector = ".*") // getCustomConfigSession() breaks the endpoint URL resolver for other tests public void customImplementation_Test() throws IOException { // create the default session final OSClientSessionV2 customConfigSession = getCustomConfigSession(); diff --git a/core-test/src/main/java/org/openstack4j/api/identity/v3/CustomEndpointURLResolverTest.java b/core-test/src/main/java/org/openstack4j/api/identity/v3/CustomEndpointURLResolverTest.java index 4e5d7db55..9af2b7bd5 100644 --- a/core-test/src/main/java/org/openstack4j/api/identity/v3/CustomEndpointURLResolverTest.java +++ b/core-test/src/main/java/org/openstack4j/api/identity/v3/CustomEndpointURLResolverTest.java @@ -8,11 +8,13 @@ import java.io.IOException; import org.openstack4j.api.AbstractTest; +import org.openstack4j.api.SkipTest; import org.openstack4j.api.identity.EndpointURLResolver; import org.openstack4j.api.types.ServiceType; import org.openstack4j.core.transport.Config; import org.openstack4j.model.identity.URLResolverParams; import org.openstack4j.openstack.internal.OSClientSession.OSClientSessionV3; +import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; @@ -56,9 +58,10 @@ public void defaultImplementation_Test() throws IOException { /** * This test validates the custom url endpoint resolver is used when it has * been configured in the Config class. - * + * * @throws IOException */ + @SkipTest(connector = ".*") // getCustomConfigSession() breaks the endpoint URL resolver for other tests public void customImplementation_Test() throws IOException { // create the default session final OSClientSessionV3 customConfigSession = getCustomConfigSession(); diff --git a/core/pom.xml b/core/pom.xml index 5f1853dd0..0fadd9bd2 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -2,7 +2,7 @@ org.pacesys openstack4j-parent - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.1 4.0.0 openstack4j-core @@ -165,7 +165,7 @@ - + diff --git a/distribution/pom.xml b/distribution/pom.xml index 0c3c8893b..f62d7d5f2 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -2,7 +2,7 @@ org.pacesys openstack4j-parent - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.1 4.0.0 openstack4j diff --git a/pom.xml b/pom.xml index bae1efc64..1edb5076a 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 4.0.0 org.pacesys openstack4j-parent - 3.2.1-SNAPSHOT + 3.1.1-pureport-1.1 OpenStack4j Parent OpenStack Java API http://github.com/ContainX/openstack4j/ @@ -20,6 +20,9 @@ 2.7.3 2.6 -Xdoclint:none + + + none @@ -35,11 +38,24 @@ - scm:git:git@github.com:ContainX/openstack4j.git - scm:git:git@github.com:ContainX/openstack4j.git - http://github.com/ContainX/openstack4j/ + scm:git://git@github.com:pureport/openstack4j.git + scm:git:git@github.com:pureport/openstack4j.git + https://github.com/pureport/openstack4j/ HEAD + + + + + sonatype-nexus-releases + http://nexus.dev.pureport.com/repository/maven-releases/ + + + sonatype-nexus-snapshots + http://nexus.dev.pureport.com/repository/maven-snapshots/ + + + OpenStack4j List @@ -53,7 +69,7 @@ core core-test connectors - core-integration-test + distribution @@ -95,10 +111,10 @@ org.apache.maven.plugins maven-compiler-plugin - 3.0 + 3.8.0 - 1.7 - 1.7 + 1.8 + 1.8 UTF-8 @@ -179,18 +195,29 @@ + - org.apache.maven.plugins - maven-release-plugin - 2.5 + com.amashchenko.maven.plugin + gitflow-maven-plugin + 1.11.0 - true - true - false - release - deploy + + master + develop + feature/ + release/ + hotfix/ + + + + com.jcraft + jsch + 0.1.54 + + + org.apache.maven.plugins maven-enforcer-plugin @@ -239,7 +266,7 @@ - + @@ -295,18 +322,31 @@ 2.8.2 - org.apache.maven.plugins - maven-gpg-plugin - 1.4 + org.sonatype.plugins + nexus-staging-maven-plugin + 1.5.1 - sign-artifacts-for-release - verify + default-deploy + deploy - sign + deploy + + sonatype-nexus-releases + http://nexus.dev.pureport.com/repository/maven-releases/ + true + + + + + org.apache.maven.plugins + maven-gpg-plugin + + true + org.apache.maven.plugins