Run setup creation using bat - install4j - install4j

I run the command:
"C:\Program Files\install4j6\bin\install4jc.exe" --license="xxx" 64DeveloperInstallation.install4j -r RADview_Test.exe
(in the xxx i put a valid license)
and i got the response: Updated licensing information.
My Goal is to run the setup creation using Bat file.

You have to execute install4jc twice, once with
--license [license key]
and then with the other parameters for building your project.

Related

Writing the build.ps1 console output to a specific log file

I am using cake script to build my application. While the build process all the logging informations are displayed in the console. I want to write all the console output into a specific log file in the same path where the build.ps1 is located.
Build process is like, from gitlab-ci a particular bat file will be called. That bat file will get necessary build informations and build.ps1 will be called as below.
call start /wait /i cmd /c powershell.exe -Command %PSFILE_PATH% --rebrand="app_name"
pause
[PSFILE_PATH - will have the build.ps1 file path with file name.
eg: "F:\Build\app_name\build.ps1"]
Info: I have tried using ".\build.ps1 > output.log" this works while running the build in my local machine. But, in my application build process(via gitlab-ci runner) I'm unable to use this command.
Please suggest a way(other than ".\build.ps1 > output.log") to log all the outputs printed in the console into a file while running build.ps1.
Thanks in advance.
You can persist this information from the Gitlab-ci build by saving it as an artifact. Just add this to your job's description in the gitlab-ci.yml:
artifacts:
name: 'Build output' # or whatever
when: always # or on_success/on_failure depending on your use case
paths:
- output.log
expire_in: 1 day # or 4 hours or however long you want to keep it stored
This way you can look at the output.log file via pipelines > your pipeline > artifacts.

Start-Process : The system cannot find the file specified from TeamCity Build step but works fine locally

i am trying to run Pact broker can i deploy tool with paramaters which is working fine locally but when i add the build step in TeamCity it is throwing below error
Start-Process : This command cannot be run due to the error: The
system cannot find the file specified.
when i run the same powershell script locally, it is working fine .
powershell script:
CanIDeploy.bat code is
Note: the reason i am calling pact-broker.bat from power shell script is, unable to run bat file from Teamcity , that is the reason created powershell script which internally calls pact broker bat file.
any help is appreciated
I see that you use relative path, but what about the working directory? I see a different path in the error message vs what you show where the file is.

Building Artifactory fails for Build Stage in Delivery Pipeline

I have created a toolchain, which downloads the code from the bitbucket repository and builds the docker image in IBM Cloud.
After the code builds the image, the build stage fails while building the artifactory.
Error:
Preparing the build artifacts...
Customer script does not exist for the job, exitting
I have specified the Build archive directory as the folder name. Do I need to write any scripts for archiving?
That particular error occurs when one of our checks -- the existence of /home/pipeline/$TASK_ID/_customer_script.sh -- fails.
Archiving happens automatically but that file needs to be present as we use it as part of the traceability around how the artifact was created. Is it possible that file is getting removed? (Also will look into removing or making the check non-fatal however that will take time)
This issue appears to be caused by setting a working directory for the job. _customer_script.sh gets dropped into the working directory, but the script Simon is referring to (/opt/IBM/pipeline/bin/ids-buildables-notify.sh) only checks the top-level directory the code input is at (/home/pipeline/$TASK_ID/).
Three options to fix this, assuming you're doing a container registry job:
Run cp _customer_script.sh /home/pipeline/$TASK_ID in your script. The ids-buildables-notify.sh script does some grepping for your bx cr build call, so make sure that's still in there.
touch /home/pipeline/$TASK_ID/_customer_script.sh and export PIPELINE_IMAGE_URL=<your image url>. If PIPELINE_IMAGE_URL is set, the notify script doesn't bother with being clever, which I prefer.
Don't change the working directory.
A script which works for me:
#!/bin/bash
echo -e "Build environment variables:"
echo "REGISTRY_URL=${REGISTRY_URL}"
echo "REGISTRY_NAMESPACE=${REGISTRY_NAMESPACE}"
echo "IMAGE_NAME=${IMAGE_NAME}"
echo "BUILD_NUMBER=${BUILD_NUMBER}"
echo -e "Building container image"
set -x
export PIPELINE_IMAGE_URL=$REGISTRY_URL/$REGISTRY_NAMESPACE/$IMAGE_NAME:$BUILD_NUMBER
bx cr build -t $PIPELINE_IMAGE_URL .
set +x
touch /home/pipeline/$TASK_ID/_customer_script.sh

Execute jar and display text in jenkins console log

I have abc.jar file to deploy and run in remote machine.
I have transferred the file using jenkins, now what I have done is, call a a.bat batch file on remote machine using psexec in Execute Windows Batch Command.
a.bat executes the abc.jar
When the jar begins execution, the command prompt texts are stored in a file.
using java -jar abc.jar >> a.log 2>&1
Now what I want is to display the a.log contents in the jenkins console when the jar file is being executed
(the file is continuously being written and I want to show it in jenkins console as it is being written)
I have tried to do it using parallel processing by calling start twice, one for calling batch file, another using type for displaying.
But when I use start I get Process leaked file descriptor .
Is there any other way I can achieve this. Be it calling powershell or scheduled task in jenkins.
You need to look for tee equivalents in windows , there are few like GNU utilities for Win32, however if you have cygwin you can still use tee which will easy the prcoess.
Now the wuestion arises how to run my jar file on cygwin from jenkins ?
you can still use execute windows[batch] shell. and add cygwin installation path to the PATH variable and start using linux command like a BOSS.
or you can use powershell tee in built command from batch.

Rename the Single .exe file name parameter using command line IsCmdBld.exe Installshield

How do I specify the name for the executable using the command-line version of Installshield. I'm looking for the command line switch
I need to create a package based on the version I pass.
For ex : If I pass - 2.2.0,
SET RELEASE_VERSION="2.2.0"
ISCmdBld.exe -p "\Path\BuildProject.ism" -y %RELEASE_VERSION% -? MY_COOL_APP_%RELEASE_VERSION%.EXE
I need to know the switch (indicated as ? here) which will create MY_COOL_APP_2.2.0.exe after building and running the command line InstallShield build tool.
I tried using the values from the path variables at build time
ISCmdBld.exe -p "\Path\BuildProject.ism" -y %RELEASE_VERSION% -l MYPathVar="MY_COOL_APP_%RELEASE_VERSION%"
I have associated the value of the path variable for the single .exe file in the Project-->Settings-->Application tab but still the build gives me the default setup.exe
Much appreciate your inputs
There is no parameter for IsCmdBld.exe that directly changes the name of the resulting setup.exe file. For a couple predetermined names you could make multiple release configurations and select them (with -r, or product configurations via -a), but for your case that is unlikely to scale. Instead you should consider one of the following:
Use automation (perhaps invoke a .vbs script) to edit the release configuration, and then build the project
Build to a known name, and then rename the resulting file as the next step in your build script