Where do I see the shell script output in Hudson - hudson

I have written a shell script to build my project using hudson.
I have put some comments that will be displayed on the console by using echo command. This will help me to debug the scripts if there are any errors. Rigt now the script works fine without any bugs. But in future if there are any errors, I would like to See the logs and identify which part/command of the script is causing the problem.
In this regard I have two questions: 1. Where can I find the logs or the output of the build scripts? 2. Where can I see the hudson log files? I have started hudson by placing the hudson.war file under webapps folder of Tomcat.

You should be able to see the console output for each build by choosing the "Console" menu option on the build menu on the left of the page.
The Hudson logs are visible from within Hudson itself. Just go to "Manage Hudson" on the main menu, then choose "System Log".
I'm not sure if that's exactly what you were looking for. If not, please clarify and I'll try help.

Related

Not able to push files using clasp push command

I am able to get the files using clasp pull command but not able to update the files using clasp push command. It says "No files to push".
When I run command clasp status then it shows all of my project files in "Ignore files". Previously it was working completely and the problem occurred yesterday when I changed my laptop.
I also tried making .claspignore file and it also did not work.
For reference, please see the screenshot.
Please help.
I think for me I found the issue after using trying
clasp version "YOUR_VERSION_STRING".
I got a console message to enable API access. Once I enabled that I was able to make pushes. It's funny because I was able to clone and pull just fine.
So this is the Settings URL and then make sure that "Google Apps Script API Access" is on.

Google cloud - Stackdriver debug reports "File was not found in the executable" for GCE Jetty war

I've been trying to follow the
Setting Up Stackdriver Debugger for Java applications on Google Compute Engine, but am running into issues with Stackdriver Debug.
I'm building my .war file from a separate build server, then deploying it to my GCE server. I added the agent to the start command via /etc/defaults, and my app appears in the https://console.cloud.google.com/debug control panel. The version I set in the run command matches the revision that shows up in the source-context(s).json files.
However when I click open the app, I see the message that
No source version information was provided by the deployed application
I connected the app's git repo as a mirrored cloud repository, and can browse the source files in the sidebar of the Stackdriver Debug page. But, If I browse to a file and add a breakpoint I get an error that the error "File was not found in the executable."
I have ran the gcloud preview app gen-repo-info-file command, which created two basic json files storing my git repo and revision. Is it supposed to do anything else?
I have tried running jetty using both normal and extracted modes. If I have jetty first extract the war file, I can see the source-context.json filesin the WEB-INF/classes directory.
What am I missing?
https://github.com/GoogleCloudPlatform/cloud-debug-java#extra-classpath mentions
you can update the agentPath showing your WEB-INF/class directory.
-agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/opt/tomcat/webapps/myapp/WEB-INF/classes
For multiple class paths:
-agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/opt/tomcat/webapps/myapp/WEB-INF/classes:/another/path/with/classes
There are a couple of things going on here.
First, it sounds like you are doing the correct thing with gen-repo-info-file. The debugger agent should pick up the json files from the WEB-INF/classes directory.
The debugger uses fuzzy matching to find source files, so as long as the name of the .java file matches a file in your executable, you should not get that error.
The most likely scenario given the information in your question is that you are attaching the debugger to a launcher process, rather than your actual application. Without further details, I can't absolutely confirm that, though.
If you send us more details at cdbg-feedback#google.com, we can look more closely at your case to see if we can understand exactly what's happening, and potentially improve our documentation, since it sounds like you followed the docs pretty closely.

How to configure Post build tasks in Hudson?

Hi I am using Hudson for source code management. I am able to correctly download the required code from my feature branch and successfully build it.
But I also require to trigger an .exe file once my build has been successful which I am unable to figure out.
Do I have to use some plugin or there is some other way? If it is a plugin please specify how to set up.
Additional Details: I can trigger the exe perfectly from the command prompt but when I write the same command in the Build step of my job, I just get a "Finished: Success" message but not exe has been triggered
You can use Post build task plugin : http://wiki.hudson-ci.org//display/HUDSON/Post+build+task.
To add this plugin in your project, just search for 'post build' on plugin's search page and install it.
After that you can configure on your job's page. It will appear a checkbox with this label: 'Post build task'.

How do I use html5bolierplate build script?

Okay, so.
I've installed Ant.
Downloaded the build script. Extracted to Ant installation location.
When I run the 'runbuildscript' a cmd interface opens for around a second, and stops.
If I navigate to the location of files through CMD, then do ant minify it doesn't work.
I then thought to place and extract the build script in the location of the files.
Upon doing so, an error came -
BUILD FAILED
E:\NamanyayG\wamp\www\namanyayg\build.xml:150: The following error occurred whil
e executing this line:
E:\NamanyayG\wamp\www\namanyayg\build.xml:416: E:\NamanyayG\wamp\www\${dir.source} does not exist.
Please help me out, I'm thoroughly confused.
Build script expects some external process (in this case you) to set dir.source property.
The most sure way to set it is to define it on ant command line, e.g.
ant -Ddir.source=/path/to/dir.source

Unable to get email-ext.hpi to work in hudson

I have just setup hudson and have begun playing around with it.
I have downloaded the email-ext.hpi into the the folder $HUDSON_HOME\plugins
I have restarted hudson post-step1 ( i am following this manual method as i am unable to use (for proxy setting reasons) the automatic way of installing plugins via the "Manage hudson" page.
I dont see any errors when hudson starts. In fact i see the line
INFO: Started all plugins
BUT:
When i start a project configuration page, I do not see the promised option "Editable Email Notification".
FYI:
1. I am able to setup and run few basic test builds and they run fine.
2. I am also able to configure and receive the default hudson emails for failures and subsequent successes.(This confirms the SMTP settings)
3. I was also aboe to setup the subversion tag hpi in the same way as detailed above and that works fine as well!
What am i missing? Thanks in advance for any help!
EXTRA INFO:
Hudson version - 1.379 running on Windows XP
OK - i figured out a workaround (although i still need to dig into why this is a problem). Recording here for anyone else tha tmay face this issue.
The plugin when copied into the $HUDSON_HOME\plugin was somehow not really being activeated/recognized. But when i copied it over also to C:\Documents and Settings\mylogin.hudson\plugins and restarted hudson service, voila! it worked.
If anyone knows why this might have occured, kindly record it here for reference. Thanks.
To install a plugin you should use the easy route. In Hudson, go to 'Manage Hudson' -> 'Manager Plugins' -> 'Advanced' (its a tab) and use the 'upload plugin' option.
Than follow the instructions. Usually you have to restart Hudson to actually get the plugin.
Way saver than messing around with the file system. In general the approach you had should have been correct, but there seems to be an issue with your $HUDSON_HOME. Have a look at the "Manage Hudson" -> "Configure System" page. What is the Hudson Home directory displayed on the top of the page? I don't know what Hudson does if it can't access the Home Directory? My assumption is here that Hudson runs as a service with a user account rather than the local system account and that you used a different account to copy the hpi file.
Install Maven Legacy and Maven3 plugins .