Reputation: 1873
I need to pass the ${BUILD_NUMBER} to both nuget and to octo during a build in jenkins.
I do not want to use a specific batch file
nuget pack -Version 1.1.${BUILD_NUMBER}
octo.exe push --package "C:\Jenkins\workspace\MyWorkspace\MyProject.1.1.${BUILD_NUMBER}.nupkg"
How would I be able to parameterize the above commands to include the correct build number?
Solution :
nuget pack -Version 1.1.%BUILD_NUMBER%
octo.exe push --package "C:\Jenkins\workspace\MyWorkspace\MyProject.1.1.%BUILD_NUMBER%.nupkg"
Upvotes: 0
Views: 9352
Reputation: 526
Use the default windows technique %...% for passing your variables along.
In your example you'd get
nuget pack -Version 1.1.%BUILD_NUMBER%
Upvotes: 7