I downloaded the latest Liquibase .zip file from http://www.liquibase.org/download/index.html
Then, I added the path to my liquibase.bat file (C:\liquibase-3.5.3-bin) to my Environment Variables: User variable PATH and System Variable PATH.
However, the command liquibase is still not recognized in the commandline. Am I missing something for liquibase?
Thanks.
Related
I am trying to perform a .NET build with MSBuild in Jenkins on a Windows server, and no matter what I do, I get an error MSBUILD : error MSB1009: Project file does not exist.
The command being run correctly defines the name of the sln file, and I have even tried to define the full path to the file with %WORKSPACE%\project.sln, but neither fix the issue.
How can I resolve the problem?
The issue was the default workspace path defined by Jenkins on a Windows OS. It was placing the project files in a path like C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\RandomQuotes.
If I ran the MSBuild command from a command prompt specifying the sln file (either with a full or relative path, I got the same MSB1009 error.
If I ran the command without the sln file, I got the error Could not find a part of the path 'C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\RandomQuotes'.
I suspect the issue here is the path is too long. The solution was to edit the jenkins.xml file used to launch the Jenkins service and change the JENKINS_HOME environment variable to something like C:\JenkinsHome.
I am executing sonar through Jenkins build, there is use-case where 'src' location changes depending upon build so i want to use environment variable for specifying 'src' path.
For example in sonar-project.properties i want to specify as shown below:
src= c:/project/workspace instead i want to use src =${SONAR_RUN_WORKSPACE}
Environment variables are supported in sonar-project.properties starting from SonarQube Scanner version 2.9 (see SQSCANNER-9).
So, this should work now:
sonar.sources=${env.SONAR_RUN_WORKSPACE}
You cannot pass env variable into sonar-project.property file.
If you are creating sonar-project.property file from jenkins, you can use build with param.
(or)
Create a sonar-project.properties without sonar.source.
Create build with param variable {path}, get the src path from user for each build,
Map the variable with sonar.source=${path} in sh.
Append sonar.source to sonar-project.properties for each build in sh using (>>) or cmd from jenkins.
eg) sonar.source="path" >> sonar-project.properties
finally work space contains sonar-project.properties file with src path.
Nope, environment variables are not supported in sonar-project.properties. In any case, back to your use-case: you better use a relative path for sonar.sources so that, wherever analysis is ran (i.e. whatever workspace with Jenkins), sources are always found at the expected place (from the project's base directory).
I have my Jenkins configured to Inject environment variables to the build process and set the Properties File Path to G:\Jenkins\env.properties
Inside my env.properties
VISUALSTUDIOVERSION=12.0
PATH=$PATH
When I run my job, the PATH is not reflecting my system path instead its just showing $PATH only. How can I edit my env.properties file to pick up system PATH?
THe output of Env variables after build is
VISUALSTUDIOVERSION=12.0
PATH=$PATH
But I am expecting to see it as
VISUALSTUDIOVERSION=12.0
PATH=C:\Program Files (x86)\Perl\site\bin;C:\Program Files (x86)\Perl\bin;
Environment variables in Java are case-sensitive. Try Path instead of PATH.
I'm trying to install gradle for building android app with the help of Jenkins. But I'm not able to find the link to download gradle for Centos. I tried to use binaries from https://gradle.org/downloads/, but when I unzipped I got gradle.bat file inside bin directory which tells me that this is for Windows.
Is there a place where I can download gradle for using in Jenkins?
... but when I unzipped I got gradle.bat file inside bin directory which tells me that this is for Windows.
It also contains a file called gradle, which is a shell script.
Your download is also suitable for running on any Linux or UNIX platform .... including CentOS.
Please add the GRADLE_HOME path to the PATH variable by using following steps:
echo $PATH
Copy the echoed paths and add the GRADLE_HOME path e.g.: /opt/gradle/bin to the PATH variable using a colon (:) using command: export PATH = echoed paths:GRADLE_HOME path
Now, you can use the command gradle from any path and it should work.
this is a batch file that i have. It is located in C:\Work\6.70_Extensions\Lab Tools\ folder.
ANT.BAT:
set CLASSPATH=%CLASSPATH%;.;c:\JavaMail\javamail-1.3\mail.jar;c:\JavaMail\javamail-1.3\mailapi.jar;c:\JavaMail\javamail-1.3\pop3.jar;c:\JavaMail\javamail-1.3\smtp.jar;c:\JavaMail\jaf-1.0.2\activation.jar
CALL "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
#echo on
%ANT_HOME%\bin\ant -logger org.apache.tools.ant.listener.MailLogger -q -buildfile "Master Build.xml"
pause
along with ant.bat, i have a Master Build.xml file located inside the same folder.
When i double click on ant.bat, it will execute the Master Build.xml ant script properly.
However, whenever i try to use another application to open the batch file's absolute path, it always state that Master Build.xml file does not exist!
I tried to open the absolute path using both console application and another ANT Script(via Cruisecontrol framework) but both gives the same error. What is the error here?
for your information here is what ive done with cruisecontrol:
create config.xml (to set intervals for builds)
create nightbuild.xml (so that config.xml will go into it to perform required tasks)
nightbuild.xml will run several console applications to sort files, checkout files from version control etc
lastly, nightbuild.xml will execute ant.bat file to execute the build
These files, config.xml and nightbuild.xml are found in C:\build
When you execute from a directory other than the one containing Master Build.xml, Ant will fail to find the build file, which it expects to be in the current working directory.
You could set an additional environment variable to specify the path to the build file, e.g.
%ANT_HOME%\bin\ant -buildfile "%MASTER_BUILD%\Master Build.xml"
If you set your variable to an absolute path (e.g. C:\Work\6.70_Extensions\Lab Tools) then it will always work. If you use a relative path (e.g. .\Lab Tools), then it will only work if executed from the relative root dir.
(BTW, life will probably be easier if you use buildfiles without spaces in their names, e.g. master_build.xml rather than Master Build.xml).