Is there a generic Hudson reporter? - hudson

Our build has a variety of generated HTML reports. I would like to have those reported and accessible on the build page, like JavaDoc entries. Is there a generic way to expose these reports without writing a custom plug ins ?
If that isn't available, is there a way to post an HTTP link on the page ?

You can choose "archive the artifacts" and archive for example "reports/*.html"
These will appear under the project page under the heading "Last successful artifacts".
Even if you clear your workspace before each build, these artifacts are moved to a separate directory.
You could also add a build script which will modify or update a file in your userContent directory (since Hudson 1.299), and link to these build artifacts in yet another location.

Related

How to include software in PhpStorm project

I have just started using PhpStorm. In my project I am receiving a lot of undefined variable errors because I am creating a plugin for vBulletin.
I was wondering is there a way to include the main software I am working with in my plugin development, to avoid getting undefined vars, and functions? Kind of how the WordPress plugin development works.
For example I have my projects folder: c://wamp/www/projects/projectname/ and I have vBulletin in c://wamp/www/vb3/
I want to be able to tell PhpStorm "hey the core scripts to this project are here".
As LazyOne said I was able to achieve this using include paths.
Include paths are used for holding third-party code that is used for completion and reference resolution in some functions/methods that use file paths as arguments, for example, require() or include().
Note that the files added via include paths are not meant to be edited within the scope of your project. If you have the existing code that you need to access and modify from within several projects, consider adding it via an additional content root.
Do one of the following:
To configure the include paths for the current project, in the
Settings/Preferences dialog Ctrl+Alt+S, click PHP under Languages &
Frameworks.
To configure the include paths that will be applied to all newly
created projects, use the default new project settings (File | New
Projects Settings | Settings for New Projects ).
On the PHP page that opens, configure the list of include paths on the Include path tab:
Use Add and Remove to add and remove paths.
Use Move up and Move down to reorder the items in the list.
Click the Sort Alphabetically button to sort the paths alphabetically in the ascending order.

PhpStorm: multiple projects with common core

Due to security reasons, I have to split one project to divisions (client, admin, ...), and deploy them to different web servers. These divisions have one common script base, but each division has its own functions. As an IDE I use PhpStorm.
The question: what is the best way to organize project's structure and settings, so the common core part will be visible for IDE indexing in all project's divisions, but at the same time, being maintained from a single project (perhaps, standalone)?
In Java you can do lib jar files for further linking in various projects.
But how it can be done in PHP?
There are multiple ways of how to reference extra PHP code in a project.
If you plan to actively edit such extra code in the same project (and want to see their TODOs, code inspection warnings, include references in code refactoring etc):
You can just add it as an additional Content Root: Settings/Preferences | Directories. Folder added this way will be treated as a part of the project itself and will be shown as a separate node in the Project View panel (just as the main code, which is a Content Root as well).
Or you can open 2nd project while 1st one is already opened and when asked, just chose "Attach":
It's not going to be full 2 projects in one frame, more like something in between attaching Content Root and having 2 projects opened in separate frames.
https://www.jetbrains.com/help/phpstorm/opening-multiple-projects.html
Simple symlink will also do the job (but you need to place it somewhere in a project, e.g. PROJECT_ROOT/libs/my_symlinked_code). You then will need to provide a path mapping for that folder for debugger (if you will debug it of course) as PHP/Xdebug works with "final/resolved path" while IDE works with the path as is.
If you do not need to actively edit that extra code in the same window (and ignore any TODOs, code inspection warnings and other inspection results etc):
Do it as a composer package then? Composer can use custom sources (e.g. GitHub repo or a folder on a local filesystem).
Just add the path to that folder as a "Include Path" at Settings/Preferences | Languages & Frameworks | PHP --> Include Path tab. Code referenced this way is meant for 3rd party libraries (the code that you just use but not edit, e.g. framework code, your send mail/ORM library etc). Composer packages will also be included here by default.
https://www.jetbrains.com/help/phpstorm/php.html#include-path-tab

Release Pipeline to Deployment Group on prem

I think what I am looking to do is fairly simple - I just can't wrap my head around it.
I've got a repo in AzDo. This repo contains configuration files for firewalls. This is how we manage changes in these configurations.
I've got a simple build pipeline that copies the relevant files and creates an artifact.
I have a release pipeline that gets the files onto the on-prem machine in my Deployment Group. The files show up in c:\azagent\r1\_work\<artifact folder>.
As part of this pipeline I am looking to copy the files from c:\azagent\r1\_work\<artifact folder> to e:\shares\<artifact name>. This is the part that I cannot figure out how to make work.
What strategy could I use to put this together? I've looked into the documentation but it seems like this is somewhat of an edge case (not deploying an app or web site, etc). Ideally, I'd love to do this in a multi-stage YAML pipeline - but from what I've read, it appears as if these do not yet support Deployment Groups. So a classic pipeline is fine for now.
You can add a copy file task(Click the plus sign(+) on the agent job and search for copy files) in your release pipeline to copy the files to a different place on your local machine.
Then you can specify the source folder(ie. $(System.DefaultWorkingDirectory)), and the contents to copy and the target folder(ie. e:\shares\). In below example all contents in $(System.DefaultWorkingDirectory)(ie. C:\agent\_work\r1\a) will be copied to folder D:\Test\New folder
Please check the prefined variables for more information about its map to the local folders.

How do you reopen messages.json in Sublime Text (3)?

I read packagecontrol.io's doc
regarding messages.json, but what I'm referring to is the file tab that sublime text typically displays upon a new package install. It appears as a continuous roll of installation notes throughout multiple installations. It appears that this is a feed of the individual messages.json files displayed when the packages are downloaded. Is there a way to open the unified file that displays messages from multiple packages? Or is there a more common way to access these package files?
What you are asking about are the install and release messages pointed to by those keys inside messages.json. For example, from one of my packages,
{
"install": "messages/install.txt",
"1.2.1": "messages/1.2.1.txt",
"1.3.0": "messages/1.3.0.txt",
"1.3.1": "messages/1.3.1.txt",
"1.4.2": "messages/1.4.2.txt",
"2.0.1": "messages/2.0.0.txt",
"2.1.1": "messages/2.1.0.txt",
"2.2.0": "messages/2.2.0.txt",
"2.2.1": "messages/2.2.1.txt"
}
Whenever someone installs the package for the first time, Package Control prints the contents of messages/install.txt to that new view you mentioned. It will also print the file corresponding to the current release, which is a "release" tagged on Github. If I were to go and release 2.3.0, for example, and not update messages.json, no update message would be printed telling users I'd pushed out a new version. In some cases this is desirable, in case I had to quickly push out a point release to fix some stupid mistake I made in a major (or minor) release, not that I've ever done that before :) But, in most cases, I want to keep users up to date on development, so I'll write a message for them in a new file, and add an appropriate key and value to messages.json.
Is there a way to open the unified file that displays messages from multiple packages? Or is there a more common way to access these package files?
The view that opens and shows you the messages from all the newly-installed and -upgraded packages is unique to you and your particular situation - there is no way to recover it once you close the tab. However, if you're interested in a particular package's message(s), just use PackageResourceViewer (in ST3) to open the package, view the messages.json file to see which is the most recent file you want to view, then find and read that file. In ST2 all packages are already unpacked in your Packages folder.

Create versioned documentation archive

I am in the process of rebuilding a API documentation site for an open source project where we want to keep an archive of previous releases. I am wondering how I can configure Jekyll to generate the right hierarchy?
We have the following directory layout in our current /docs folder (which we would like to reuse in Jekyll somehow):
current/
v1/
v2/
v3/
Whenever we release a new version the current folder gets copied to a new folder (say v4). The contents of each folder is something like this:
introduction.md
testing.md
api-foo.md
api-bar.md
I'd like these to be available under the url domain.com/v3/testing/, domain.com/current/testing/, etc. I see that I could probably employ collections to do this, having one collection per version. To do this I see myself auto-updating the _config.yml as part of a build script (I made an example doing this here), but I am not sure how to progress from here, or if using collections for this is the wrong approach ...
This is too brief of an update to be of real quality, but thought I would mention that we solved this in the end in the Sinon project. Check out the repo at GitHub sinonjs/sinon and see the docs folder as well as the scripts called from package.json.
Feel free to improve on this answer by editing it and adding content and links.