Giter Club home page Giter Club logo

jenkins-master-project's Introduction

Jenkins Plugin: Master Project

This is a plugin for Jenkins Continuous Integration Server. This plugin provides a new project type. In this new project type you can select a list of sub-projects which should be executed in one logical master project.

Installation

Install Maven 2.2.1 or higher

cd ~/jenkins-master-project
mvn package
scp target/MasterProject.hpi [email protected]:/opt/jenkins/.jenkins/plugins/.

The last part is to place the hpi file into the plugins directory. You can also do this through the Jenkins interface if you do not have ssh access to the Jenkins server.

Contribute

You're interested in contributing to this Etsy-made Jenkins plugin?

Here are the basic steps:

fork jenkins-master-project

  1. Clone your fork
  2. Hack away
  3. If you are adding new functionality, document it in the Wiki or this README
  4. If necessary, rebase your commits into logical chunks, without errors
  5. Push the branch up to GitHub
  6. Send a pull request to the etsy/jenkins-master-project project

We'll do our best to get your changes in!

jenkins-master-project's People

Contributors

ghorvath avatar ivantsepp avatar jgedarovich avatar markroddy avatar mmercedes avatar russtaylor avatar yparghi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jenkins-master-project's Issues

Renaming a hidden sub-job of a master job, breaks the history for the master job

  1. add a job as a hidden sub-job of a master build
  2. trigger a couple of master builds
  3. rename the hidden sub-job and update the master build with the new name
  4. observe that all balls have now turned grey on the master project
  5. click through on a job with a grey ball and observe that the renamed sub-project is not displayed (a broken image is shown instead)

Display pending sub-jobs even if there aren't any slaved available

The Jenkins web interface only shows those sub-jobs which have started. This can lead to the situation where the web page lists the job as running even though it appears complete (due to the non-started sub-jobs not being listed). It would be easier to understand if these subjobs were listed with some status, like pending. Or something.

mvn package fail

[jollychang@WilliamMBP jenkins-master-project]$ mvn -X package
Apache Maven 3.0.3 (r1075438; 2011-03-01 01:31:09+0800)
Maven home: /usr/share/maven
Java version: 1.6.0_33, vendor: Apple Inc.
Java home: /Library/Java/JavaVirtualMachines/1.6.0_33-b03-424.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.8.3", arch: "x86_64", family: "mac"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /Users/jollychang/.m2/settings.xml
[DEBUG] Using local repository at /Users/jollychang/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for /Users/jollychang/.m2/repository
[INFO] Scanning for projects...
[WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:1.74 is missing, no dependency information available
[DEBUG] org.jenkins-ci.tools:maven-hpi-plugin:jar:1.74:
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:1.1:runtime
[DEBUG] Looking up lifecyle mappings for packaging hpi from ClassRealm[plexus.core, parent: null]
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.jenkins-ci.tools:maven-hpi-plugin:1.74 or one of its dependencies could not be resolved: Failure to find org.jenkins-ci.tools:maven-hpi-plugin:jar:1.74 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @
[ERROR] Unknown packaging: hpi @ line 13, column 14

    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:339)
    at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:632)
    at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:581)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:233)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[ERROR]
[ERROR]   The project com.etsy.jenkins:MasterProject:1.0-SNAPSHOT (/Volumes/Macintosh HD/Users/jollychang/Work/jenkins-master-project/pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.jenkins-ci.tools:maven-hpi-plugin:1.74 or one of its dependencies could not be resolved: Failure to find org.jenkins-ci.tools:maven-hpi-plugin:jar:1.74 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 2]
org.apache.maven.plugin.PluginResolutionException: Plugin org.jenkins-ci.tools:maven-hpi-plugin:1.74 or one of its dependencies could not be resolved: Failure to find org.jenkins-ci.tools:maven-hpi-plugin:jar:1.74 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:215)
    at org.apache.maven.project.DefaultProjectBuildingHelper.resolveExtensionArtifacts(DefaultProjectBuildingHelper.java:377)
    at org.apache.maven.project.DefaultProjectBuildingHelper.createProjectRealm(DefaultProjectBuildingHelper.java:237)
    at org.apache.maven.project.DefaultModelBuildingListener.buildExtensionsAssembled(DefaultModelBuildingListener.java:106)
    at org.apache.maven.model.building.ModelBuildingEventCatapult$1.fire(ModelBuildingEventCatapult.java:43)
    at org.apache.maven.model.building.DefaultModelBuilder.fireEvent(DefaultModelBuilder.java:1041)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:391)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:374)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:536)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:328)
    at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:632)
    at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:581)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:233)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failure to find org.jenkins-ci.tools:maven-hpi-plugin:jar:1.74 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:541)
    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220)
    at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:395)
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:207)
    ... 24 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to find org.jenkins-ci.tools:maven-hpi-plugin:jar:1.74 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
    at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:190)
    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430)
    ... 27 more
[ERROR]     Unknown packaging: hpi @ line 13, column 14
[ERROR]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

CI status indicators momentarily reflect failure when a Master Build starts to run

As indicated by the little red spike on the Web Test Status graph.

Also shows up as a momentary flash of "broken tests" on the CI build screen. Interestingly, does not affect the "time since last broken build" as reported by the build screen.

Thinking that, upon starting up, Master Builds must produce a non-standard (or uncommon) build state. Oh, actually I bet I know what it is: master builds have no status until all the sub-jobs started running.

Embeddable View of the Pipeline View

It should be possible to embed the Pipeline View into a dashboard, in the same way we can currently embed the CI status widget.

Make it possible to display only 1 line of the pipeline view
Craft some JS that inserts 1 line of the pipeline view into a div
add the new embed JS to the deploy and CI dashboards

Tests fail when packaging for Jenkins 1.478

Hi,

I am trying to build this plugin for Jenkins 1.478 (I think latest at the moment) and ran into trouble.

First of all, repository definition m.g.o-public was not working and returned 301 responses with HTML content to all requests by maven. Which maven willingly taken as XML and stored as plugin POM files. I dug around and found out that Jenkins is not hosted there anymore (at least I couldn't find it anywhere by browsing that repository url. I searched around and decided to try official Jenkins maven repository: repo.jenkins-ci.org and replaced repository definition in pom.xml:

<repositories>
  <repository>
      <snapshots>
          <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>public</name>
      <url>http://repo.jenkins-ci.org/public</url>
  </repository>
  <repository>
      <snapshots />
      <id>snapshots</id>
      <name>public</name>
      <url>http://repo.jenkins-ci.org/public</url>
  </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>public</name>
        <url>http://repo.jenkins-ci.org/public</url>
    </pluginRepository>
    <pluginRepository>
        <snapshots />
        <id>snapshots</id>
        <name>public</name>
        <url>http://repo.jenkins-ci.org/public</url>
    </pluginRepository>
</pluginRepositories>

This was provided by http://repo.jenkins-ci.org/webapp/mavensettings.html?2.

So from here all dependencies were found and classes were compiled, but tests started to fail. Test output:

[INFO] --- maven-surefire-plugin:2.9:test (default-test) @ MasterProject ---
[INFO] Surefire report directory: /Users/julius/Work/Projects/jenkins-master-project/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running InjectedTest
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.276 sec <<< FAILURE!

Results :

Tests in error: 
  org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite(org.jvnet.hudson.test.junit.FailedTest)
  testCliSanity(org.jvnet.hudson.test.PluginAutomaticTestBuilder$CliSanityTest): Could not initialize class org.sonatype.guice.bean.binders.ParameterKeys

Tests run: 2, Failures: 0, Errors: 2, Skipped: 0

Full output is on a gist here.

I desperately tried -DskipTests -Dmaven.test.skip=true with success - hpi was built, but I could not install it. And I am stuck here now.

If anyone could point me in the right direction on how to fix those tests I would be more than welcome to do a pull-request if I fix this later on.

When a sub-job is rebuilt, the ball on master build turns grey

Whenever a sub-job is rebuilt, the ball on the associated master build turns grey. This is confusing as a grey ball is generally associated with an aborted job.

Ideally the ball on the master build job would begin to flash, indicating that a sub-job is currently building.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.