In my Jenkins build i want it to read my NSIS script file. This is how it looks.
installer.exe/D=C:\Program Files(x86)\NSIS
But Jenkins keep failing to build correctly from this. Anybody who can help me?
Create new batch command with following:
path_to_NSIS_folder>\makensis.exe path_to_your_nsi_file
makensis.exe is a NSIS compiler and all it needs is path to the script file (.nsi).
When run the script is compiled and (if no errors) reslting setup.exe is created (the output can se set in .nsi file).
This code was given to me by another user and works perfectly although I didn't structure this question correctly. But this is the answer.
Related
New to Jenkins so apologise in advance as I'm sure this answer is out there somewhere. Just not sure exactly how to search for what I'm after. I'm struggling a bit with the copyback process in Jenkins.
When I build, I'm running some unit tests that create some log files which I want to be stored as part of the Jenkins build. I'm running on Windows 10 and everything is running on my laptop (I'm purely trying to learn Jenkins so this is fine for me).
So my test results will always appear in C:\TestLogs\*.log. I want the results copied to my build directory which is URL: http://localhost:8080/job/loadrunner_test/1/ absolute: C:\Program Files (x86)\Jenkins\jobs\loadrunner_test\builds\1
I'm a bit confused with which plugin I should use in my post build step? Copy Artifact plugin looks as if it's meant to pass data between builds. For each build, I just want to copy C:\TestLogs*.* to the current build directory so I can see them when I click on the link for #1 in the Build History.
Many thanks!
Tim
WindowsDir
Jenkins Build
You can copy it with additional step.
Select Execute Windows batch command for that step and add this line:
xcopy C:\TestLogs C:\Program Files (x86)\Jenkins\jobs\jenkins_test\builds\%BUILD_NUMBER% /s /e
You can also check configuration for your test if you can set path location.
I have a problem trying to launch a server via a .bat file during a TFS build.
I usually launch the server via a cmd window and it works fine.
When I set it in the TFS build, I end up with the following message :
"'..\server_common.bat' is not recognized as an internal command or external, an executable or a command file".
I also have the following line:
"java -Dsun.lang.ClassLoader.allowArraySyntax=true -Xbootclasspath/a:..\..\..\lib\framework\serverjvm15.jar; -cp ..\..\..\lib\framework\fwtime.jar;" indicating a java syntax error (? I'm not skilled in java)
This batch calls other .bat files and sets java VM-related environment variables
From my research, it is probably a problem of rights as I don't have admin rights when I use TFS. However, all the other steps in the build work fine (installing and launching an appli through command lines, or launching a python script via command lines).
However I also tried to launch a basic script with the same kind of step and it works.
First, suggest you to follow the tutorial in Batch script. Make sure you have meet the requirements of Arguments and used correctly. Such as
Path
Specify the path to the .bat or .cmd script you want to run. The path
must be a fully qualified path or a valid path relative to
the default working directory. In Team Foundation Build, this
directory is $(Build.SourcesDirectory).
Also RDP to your build agent and use your build service account manually run the server_common.bat to narrow down if the account have enough permission.
I am having hard times attempting to perform the simplest operation: run the custom MSBuild script (placed within dedicated "BuildScripts" folder) from the Lab test running build definition. What it is supposed to do prior to test execution is to trigger the child build, get the built sources and perform the modification of the config file by the means of MSBuild script. And that is what I struggle with. Supposing I have specified the build scripts folder among source settings (mapped to $(SourceDir)) and I use the MSBuild activity for running the script, what do I specify in the path for project file location?
Would appreciate any hints you might share.
Thank you.
If I understand your requirement correctly, you can select the MSBuild script file in Build Process as soon as you have uploaded the file into Version Control.
Clicking the button below:
You will get a dialog to select the solution or project you want to build:
And then click "Add..." button, you will be able to select the file from Version Control.
Never heard the "MSBuild script". If you mean to run powershell script during the build. So where do you want to specify the path for project file ? In the script or the configuration of the build template ? Suggest you to provide a screenshot.
Moreover, you can use "invokeprocess" workflow activity to invoke powershell script during the build.
My machine just had its hard drive re-imaged so I'm trying to rebuild it. At this point, I am trying to execute an ant script which has worked for years. Not anymore. When the script compiles the javac errors because it can't find a directory.
The error is...
BUILD FAILED
C:\Users\WHeckle\Documents\temp\6.9.2\build-tceq.xml:92: C:\Users\WHeckle\Documents\temp\6.9.2\${env.SEAM_HOME}\lib does not exist.
It looks like it is concatenating the current directory with seam_home and using it as a library reference to the compiler.
I am at a loss to explain the behavior. Any help is appreciated.
The Ant script expects to find a Windows environment variable named SEAM_HOME.
To get the script to work...
Close any Command Prompts that are open.
Create a SEAM_HOME Windows system environment variable (if this step is unclear, search Google to find instructions on how to do this for your version of Windows).
Open a new Command Prompt.
Run echo %SEAM_HOME% in the Command Prompt to confirm that the environment variable is set.
Re-run your Ant script.
SEAM_HOME appears to be related to JBoss. For an example of what the value of SEAM_HOME can be, see this JBossDeveloper forum post.
I am new to Jenkins, so my question is really simple.
I would like to run an exe and check if the output text file is as expected.
So:
Grab the artifact the SVN (OK!)
Run and exe with some command line arguments (OK!)
Check the output text file (Don't know how to do it)
Any help?
Bonnus: Instead of running an .EXE located in SVN, is there a way to build the C# .NET code to generate the release .EXE ?
You can check the contents of the output file using any scripts. I used NAnt's loadfile to load the whole file. I am sure that there will be an ANT version of loadfile task too.
http://nant.sourceforge.net/release/0.85-rc1/help/tasks/loadfile.html
Regarding the second question, you can use the MSBuild plugin to compile your code and generate the Release exe. There are parameters which you can pass to MSBuild to do it.