Hudson NSIS plugin - hudson-plugins

I have an asp.net solution. I have installed Ms build plugin to build it. The job is successfully building. Now i want to achieve two things using hudson.
1. Once the build completes, I want to publish the solution.
2. How can I attach existing NSIS script for the creation of windows installer. Is there any specific plugin for NSIS in hudson?
Kindly help me.

There is a plugin:
https://github.com/Elbandi/nsis-plugin
Now trying to use / enable / configure it on my company CI server ...

In your MSBuild file you could have a target that calls Exec to invoke MAKENSIS.EXE

I myself found the solution for this problem.
After the Build stage add Execute windows batch command section.
Here we can add the asp.net web application pulishing command.
For instance call:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe" -v /ABC1 -p "F:\TEST" -f -fixednames "%hudson_home%\source" -c
Here F:\TEST is the target location and %hudson_home%\source is the source location.
After this we can call our NSIS script using makensis.exe, e.g.:
makenis.exe tst.nsi
Done..!!

Related

Automatic Firefox build on Windows(Jenkins)

I am trying to create a job for Jenkins to automatically build Firefox on Windows machine.
Is it possible to create a script(.bat, .sh or python) which starts start-shell.bat and executes mach build command inside started shell window?
Create a new freestyle job and then configure it. After specifying where your source code repository is located in the SCM section. Add a Window Batch Build step and specify the workspace-relative path to your .bat file that in turn calls the commands you want.

Where does Jenkins store the project source

I have a Jenkins job that uses a script to build my project. On the following line, the script fails mvn -e -X -Dgit='$git' release:prepare.
Because I want to search for the cause of this, I want to go to the Jenkins server and run mvn -e -X -Dgit='$git' release:prepare from the command line, to see if it works.
Does Jenkins store the projects' source code somewhere, such that I can go to that folder and call Maven?
If yes, then where?
Yes, It Stores the project files for the job by default at
/var/lib/jenkins/workspace/{your-job-name}
This is where jenkins suppose the project files to be present or it pulls it from a source before start working/building from it.
Quote from Andrew M.:
"Hudson/Jenkins doesn't quite work that way. It stores configurations and job information in /var/lib/jenkins by default (if you're using the .deb package). If you want to setup persistence for a specific application, that's something you'll want to handle yourself - Hudson is a continuous integration server, not a test framework.
Check out the Wiki article on Continuous Integration for an overview of what to expect."
From this Question on serverfault.
This worked for me:
/var/jenkins/workspace/JobNameExample
but, if your build machine (node) is a different than the one where Jenkins is running (manager), You need specify it:
/var/jenkins/workspace/JobNameExample/label/NodeName
Where you can define label too:
jenkins stores its workspace files currently in /var/jenkins_home/workspace/project_name
I am running from docker though!

How to execute remote bat file using build step in TeamCity?

I have TeamCity installed on centos. I have only one Linux BuildAgent for now. My build configuration execute a maven script and using ant upload WAR artifact to Windows Server on FTP. After this step i have to execute BAT file on remote Windows Server. I read that i can do this using psexec/RemCom, but i can't understand how i can do this in TeamCity? Build Step or different Build Configuration should contain steps to execute psexec/RemCom or i can insert Build Step into existed Build Configuration?
Single build configuration could potentially consists of multiple build steps. Think of them as a actions you would like to do. So I suppose that right now you have a maven step in your build configuration. I would suggest you to add Command Line step, where you can do what ever you want -- it's like bash/batch script. You can put script contents directly to the build step, or you can write script and execute it.
But as you mentioned that you have CentOS, it could be you have to do extra configuration on the build agent for PsExec to be available.

How can use maven to build job with free Talend Open Studio

I have some jobs maje with Talend Open Studio and I want use maven to export jobs in zip file to do automatic build.
Can I found an existing maven plugin to do that?
Can I build job with command line ?
Talend CommandLine is only available in Talend Enterprise Subscription Version. There is no job script in Talend open studio products.
For more information about how to use command line to build the job, please visit this link.
It's possible but complex !
You will have to change pom settings.
Change the file maven_user_setting.xml and settings.xml
Check Offline in maven preferences.
Then with command line like following you can build your project :
mvn -B -s C:\Talend\TOS_DI-Win32-20200219_1130-V7.3.1\configuration\maven_user_settings.xml install -l C:/Talend/lastGenerated.log -P default-settings,!include-java-sources,!include-maven-resources,!include-items,include-libs,!include-binaries,include-running-log4j,include-log4j,include-contexts,!include-test-sources,!include-test-reports,include-xmlMappings,include-running-xmlMappings,packaging-and-assembly,!ci-builder -Dmaven.test.skip=true -Dci.builder.skip=true

what's the best way to automate post-build actions?

We use Luntbuild to do our builds. Our project builders are in Maven 2. After each build is done we need to do a lot of cd, mkdir, cp, unzip rm and zip commands. We currently have a shell scrip that does this but we need to wait for a successful build and then manually run that script. Is there a way to set luntbuild to do the post-build actions for us as soon as it gets a successful build.
If so what should the format of the post-build script be? and how do i set it up?
You may want to run your script via the maven invoker plugin. There is also an example on their site.

Resources