TeamFoundation Module
Native support for Azure DevOps (previously VSTS) / Team Foundation Server specific APIs.
The general documentation on how to use CI server integration can be found here.
This module does not provide any special APIs please use FAKE APIs and they should integrate into this CI server.
If some integration is not working as expected or you have features you would like to use directly please open an issue.
Secret Variables:
This CI server supports the concept of secret variables and uses the Vault to store them.
In order to access secret variables you need to use one of the fake 5 tasks from
vsts-fsharp.
Example
Example implementation (supports runner and vault tasks)
// Either use a local vault filled by the 'FAKE_VAULT_VARIABLES' environment variable
// or fall back to the build process if none is given
let vault =
match Vault.fromFakeEnvironmentOrNone() with
| Some v -> v // fake 5 vault task, uses 'FAKE_VAULT_VARIABLES' by default
| None -> TeamFoundation.variables // fake 5 runner task
// Only needed if you want to fallback to 'normal' environment variables (locally for example)
let getVarOrDefault name =
match vault.TryGet name with
| Some v -> v
| None -> Environment.environVarOrFail name
Target.create "Deploy" (fun _ ->
let token = getVarOrDefault "github_token"
// Use token to deploy to github
let apiKey = getVarOrDefault "nugetkey"
// Use apiKey to deploy to nuget
()
)
Types
Type | Description |
Functions and values
Function or value | Description |
Full Usage:
TeamFoundation.logIssue isWarning sourcePath lineNumber columnNumber code message
Parameters:
bool
sourcePath : string option
lineNumber : string option
columnNumber : string option
code : string option
message : string
|
|
Full Usage:
TeamFoundation.setBuildState state message
Parameters:
string
message : string
|
|
|
|
Full Usage:
TeamFoundation.setVariable variableName value
Parameters:
string
-
The name of the variable to set
value : string
-
The value of the variable to set
|
|
|
|
Full Usage:
TeamFoundation.write action properties message
Parameters:
string
properties : seq<string * string>
message : string
|
|