I have added a new argument into the argument-list, which should have default values.
It is declared as a System.String[] but I can't figure out how to give it values. Giving values through Queue new Build works fine, but it is time taking to type in all values each time.
I guess it's pretty simple but I just can't figure out how the Syntax is working while editing a build process.
Thanks in Advance
You need to add it to Metadata and change the item of View this parameter when dropdownlist in Process Parameter metadata editor (e.g. Only while editing a definition).
You also can specify default value of that parameter when edit build process template, such as {"str1","str2"}.
There is a similar thread: How to put build process parameters into categories in TFS?
Related
In a prameter need to select multiple values as default dynamically in jenkins. Because need to run a scheduler on which multiple values should be selected as default. Any suggestion please.
You can use Extended Choice Parameter Plugin to select multiple valued for a variable.
After installing the plugin, in your project configuration page select This Project is Parameterized option and then from the drop-down choose Extended Choice Parameter.
Then add a name for your parameter and choose the parameter type as Multi Select. Then under Choose Source for Value section choose from where you want to take the vales for your parameter and save your job. In the following image I am providing the value in the job itself. You can choose alternate methods.
Now when you build your project you can select multiple values.
you can try to use source for default value
I would suggest Active Choices instead, using for example a simple checkbox configuration
TFS Build allows to define a label format in "repository" tab in build definition. I can define custom variables in "variables" tab and use them in label format definition. But is there any possibility to change a value of such custom variable in batch script in custom build step? Or maybe in some other type of a build step? I can get a value of such variable in a batch script, but any changes are ignored (though "Modify Environment" checkbox is set). Is there any possibility to use a value calculated during a build process as a part of a label format?
Thanks in advance!
It should be. There is no much difference with the custom variable in "variables" tab and custom variable in batch script in custom build step.
However, please note not every custom variable can be used as a part of a lable format. Please double check this.
Some build variables might yield a value that is not a valid label.
For example variables such as $(Build.RequestedFor) and
Build.DefinitionName can contain white space. If the value contains
white space, the tag is not created.
Update from OP: As a workaround, with build.updatebuildnumber you could update a build number and then use $(build.buildNumber) in label format.
When I add a new parameter in the Process Parameter Metadata Editor, checkin my changes, and go back to edit the definition or queue a build from it, the parameter is not showing. Here is the parameter in the editor:
Other custom parameters I added in the past show up fine. For example, this one shows up fine:
So..I would expect my new parameter to show up the same way this one works.
I tried closing and re-opening VS2013 (I have update 4) and changing to another build controller, but get same behavior. How do I fix this?
A parameter must be defined at the Build Arguments level (the place you found the Build Parameters Metadata).
Afterwards, the Metadata defines how it shows up, which editors it uses, and what description should be shown on it.
That's about the metadata, but you need to add your parameter in the Arguments tab.
You will find it in the XAML Workflow editor at the bottom three buttons/tabs: Variables, Arguments and Imports.
I am using Visual Studio Online for Source Control and Build processes. I created a new build definition using the TfvcContinuousDeploymentTemplate.12.xaml. When Queuing a new build from within VS I have the chance to change some parameters, but I can't change the Build number format. What determines what shows up on that parameter list and how can I make sure the Build number format appears there?
My suggestion is to investigate modifying the build template to:
1) Take a custom input value, which I believe you can change on each invocation of the build; and
2) Finding the appropriate step to interrogate the existing Build Number and modify it based on this input.
This should get you started:
http://msdn.microsoft.com/en-us/library/dd647551.aspx
Alternatively, you could remove the Build Number Activity in its entirety and substitute your own – but I don’t think these measures are warranted in this case. This would get you started down that trail:
http://blogs.msdn.com/b/willbar/archive/2010/01/21/generating-custom-build-number-in-tfs-build-2010.aspx
HTH –
jlo
To show the property you have to edit the template, expand the arguments, search for Metadata and click on the ellipse towards the right of the row. Find the property you want, in my case it is BuildNumberFormat and change the View this parameter when: Always show the parameter
My Delphi 2006 TADOCommand has it's
CommandText (including parameters),
Prepared (True),
ParamCheck (True)
properties all set at design time.
Is there a way for me to go about deleting some of it's Parameters at run time, without having to change the CommandText to accomodate these changes. This is desireable in the case that some of the table columns that the parameters reference do not need updating/inserting.
I'm thinking of something along the lines of
TADOCommand.Parameters.ParamByName('MyParam').SafelyRemove;
Many Thanks,
Duncan
Each item in Parameters collection corresponds to parameter marker in the command text. It is like API to this marker. Removing items from Parameters will not remove the corresponding marker. If you does not need to touch some field in your command text, then you have to modify command text and remove corresponding parameter marker.
When command text is prepared, the DBMS has built command execution plan and allocated some resources, required for command execution. If you will change the command text, then DBMS has to build new command execution plan.
Kind of that ...
Because parameters placeholders (:PARAMn) are embedded in the SQL text, I don't see how you can add or remove parameters without changing CommandText. You would have a mismatch.
In case when the command text is dynamic-updateble i usually working with params like this: *Parameters.Clear; Parameters.ParseSQL(ADOCommand.CommandText, true); * it will automatically create parameter list with correct parameters names.