java - Version number of Git commit from a specific branch in TeamCity 8.x -
i building continuous delivery pipeline in tc, , 0th build step, i'd able extract unique version number give commit.
it looks this: release_4.46.
i'd use '4.46'-part append different steps of pipeline, , final step, name artifact e.g. app_4.46.war.
i've managed assemble majority of pipeline(unit tests, jshint, maven build) , it's , running, cannot end of feature.
any or pointers appreciated. thanks
you can try adding powershell step extracts 4.46 branch name , set teamcity parameter can used in rest of steps. powershell code should looks like:
function set-version{ param ( [string] $branch ) $extractedversion = $branch.split("_")[1] write-host "##teamcity[setparameter name='extractedversion' value='$extractedversion']" }
and in powershell step can call function like
set-version %teamcity.build.branch%
once step executed, teamcity parameter extractedversion value 4.46 should available rest of build steps.
Comments
Post a Comment