Same problem with
https://github.com/jenkinsci/literate-plugin/blob/master/src/main/java/org/cloudbees/literate/jenkins/ReadMeAction.java#L79
It's slightly off-topic, but it shows a portability pattern that could be
solved by core.
In my plugins, I use
class Util {
private PluginWrapper plugin;
public static String getImagesURL() {
if (plugin == null) {
plugin =
Jenkins.getInstance().getPluginManager().whichPlugin(Util.class);
}
return "/plugin/" + plugin.getShortName() + "/images";
}
}
to get portable path to access images. Maybe this could be generalized ?
Vincent
2013/9/25 Stephen Connolly <[email protected]>
> good catch!
> http://developer-blog.cloudbees.com/2013/09/a-brief-history-of-literate-builds.htmlhas
> the history of this plugin... which is where that bit of code came from
>
>
> On 25 September 2013 15:21, Larry Shatzer, Jr. <[email protected]> wrote:
>
>> I've not had a chance to work with the plugin yet, but did notice on a
>> freestyle job the "Export to literate-style" does not show the image
>> correctly. It is a broken image. The HTML for the image is as follows:
>>
>> <img height="24" style="margin: 2px;" alt="" width="24"
>> src="/static/70af5004/plugin/cloudbees-multibranch-plugin/images/24x24/literate-export.png">
>>
>> Looks like
>> https://github.com/jenkinsci/literate-plugin/blob/master/src/main/java/org/cloudbees/literate/jenkins/MigrateFreeStyleAction.java#L91
>> needs
>> to be updated.
>>
>> -- Larry
>>
>>
>>
>> On Fri, Sep 20, 2013 at 3:16 AM, Stephen Connolly <
>> [email protected]> wrote:
>>
>>> Ok!
>>>
>>> This is the first bit of noise about this. I'll be writing up a series
>>> of blog posts around this, but as I just got everything OSS I thought that
>>> some of the more adventurous amongst you may want to start playing with it
>>> now.
>>>
>>> To play with this you need to do the following:
>>>
>>> 1. Checkout and build (mvn install) the branch-api-plugin
>>> 2. Checkout and build (mvn package) the literate-plugin
>>> 3a. Checkout and build (mvn package) the git plugin (either the master
>>> or the refactoring branch... pick your poison)
>>> 3b. Checkout and build (mvn package) the subversion plugin (the
>>> refactoring branch)
>>> 3c. Checkout and build (mvn package) the mercurial plugin
>>>
>>> In your Jenkins 1.509+ install the three (or more) plugins that you have
>>> just built
>>>
>>> You should now be able to create literate multi-branch projects.
>>>
>>> To try it out.
>>>
>>> In your SCM system create a project. In the root of the project put the
>>> following two files:
>>>
>>> $ touch .cloudbees.md
>>> cat - > README.md <<EOF
>>> Hello World project
>>> ==============
>>>
>>> How to Build
>>> ------------------
>>>
>>> echo 'Hello world'
>>>
>>> EOF
>>>
>>> Checkin these two files. Create a literate multi-branch project with
>>> your project as a source. Trigger the indexing. You should see a
>>> sub-project for the main branch of the project.
>>>
>>> *NOW* go and fork your main branch into another branch.
>>>
>>> Trigger indexing again... oh look that branch has a project too.
>>>
>>> Have fun.
>>>
>>> The 10 best bug reports will be getting at least a T-shirt from
>>> CloudBees, but I am hoping to improve the swag that I can offer.
>>>
>>> -Stephen
>>>
>>> P.S. There will be an update centre that allows people to pull this
>>> without building themselves... and there will be a blog post later today
>>> detailing more of the fun you can do!
>>>
>>> P.P.S. The aim is to have enough people test this that it can be
>>> considered GA ready for JUC in late Oct 2013
>>>
>>> P.P.P.S. Many thanks to my employers (CloudBees) for funding the
>>> development of this fully open source (MIT license) feature for Jenkins...
>>> the only "cost" is that the default marker file is called .cloudbees.md!
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.