Add the ability to build with parameters #101
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
/team-build/
endpoint now supports/team-build/buildWithParameters/JOB_NAME
in both structured form and legacy form modes.Manual testing
Given the following
buildWithParameters.json
file:...run the following command to test the structured form mode:
curl --request PUT http://localhost:9090/team-build/build/param --data-urlencode json@buildWithParameters.json --user remote:92e9d8998a8c005697d252f09a2a311b
and notice that:param
job is indeed triggeredRun the following command for the complete equivalent in legacy form mode:
curl --request PUT http://localhost:9090/team-build/build/param --data id=123 --data verbosity=high --data _team-build_Build.Repository.Provider=TfGit --data _team-build_System.TeamFoundationCollectionUri=https://mseng.visualstudio.com --data _team-build_Build.Repository.Uri=https://mseng.visualstudio.com/Personal/_git/olivida.gcm4ml --data _team-build_System.TeamProject=Personal --data _team-build_Build.Repository.Name=olivida.gcm4ml --data _team-build_Build.SourceVersion=8a76fbe5c9e087491d672c7951bf2613be35de44 --data _team-build_Build.RequestedFor=olivida --user remote:92e9d8998a8c005697d252f09a2a311b
...and notice it has the exact same consequences!
Mission accomplished!