I'm trying to get Uri path from Local path of Build directory. I've added ConvertWorkspaceItem however I get an error:
What am I doing wrong?
EDIT
This is the way I've set it up. I get valid BuildDirectory (C:\builds...) and I want to get a server path (\TFSBUILDSrv\some\blah)
Result:
You need to specify valid variable names for all of these three properties. there should also be a variable declared in the workflow called workspace.
It's a type error
As ConvertWorkspaceItem.Workspace Property from MSDN mentioned, this should be a value of workspace that contains the files to convert paths for( BuildDirectory to test1)
So just need to change the variable type to workspace of the workspace variable. Everything is OK.
A example:
Related
Job A uses "For every property file, invoke one build" parameter factory to call downstream job B.
Here is the file pattern I am using:
d:\temp*.properties
There are two files in that folder:
build0.properties
build1.properties
each file looks something like this:
modified=SampleApp
Job B fails because job A is not setting the parameters from above file. If I look at the parameters for a build of Job B, they are empty.
The process works when I use "Parameters from properties file" parameter type instead of a parameter factory, and specify the full path to one of the files, so I know the files are in the right format. I do not want to add a parameter for each file I have,
since I will have these files generated dynamically.I would prefer to use the parameter factory if possible.
Issue with the file permissions, when I pointed to workspace directory with the file pattern It started workign fine.
We created a build template that accepts the path of a powerscript filename as an argument. Right now it works if I type in the actual path of the script. I would like to pass $(SourceDir) as part of the path, and then replace it with the actual value during the build.
For example: $(SourceDir)\myapp\scripts\scripttorun.ps
Here are the steps that I have done:
In the template I have created a variable named DeploymentScript
Then ConvertWorkspaceItem DeploymentScript -> DeploymentScriptFilename
Then pass DeploymentScriptFilename as an argument to PowerShell
Possibly duplicate with this case TFS How to GetEnvironmentVariable value. You can't use $TF_BUILD_BUILDDIRECTORY in a custom build process.
Refer to the last paragraph in this MSDN document:
Use environment data from a custom build process
If you need to use an environment variable in your custom build
process template, you can use the GetEnvironmentVariable activity to
get the data. You can get data from any of the
WellKnownEnvironmentVariables.
For example, to get the path to the binaries directory, set the Name
property of the GetEnvironmentVariable activity to
Microsoft.TeamFoundation.Build.Activities.Extensions.WellKnownEnvironmentVariables.BinariesDirectory
Please refer more detailed info about how to use it from this blog Using Environment Variables in Visual Studio 2013 and TFS 2013
In my tfs build I've created an argument to which I pass in $(TF_BUILD_BUILDDIRECTORY)
Then in my xaml file I've added a variable called "test1" and added GetEnvirenmentVariable" step where I would like to store value of
TF_BUILD_BUILDDIRECTORY
I can NOT get the value to come through. Output from my build:
It prints $(TF_BUILD_BUILDDIRECTORY) instead of "C:\temp... etc"
Please help!
thanks
Refer to the last paragraph in this MSDN document:
Use environment data from a custom build process
If you need to use an environment variable in your custom build
process template, you can use the GetEnvironmentVariable activity to
get the data. You can get data from any of the
WellKnownEnvironmentVariables.
For example, to get the path to the binaries directory, set the Name
property of the GetEnvironmentVariable activity to
Microsoft.TeamFoundation.Build.Activities.Extensions.WellKnownEnvironmentVariables.BinariesDirectory
Please follow the below steps:
Create a String variable named: BINARIESDIRECTORY.
Add GetEnvironmentVariable (String) activity, set Name = Microsoft.TeamFoundation.Build.Activities.Extensions.WellKnownEnvironmentVariables.BinariesDirectory
and Result = BINARIESDIRECTORY
Add CopyDirectory activity, set Source = BINARIESDIRECTORY and
Destination = “\servername\drop”
I am using "Inject environment variables" Jenkins plugin to pass values to child jobs. Property file name is config.Today_date(eg. config.0403) and it has two parameters in it 1. change list(eg. 175444) 2. today's date(eg. 04032014). In child job Properties file path is config.${Today_date}($Today_date is predefined parameter in parent job).
First issue is: it error out saying config."Today_date" do not exist. I went to location and found property file is there and realized that child job is searching properties file as config."Today_date"(config."0403")and actual name of file is config.today_date
Second issue is: if i put property file name as config.0403(today_date) in Properties file path, Then it successfully locate the file but where ever it use parameters from this file, it use them as "0403" & "175444"
Please advise how i can solve "" issue at both locations.
Thanks !!
i'm trying to get full path of the selected Folder. Only thing i was able to find is this
cxShellTreeView2.Folders[Index].PathName, but i don't know how to get this Index.
Is it the path of the map?
self.cxShellTreeView2.Path;
or
self.cxShellTreeView2.AbsolutePath;
Description TcxCustomShellTreeView.AbsolutePath
Use the AbsolutePath property to specify the path to the required shell node. Folder path can be specified in two ways:
as a full path, including all sequence of folders, required for accessing the required shell node from the shell root.
Description TcxCustomShellTreeView.Path
Use the Path property to specify the path to the current shell item. Folder path can be specified in two ways:
as a full path, including all sequence of folders, required for accessing the required shell item from the shell root.
The full path of a selected folder is returned by cxShellTreeView1.AbsolutePath.