jenkinsci / sumologic-publisher-plugin

Jenkins Plugin to send information to Sumo Logic.
https://plugins.jenkins.io/sumologic-publisher/
Apache License 2.0
5 stars 6 forks source link

Upgrade version of sumologic-publisher #2

Closed szymonm closed 5 years ago

szymonm commented 5 years ago

Hey,

this is the version we use internally at Sumo. How about merging and releasing it?

johncblandii commented 5 years ago

Is it possible we can get this in to beef up our config? We're working on Sumo+Jenkins at the moment.

szymonm commented 5 years ago

@johncblandii I didn't get any response for this PR for some time. We @ Sumo are currently using internally code from jenkinsfile-support-experimental branch in our repo https://github.com/SumoLogic/sumologic-jenkins-plugin/tree/jenkinsfile-support-experimental . You can build and install it manually. Let me know if I can help.

johncblandii commented 5 years ago

I'll check it out @szymonm.

johncblandii commented 5 years ago

@szymonm that branch doesn't build. The README says "just run mvn" but that fails with the following:

~/Downloads/sumologic-jenkins-plugin-jenkinsfile-support-experimental: mvn
[INFO] Scanning for projects...
[WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:2.0 is missing, no dependency information available
[WARNING] Failed to build parent project for org.jenkins-ci.plugins:sumologic-publisher:hpi:1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.737 s
[INFO] Finished at: 2019-03-29T05:33:34-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException

So I then tried: ~/Downloads/sumologic-jenkins-plugin-jenkinsfile-support-experimental: mvn clean package.

[INFO] Scanning for projects...
[WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:2.0 is missing, no dependency information available
[WARNING] Failed to build parent project for org.jenkins-ci.plugins:sumologic-publisher:hpi:1.0-SNAPSHOT
[INFO] 
[INFO] -------------< org.jenkins-ci.plugins:sumologic-publisher >-------------
[INFO] Building Sumologic Publisher 1.0-SNAPSHOT
[INFO] --------------------------------[ hpi ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ sumologic-publisher ---
[INFO] 
[INFO] --- maven-hpi-plugin:2.0:validate (default-validate) @ sumologic-publisher ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.2.jenkins-1:display-info (display-info) @ sumologic-publisher ---
[INFO] Maven Version: 3.6.0
[INFO] JDK Version: 9.0.4 normalized as: 9.0.4
[INFO] OS Info: Arch: x86_64 Family: mac Name: mac os x Version: 10.14.2
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.2.jenkins-1:enforce (display-info) @ sumologic-publisher ---
[INFO] Ignoring requireUpperBoundDeps in commons-logging:commons-logging
[INFO] Ignoring requireUpperBoundDeps in com.google.guava:guava
[INFO] 
[INFO] --- maven-localizer-plugin:1.24:generate (default) @ sumologic-publisher ---
[INFO] 
[INFO] >>> maven-javadoc-plugin:2.10.4:javadoc (default) > generate-sources @ sumologic-publisher >>>
[INFO] 
[INFO] --- maven-hpi-plugin:2.0:validate (default-validate) @ sumologic-publisher ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.2.jenkins-1:display-info (display-info) @ sumologic-publisher ---
[INFO] Maven Version: 3.6.0
[INFO] JDK Version: 9.0.4 normalized as: 9.0.4
[INFO] OS Info: Arch: x86_64 Family: mac Name: mac os x Version: 10.14.2
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.2.jenkins-1:enforce (display-info) @ sumologic-publisher ---
[INFO] Ignoring requireUpperBoundDeps in commons-logging:commons-logging
[INFO] Ignoring requireUpperBoundDeps in com.google.guava:guava
[INFO] 
[INFO] --- maven-localizer-plugin:1.24:generate (default) @ sumologic-publisher ---
[INFO] 
[INFO] <<< maven-javadoc-plugin:2.10.4:javadoc (default) < generate-sources @ sumologic-publisher <<<
[INFO] 
[INFO] 
[INFO] --- maven-javadoc-plugin:2.10.4:javadoc (default) @ sumologic-publisher ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ sumologic-publisher ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ sumologic-publisher ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 15 source files to /Users/john.bland/Downloads/sumologic-jenkins-plugin-jenkinsfile-support-experimental/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] java.nio.file.NoSuchFileException: /Users/john.bland/Downloads/sumologic-jenkins-plugin-jenkinsfile-support-experimental/target/classes/META-INF/annotations/hudson.Extension
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.576 s
[INFO] Finished at: 2019-03-29T05:35:25-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project sumologic-publisher: Compilation failure
[ERROR] java.nio.file.NoSuchFileException: /Users/john.bland/Downloads/sumologic-jenkins-plugin-jenkinsfile-support-experimental/target/classes/META-INF/annotations/hudson.Extension
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

I switched over to try master and it didn't work either. I'm going to assume it is me...not you (sumo). :)

Any insights?

szymonm commented 5 years ago

Not really... maybe issue with your Java version as suggested here: https://github.com/jenkinsci/configuration-as-code-plugin/issues/613

Also, we skip tests when building it mvn -Dmaven.test.skip=true package... because it's hard to get all this Jenkins maven plugins to work correctly...