Giter Club home page Giter Club logo

extension-utilitiespack's People

Contributors

anangaur avatar atvaark avatar calidus avatar codito avatar deadlydog avatar harshil93 avatar incarnate avatar kishorebv avatar pascalberger avatar rthilton avatar scottcrowe avatar shashban avatar superarchi avatar vsrm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

extension-utilitiespack's Issues

Build or release variables are not evaluated

...Updating token 'Version'
...Found custom variable 'Version' in build or release definition with value '$(BuildID)'
(Same result with $(Build.BuildID) or $(Release.ReleaseId)

The result is "Version_" gets replaced with the literal string "$(BuildID)"

UTF-8 encoded files gets ASCI encoding after tokenization

Hi,

We use your Tokenizer to update configuration settings in VSTS. Our configuration files are UTF-8 and includes special characters. When run thru the tokenizer the characters gets messed up and the file encoding changes from UTF-8 to ASCI.

We've analysed your code and we believe that you're missing the encoding flag here
Set-Content $tempFile -Force

Best regards
Henrik

Testers required for the new version.

Hi @superarchi @Atvaark @RTHilton @scottcrowe @incarnate @pascalberger

You guys have contributed in the past and I would like you guys to test out the new version
https://github.com/openalm/Extension-UtilitiesPack/blob/master/Utilites/ms-devlabs.utilitytasks-0.1.7.vsix

It mostly contains improvements in Tokenizer with custom variables support ( see the overview.md file )

It would be great if some of you could update your extension manually in VSTS/TFS and let me know if there are any issues. I am running hot with my work at office and will not be able to test it e2e in the next week or so.

Incorrect file being used for tempFile contents in tokenize.ps1

I was having an issue where the destination file wasn't being tokenized at all, and looking at the tokenize.ps1 script I noticed that the script used the destination file's contents to iterate over, searching for matches. However, it is the source file which contains the tokens. Changing the Copy-Item step to Copy-Item -Force $SourcePath $tempFile allowed the destination file to be transformed correctly.

If the source file contains the tokens, i.e "__VariableName__", then it would make sense to copy the contents of the source file into the temp file, instead of the destination file, as done at Copy-Item -Force $DestinationPath $tempFile.

Am I perhaps not using the task as intended? Any help would be appreciated.

Ampersands in value are escaped

When using an ampersand in the value of JSON the & gets replaced with "&"

This is a problem when needing to have an escaped character inside the value (i.e. escaped double quote as ")

Tokenization Task - Exception does not stop deploy

When malformed JSON is in the configuration file and a parsing exception is thrown the deploy pipeline continues with the next step even if the Continue on error check box is unchecked.

Here is the stack trace for an exception when the last element of the ConfigChanges array has a trailing comma:
Error parsing configuration file. Exception message:
System.ArgumentException: Invalid array passed in, extra trailing ','. (1215):

{
"QC": {
"CustomVariables": {
},
"ConfigChanges": [
( most lines left out)
{
"KeyName": "/configuration/appSettings/add[@key='SpecialKeyName']",
"Attribute": "value",
"Value": "SpecialValueEntry"
},
]
}
}

at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeList(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)
at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
at Microsoft.PowerShell.Commands.JsonObject.ConvertFromJson(String input, ErrorRecord& error)
at Microsoft.PowerShell.Commands.ConvertFromJsonCommand.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()

[debug]Performing the operation "Copy File" on target "Item: D:\Build_work\9da930050[Build path]\pds\outputs_PublishedWebsites[WebSiteName]\Web.config Destination: D:\Build_work\9da930050[Build path]\pds\outputs_PublishedWebsites[WebSiteName]\Web.config.tmp".

Finishing task: Tokenizer
Starting task: Copy files $(System.DefaultWorkingDirectory)/[Build path]\pds\outputs_PublishedWebsites[WebSiteName]
Executing the powershell script: d:\Build\tasks\WindowsMachineFileCopy\1.0.18\WindowsMachineFileCopy.ps1

I"ve got the developer fixing the json file but the deploy process should have been reported as failed vice succeeded.

Thanks

Could not obtain release tasks status in VSTS Rollback task

I am using Rollback task with File Path to powershell script in VSTS Release pipeline. The script will read the task status and execute the rollback action. But while executing it in Release pipeline getting below error.

`2016-06-07T14:40:29.3618995Z ##[debug]Getting Personal Access Token for the Run

2016-06-07T14:40:42.1723249Z ##[debug]Calling https://aced.vsrm.visualstudio.com/HON.ACS.PIM.DAM.FWD/_apis/release/releases/158/environments/158/tasks?api-version=2.1-preview.1 using obtained PAT token

2016-06-07T14:40:42.6644892Z ##[debug]Could not obtain release tasks status

2016-06-07T14:40:42.6675181Z ##[debug]The remote server returned an error: (500) Internal Server Error.

2016-06-07T14:40:42.6714886Z ##[debug]Release Query unsuccessful.

2016-06-07T14:40:42.6905170Z ##[debug]obtained task execution history as {}`

The script used is given below:

try
{
    $jsonobject = ConvertFrom-Json $env:Release_Tasks
}
catch
{
    Write-Verbose -Verbose "Error converting from json"
    Write-Verbose -Verbose $Error
}


foreach ($task in $jsonobject | Get-Member -MemberType NoteProperty) {    
    $taskproperty = $jsonobject.$($task.Name) | ConvertFrom-Json
    Write-Verbose -Verbose "Task $($taskproperty.Name) with rank $($task.Name) has status $($taskproperty.Status)"
    Write-Verbose -Verbose "$($taskproperty.Name)"
    if($taskproperty.Name -eq "Execute Web deploy command" -and $taskproperty.Status -eq  "failure")
    {
        $statuscode = "$($taskproperty.Status)"
        Write-Host $statuscode
        #Setting up the environment variable for package install status
        Write-Output "Web Deploy Status Code is: $statuscode"
        Write-Host ("##vso[task.setvariable variable=statusWebDeploy;]$statuscode")
        Write-Verbose -Verbose "statusWebDeploy:" $env:statusWebDeploy "Initiating Restore Website Folder..."
    }
}

Tried both inline script and File Path approach but did not work. Please help.

Tokenization task often/always disappears from build definition

I'll add a task for tokenization to my build definition and the build definition will execute and do everything exactly as expected. However, if I were to reopen the build-definition, the new task will be missing (even though it's actively being used in builds).

If I were to add a task of a different type it will show up as expected on future visits. I've not used this VSIX/task very much, but I've used (read: added-executed-viewed) with this task at least once in the recent past and this did not happen. So, this doesn't necessarily happen every time (or, at least, in the beginning).

Note that I added another tokenization, zip, and unzip task (all provided by this VSIX) to the end of my build-definition, saved it, and opened it back up for edit, and none of the tasks that I had added showed.

I was thinking that this was maybe a bug with how you're classifying the task (visibility/category) or that maybe this is a UUID collision? Let me know if there's anything I can do to help.

Missing Output from Rollback Task

I am trying to implement the Rollback Task example shown on https://blogs.msdn.microsoft.com/visualstudioalm/2016/03/28/implement-rollback-with-release-management-for-tfs-2015/

I am unable to locate the "Write-Verbose" and "Copy-Item" execution output when using the "Inline Script" option. It is not shown in the Release "Logs". The Log basically only contains the script itself. Are there any other setup steps required for this Task (e.g. configuration for the Release_Tasks environment variable)?

##[error]The given path's format is not supported.

TFS 2015 Update 2 On Prem.

Using Zip A Folder Build Step

Getting the following error: 2016-08-15T13:49:11.5749241Z ##[error]The given path's format is not supported. Does it matter if there are sub directories in the folder I am trying to zip?

Properties Page:
Path to Folder: Tried hard coded as shown and using TFS variables to same path
e:\Build\Hybris\hybris\bin\Custom\8\a
Path to the zip file: Tried hard coded as shown and using TFS variables to Staging path
e:\Builds$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)\custom.zip

Advanced: Overwrite zip file: True

Control Options: Enabled True, all others false

I've done a dir of the folder that is to be zip to make sure there are files, results listed in attached file:

1_Build.txt

Configuration file 'Tokenizer.json' not found.

Hi there - I can't get the script to find the configuration json file. I was wondering if it needs to be copied somewhere explicitly? I've placed it in the root of my source control folder and set the Configuration Json filename value to Tokenizer.json.

Thanks

VSTS - Tokenizer - SourceFilename issue

I am having trouble using this module, getting this error

##[error]d:\a\r1\a[Prod] Package\ProdDrop\PROD.Endpoint\ServiceConfiguration.cscfg is not a valid path. Please provide a valid path

Is there a problem with spaces in the name?

Tokenizer: Predefined variables

I’m exploring the Tokenizer task as a way to surface some build information in my web app by updating a couple web.config app settings.

I am trying to use “BUILD_BUILDNUMBER” and “BUILD_SOURCEVERSION” in the web.config. I am not using configuration json. As best as I can tell it seems predefined variables are not included for replacement, only user defined. Is this accurate or am I not doing something correctly?

    <add key="BuildNumber" value="__BUILD_BUILDNUMBER__" />
    <add key="SourceVersion" value="__BUILD_SOURCEVERSION__" />

If predefined variables are not included, please consider this an enhancement request as I could see other reasons to utilize the various predefined variables at build or release time.

Thanks in advance for your help!

Log output from task:

2016-12-29T21:25:50.3561235Z ##[section]Starting: Tokenizer: Transform Source filename
2016-12-29T21:25:50.3640916Z ==============================================================================
2016-12-29T21:25:50.3640916Z Task : Tokenize with XPath/Regular expressions
2016-12-29T21:25:50.3640916Z Description : Replaces and/or XPath for XML documents with User Defined variables or configuration json document
2016-12-29T21:25:50.3640916Z Version : 2.0.2
2016-12-29T21:25:50.3640916Z Author : ms-devlabs
2016-12-29T21:25:50.3640916Z Help : More Information
2016-12-29T21:25:50.3640916Z ==============================================================================
2016-12-29T21:25:53.0814526Z Environment: default
2016-12-29T21:25:55.8564531Z Updating token 'BUILD_BUILDNUMBER'
2016-12-29T21:25:55.8564531Z No value found for token 'BUILD_BUILDNUMBER'
2016-12-29T21:25:55.9114525Z Updating token 'BUILD_SOURCEVERSION'
2016-12-29T21:25:55.9344527Z No value found for token 'BUILD_SOURCEVERSION'
2016-12-29T21:25:55.9574514Z ##[section]Finishing: Tokenizer: Transform Source filename

Powershell++ Interpreting StdOut as StdErr

I'm using PowerShell++ to run two NPM install tasks in parallel. I'm using Start-Job with a script block that runs NPM install. The problem is that some of the installed NPM packages have install.js scripts that run which output various status messages into the console. They are informative only but the PowerShell++ task is interpreting them as errors and failing the build!

use with clickonce

Has anyone ever successfully used the tokenization step with a clickonce WPF app?

The first problem: The path to the published config file has the app version embedded in it. I can't find a system variable with that value for specifying the "source file name" path. (The config file in the working directory is not used in a clickonce scenario.)

The next problem: If ANY file is modified after a clickonce publish step it will trigger a System.Deployment.Application.InvalidDeploymentException because the hash value won't match the original manifest.

Update documentation with more explanation how to use this

Hi all,

I wanted to used this extension to replace some tokens during build, but I cannot figure out how to do this. The documentation mentions using a Configuration Json file to use for the transformations. If I include this file into TFS, I would include the values to use (perhaps secrets) into TFS. That isn't something I'd recommend :-). Is there a way to use build variables in the config file?

Adding this to the documentation would help.

'Access denied' while trying to use Tokenizer task

Using the Tokenizer task I get the following error:

2016-03-14T09:25:19.6282603Z ##[error]Access to the path 'D:\work\f97caf0d3' is denied.

2016-03-14T09:25:19.6751342Z ##[error]The file D:\work\f97caf0d3.tmp cannot be read: Access to the path 'D:\work\f97caf0d3.tmp' is denied.

In the task I have just set the Source filename (a WebDeploy SetParameters.xml file). No Destination filename and no Configuration Json filename, which according to documentation should replace all __foo__ token with the value of the foo variable.

tokenize.ps1 fails to selectsinglenode without namespace

I'm trying to use the Tokenizer against a SharePoint app manifest.xml file. SelectSingleNode (line 57) fails since there is a name space. I think if you test for NameTable or NamespaceURI you can support this with little code change:

$ns = New-Object System.Xml.XmlNamespaceManager($xmlraw.NameTable)
$ns.AddNamespace("ns", $xmlraw.DocumentElement.NamespaceURI)
$xmlraw.SelectSingleNode("//ns:$($key.KeyName)", $ns)

Tokenizer doesn't work with on-premise build server

I'm using the latest version and when running Tokenizer on a hosted release it works fine. But if I release from our build server on premise, I get this error:

2016-09-29T14:16:20.6396150Z C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 
([scriptblock]::Create(
'if (!$PSHOME) { 
                $null = Get-Item -LiteralPath ''variable:PSHOME'' } 
else { 
Import-Module -Name ([System.IO.Path]::Combine($PSHOME, ''Modules\Microsoft.PowerShell.Management\Microsoft.PowerShell.Management.psd1'')) ; 
Import-Module -Name ([System.IO.Path]::Combine($PSHOME, ''Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psd1'')) }')) 2>&1 | 
ForEach-Object { Write-Verbose $_.Exception.Message -Verbose } ; $env:TF_BUILD = 'True' ; 
Import-Module -Name 'D:\BuildAgent1\tasks\Tokenizer\2.0.0\ps_modules\VstsTaskSdk\VstsTaskSdk.psd1' -ArgumentList @{ NonInteractive = $true } 
-ErrorAction Stop ; $VerbosePreference = 'SilentlyContinue' ; $DebugPreference = 'SilentlyContinue' ; Invoke-VstsTaskScript -ScriptBlock 
([scriptblock]::Create('. ''D:\BuildAgent1\tasks\Tokenizer\2.0.0\tokenize-ps3.ps1'''))"

2016-09-29T14:16:22.9052321Z ##[error]**Index operation failed; the array index evaluated to null.**

2016-09-29T14:16:22.9521102Z Finishing task: Tokenizer

2016-09-29T14:16:22.9833588Z ##[error]System.Exception: Task Tokenizer failed. This caused the job to fail. Look at the logs for the task for more details.

2016-09-29T14:16:22.9833588Z ##[error]   at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.Run(IJobContext jobContext, IJobRequest job, IJobExtension jobExtension, CancellationTokenSource tokenSource)

Is it expecting a certain environment variable to be present, or a certain version of PowerShell (we have version 4.0)?

Rollback Redeploy status not updating

Rollback status is not taking the right status on redeploy on specific environment. It always take the task statuses from the first Deploy attempt.
The issue is Rollback task is not using the latest "Redeploy attempt" number from the release.

My idea is to adjust Api Uri to point to Release instead of Task:

$releasequeryuri = "$($env:SYSTEM_TEAMFOUNDATIONSERVERURI)$($env:SYSTEM_TEAMPROJECT)/_apis/release/releases/$($env:Release_ReleaseId)/environments/$($env:RELEASE_ENVIRONMENTURI.Split('/')[-1])?api-version=2.1-preview.1"

And select latest attempt number from which to get status on tasks:

$tasks = $releasequeryresult.deploySteps | Sort-Object attempt -Descending | select -First 1
$jobtasks = $tasks.tasks | Sort-Object dateStarted

Tokenizer: Use SelectNodes instead of SelectSingleNode

It would be nice to be able to use the XPath capabilities to update several nodes using a single XPath statement. I have a situation where the same value that needs to be placed into multiple similar xml hierarchies.

The limitation appears to be due to the use of SelectSingleNode(...) to return a single node based on the XPath supplied instead of using SelectNodes(...) and iterating over all returned nodes.

Current:

  {
    "KeyName": "/configuration/FileSystemTriggers/file/trigger[@name='Export']/conditions/condition[@name='FileExists']",
    "Attribute": "path",
    "Value": "__path.export_service.triggers__\\__ExtractFilename__"
  },
  {
    "KeyName": "/configuration/FileSystemTriggers/file/trigger[@name='Export']/conditions/condition[@name='FileStable']",
    "Attribute": "path",
    "Value": "__path.export_service.triggers__\\__ExtractFilename__"
  },

Desired:

 {
    "KeyName": "/configuration/FileSystemTriggers/file/trigger[@name='Export']/conditions/condition",
    "Attribute": "path",
    "Value": "__path.export_service.triggers__\\__ExtractFilename__"
  }

zip advanced options - overwrite existing zip

I would like it if the Zip task had an Advanced options section that contained a checkbox for overwriting an existing zip file.

This would be useful in an incremental build situation where the build agent is re-used without a clean workspace. It would remove the need to include the Delete Files task in the build.

Set token to empty value

Currently it seems to not be possible to set the value of a token in the tokenizer task to an empty value. If I have a file containing the token __foo__ and a variable with no value set, the token is not replaced (Test-Path env:$matchedItem returns false).

It would be nice if the Tokenizer would also support to replace tokens with empty strings.

Rollback Task in redeploys

Hi, it seems that the RM API always returns tasks status for the first run of deployment only. I redeployed an environment after fixing some authorization issues and I still got failed status even when logs clearly says every task was successful.
I've confirmed it by calling API manually and checking values in json. Btw, I'm using local TFS installation, I don't have any releases in VSTS yet.

Powershell++: remote

Please let Powershell++ run inline scripts on remote machines, with target machine name as an option parameter.

Rollback InlineScript fails on TFS 2015 Update 3

I don't know if it'll fail in other environments. Using v0.1.3, I defined an environment variable called Release_Tasks, added the Rollback task, set type to Inline Script, left the default script statement in place (Write-Host..), enabled, always run, and got...

System.Management.Automation.RuntimeException:` You cannot call a method on a null-valued expression.
at CallSite.Target(Closure , CallSite , Object , String )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

WebDeploy of tokenizer result

I'm using the "Azure Web App Deployment"-task in Release Management to deploy my web app. My idea is to use tokenizer to modify the web.config, with different values for each environment. But how is this actually done? I already have the prepared web-deploy package containing the web site as the build output. Must I unpack the package, run tokenizer on web.config and then re-package it before deploy? Or am I misunderstanding the use case here?

License

Please post a license file. It is not clear how this sourcecode can be used or credit should be attributed.

Sample *.json file?

HI,

I'm trying to set up a token replacement for my config files. I have the source filename set to:
$(System.DefaultWorkingDirectory)/TFS Web Build 1.0/Corporate Art\app.RM.config
(Here, the RM file is the tokenized config file using token)
The destination filename is set to the true name of the config file:
Company.Client.Corporate.exe.config
I have the json file on the build server at:
\0111-03-0555-01\c$\BuildFiles\Transforms.json

The transforms.json file has the following data in it:
[
{
"CompanyTestDomain": {"QA4"},
"Environment": {"QA4.com"},
"CheckForContext": {"true"},
"ServiceTierAppHost": {"0111-06-0555-00-01.Company.com"},
"ServiceTierCsHost": {"0111-03-0444-00.Company.com"},
"ReportServer": {"0777-02-0111-00-01.Company.com"},
"ReportID": {"systemID"},
"ReportDomain": {"Corp"},
"ReportPWord": {"Password"}
}
]

The powershell is executed C:\Users\Public\Downloads\agent\tasks\Tokenizer\2.0.2\tokenize.ps1
The next line is grey as opposed to black which all the other information is:
##[debug]Performing the operation "Copy File" on target "Item:
C:\Agent_work\85c7a0d97\TFS Web Build 1.0\CorporateArt\app.RM.config
Destination: C:\Users\Public\Downloads\agent\tasks\Tokenizer\2.0.2\Isagenix.Clients.CorporateBackOffice.exe.config.tmp".
after which, I start getting messages that it's Updating token 'CompanyTestDomain'
No value found for token 'CompanyTestDomain'

So, can someone help me figure out what i'm doing wrong?

Tokenization updates only attribute, not XML element text

Only attributes can be tokenized, it seems. So if you have something like ..

<MyProperty>myvalue (replace this)</MyProperty>

.. it won't tokenize. Line 80:

    if ($node) {
        try {
            Write-Host "Updating $($key.Attribute) of $($key.KeyName): $($key.Value)"
            $node.($key.Attribute) = $key.Value
        }
        catch {
            Write-Error "Failure while updating $($key.Attribute) of $($key.KeyName): $($key.Value)"
        }
    }

It should test to see if Attribute was specified, and replace the node's InnerText instead if not.

TFS vNext Powershell build step is using older version of Powershell module

Hi,

a build with Powershell++ step keeps failing when I try to run task containing following code Copy-Item -FromSession $cs (the command is not complete, important is the usage of FromSession) to copy items from a different machine. The error message is

A parameter cannot be found that matches parameter name 'FromSession'.

However, the code does not fail when run from PS console when I'm logged to that machine.

Then I included

(get-command copy-item).Version.ToString()
(get-command copy-item).ModuleName.ToString()

And got version 3.1.0.0 and module Microsoft.PowerShell.Management in PS console and 3.0.0.0 in TFS build step output (module is the same). The version of Powershell is identical in both - 5.0.10586.117.

Looks like the Powershell that is running inside TFS is using different modules.

Is there a task requierement to use specific version of Powershell modules? Or is TFS using Powershell with different set of modules?

Thanks for help,
Karel

Null-Valued expression when running rollback

I get the following error when running the rollback powershell build step containing the sample script from the overview.md:

image

I am running this in VSTS, am I doing something wrong?

Token Replacement does not seem to be modifying the file

Hi,
The token replacement does not appear to be working for me. Below is the log output from release manager:

[section]Starting: Tokenizer: Transform Source filename

Task : Tokenize with XPath/Regular expressions
Description : Replaces and/or XPath for XML documents with User Defined variables or configuration json document
Version : 2.0.2
Author : ms-devlabs
Help : More Information

Environment: DEV_CM
Updating token 'targethostname'
[section]Finishing: Tokenizer: Transform Source filename
[section]Finishing: Release

Below is the Environment config:

envconfig

Below is the Token Config:
setup

Below is a snapshot from the file where the token was exists:

<sites>
      <site name="dfdfdsf"  targetHostName="__targethostname__" />
</sites>

Setting API version on Rollback Powershell task

Hello

I'm getting a (404) Not Found on the Rollback Powershell script when it attempts to get the tasks. I've identified this as the api-version that is being passed. 2.1 does not work but 3.0 does. Is there anyway to change this, other than manually amendding the Rollback Powershell script on the server?

Debug logs:

2017-06-09T09:48:44.7480936Z ##[debug]Calling https://companyName.vsrm.visualstudio.com/branch/_apis/release/releases/191/environments/191/tasks?api-version=2.1-preview.1 using obtained PAT token
2017-06-09T09:48:44.7480936Z ##[debug]GET https://companyName.vsrm.visualstudio.com/branch/_apis/release/releases/191/environments/191/tasks?api-version=2.1-preview.1 with 0-byte payload
2017-06-09T09:48:44.9361123Z ##[debug]Could not obtain release tasks status
2017-06-09T09:48:44.9361123Z ##[debug]The remote server returned an error: (404) Not Found.

"Could not find a part of the path" error - TFS On-Premises

I can't get the Tokenizer to work. It appears to attempt to access a temp file that is not being created. I've checked the build server and no subfolders are being created below the 1.1.1 directory. There is not further detail in the logs.

Starting task: Tokenizer: Transform Source filename


Executing the powershell script: E:\agent\tasks\Tokenizer\1.1.1\tokenize.ps1
Environment: default

Could not find a part of the path 'E:\agent\tasks\Tokenizer\1.1.1$\SharkTank\SharePoint\SharkTank.App.Theme\SharkTank.App.Theme-dev\SharkTank.App.Theme\AppManifest.xml.tmp'.

Cannot find path 'E:\agent\tasks\Tokenizer\1.1.1$\SharkTank\SharePoint\SharkTank.App.Theme\SharkTank.App.Theme-dev\SharkTank.App.Theme\AppManifest.xml.tmp' because it does not exist.

Cannot find path 'E:\agent\tasks\Tokenizer\1.1.1$\SharkTank\SharePoint\SharkTank.App.Theme\SharkTank.App.Theme-dev\SharkTank.App.Theme\AppManifest.xml.tmp' because it does not exist.

Cannot find path 'E:\agent\tasks\Tokenizer\1.1.1$\SharkTank\SharePoint\SharkTank.App.Theme\SharkTank.App.Theme-dev\SharkTank.App.Theme\AppManifest.xml.tmp' because it does not exist.


Finishing task: Tokenizer


Task Tokenizer failed. This caused the job to fail. Look at the logs for the task for more details.
Worker Worker-a740cbb8-b10b-4cba-8bb2-6f69a7bed906 finished running job a740cbb8-b10b-4cba-8bb2-6f69a7bed906

Allow search/replace option in json

An additional optional property in the JSON config could be added for a search string. If it exists, then only that search string gets replaced with the string specified in Value instead of the whole attribute. Valid values in ReplaceSearchString are anything the powershell -replace method can support, which includes regex. See below for example:
{
"KeyName": "/configuration/appSettings/add[@key='API_URL']",
"Attribute":"value",
"Value":":ApiPort",
"ReplaceSearchString":":[0-9]+"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.