Skip to content

Commit b284022

Browse files
committed
FI master
2 parents b461216 + aa02e7f commit b284022

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1719
-913
lines changed

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Instructions for Contributing Code
2+
3+
## Contributing bug fixes
4+
5+
We are currently accepting contributions in the form of bug fixes. A bug must have an issue tracking it in the issue tracker. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort.
6+
7+
## Contributing features
8+
9+
Features (things that add new or improved functionality) may be accepted, but will need to first be approved in the form of a suggestion issue.
10+
11+
Design changes will not be accepted at this time. If you have a design change proposal, please log a suggestion issue.
12+
13+
## Legal
14+
15+
You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright.
16+
17+
Please submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit https://cla.microsoft.com to sign digitally.
18+
19+
## Housekeeping
20+
21+
Your pull request should:
22+
23+
* Include a description of what your change intends to do
24+
* Be a child commit of a reasonably recent commit in the **master** branch
25+
* Requests need not be a single commit, but should be a linear sequence of commits (i.e. no merge commits in your PR)
26+
* It is desirable, but not necessary, for the tests to pass at each commit
27+
* Have clear commit messages
28+
* e.g. "Refactor feature", "Fix issue", "Add tests for issue"
29+
* Include adequate tests
30+
* At least one test should fail in the absence of your non-test code changes. If your PR does not match this criteria, please specify why
31+
* Tests should include reasonable permutations of the target fix/change
32+
* Include baseline changes with your change
33+
* All changed code must have 100% code coverage

ISSUE_TEMPLATE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Please check our current Issues to see if someone already reported this https://github.com/Microsoft/azure-pipelines-task-lib/issues
2+
3+
### Environment
4+
azure-pipelines-task-lib version:
5+
6+
### Issue Description
7+
<!--- Please provide a short description of the issue -->
8+
9+
### Expected behaviour
10+
<!--- Tell us what should happen -->
11+
12+
### Actual behaviour
13+
<!--- Tell us what happens instead -->
14+
15+
### Steps to reproduce
16+
1.
17+
2.
18+
3.
19+
4.
20+
5.
21+
22+
### Logs
23+
<!-- Any logs you have/stack traces/etc. -->

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11

2-
# VSTS DevOps Task SDK
2+
# Azure Pipelines Task SDK
33

4-
Libraries for writing [Visual Studio Team Services](https://www.visualstudio.com/en-us/products/visual-studio-team-services-vs.aspx) build and deployment tasks
4+
Libraries for writing [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) tasks
55

66
Reference examples of our in the box tasks [are here](https://github.com/Microsoft/vsts-tasks)
77

88
## Status
9+
910
| | Build & Test |
1011
|---|:-----:|
11-
|![Win](res/win_med.png) **Windows**|![Build & Test](https://mseng.visualstudio.com/DefaultCollection/_apis/public/build/definitions/b924d696-3eae-4116-8443-9a18392d8544/2553/badge?branch=master)|
12-
|![Apple](res/apple_med.png) **OSX**|![Build & Test](https://mseng.visualstudio.com/_apis/public/build/definitions/b924d696-3eae-4116-8443-9a18392d8544/5471/badge?branch=master)|
13-
|![Ubuntu14](res/ubuntu_med.png) **Ubuntu 14.04**|![Build & Test](https://mseng.visualstudio.com/_apis/public/build/definitions/b924d696-3eae-4116-8443-9a18392d8544/4123/badge?branch=master)|
12+
|![Win-x64](res/win_med.png) **Windows**|[![Build & Test][win-build-badge]][build]|
13+
|![macOS](res/apple_med.png) **macOS**|[![Build & Test][macOS-build-badge]][build]|
14+
|![Linux-x64](res/ubuntu_med.png) **Linux**|[![Build & Test][linux-build-badge]][build]|
15+
16+
[win-build-badge]: https://dev.azure.com/mseng/PipelineTools/_apis/build/status/azure-pipelines-task-lib-ci?branchName=master&jobname=windows
17+
[macOS-build-badge]: https://dev.azure.com/mseng/PipelineTools/_apis/build/status/azure-pipelines-task-lib-ci?branchName=master&jobname=macOS
18+
[linux-build-badge]: https://dev.azure.com/mseng/PipelineTools/_apis/build/status/azure-pipelines-task-lib-ci?branchName=master&jobname=linux
19+
[build]: https://dev.azure.com/mseng/PipelineTools/_build/latest?definitionId=7623
1420

1521
## Highlights
1622

@@ -34,8 +40,12 @@ A task which automates Powershell technologies can be written with our Powershel
3440

3541
Documentation: [PowerShell API](powershell/Docs/README.md)
3642

43+
## Notes on authoring Tasks
44+
45+
Starting from [version v2.141.0](https://github.com/Microsoft/azure-pipelines-agent/releases/tag/v2.141.0), the agent can now run on three OS architectures: x86, x64, and 32-bit ARM. When authoring a new task, you can check agent variable: `Agent.OSArchitecture` (possible values: X86, X64, ARM) to restrict running said task to a particular set of OS architectures.
46+
3747

38-
[npm-lib-image]: https://img.shields.io/npm/v/vsts-task-lib.svg?style=flat
39-
[npm-lib-url]: https://www.npmjs.com/package/vsts-task-lib
48+
[npm-lib-image]: https://img.shields.io/npm/v/azure-pipelines-task-lib.svg?style=flat
49+
[npm-lib-url]: https://www.npmjs.com/package/azure-pipelines-task-lib
4050
[npm-sdk-image]: https://img.shields.io/npm/v/vsts-task-sdk.svg?style=flat
4151
[npm-sdk-url]: https://www.npmjs.com/package/vsts-task-sdk

.vsts-ci.yml renamed to azure-pipelines.yml

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,49 @@ trigger:
22
- master
33
- features/*
44

5-
phases:
5+
jobs:
66
#################################################
7-
- phase: windows
7+
- job: windows
88
#################################################
9-
condition: and(succeeded(), eq(variables.os, 'Windows_NT'))
10-
queue: Hosted VS2017
9+
displayName: windows
10+
pool:
11+
vmImage: vs2017-win2016
1112

1213
steps:
1314
################################################################################
14-
# vsts-task-lib
15+
# azure-pipelines-task-lib
1516
################################################################################
1617

1718
# npm install
1819
- task: Npm@1
19-
displayName: (vsts-task-lib) npm install
20+
displayName: (azure-pipelines-task-lib) npm install
2021
inputs:
2122
command: install
2223
workingDir: node
2324

2425
# use node 5
2526
- powershell: |
2627
& "$(build.sourcesDirectory)/res/UseNode5.ps1"
27-
displayName: (vsts-task-lib) use node 5.10.1
28+
displayName: (azure-pipelines-task-lib) use node 5.10.1
2829
2930
# build/test
30-
- script: node make.js test
31+
- script: |
32+
chcp 437
33+
node make.js test
3134
workingDirectory: node
32-
displayName: (vsts-task-lib) node make.js test
35+
displayName: (azure-pipelines-task-lib) node make.js test
3336
3437
# use node 6
3538
- task: NodeTool@0
36-
displayName: (vsts-task-lib) use node 6.10.3
39+
displayName: (azure-pipelines-task-lib) use node 6.10.3
3740
inputs:
3841
versionSpec: "6.10.3"
3942

4043
# build/test
41-
- script: node make.js test
42-
displayName: (vsts-task-lib) node make.js test
44+
- script: |
45+
chcp 437
46+
node make.js test
47+
displayName: (azure-pipelines-task-lib) node make.js test
4348
workingDirectory: node
4449
4550
################################################################################
@@ -59,81 +64,83 @@ phases:
5964
workingDirectory: powershell
6065

6166
#################################################
62-
- phase: linux
67+
- job: linux
6368
#################################################
64-
condition: and(succeeded(), eq(variables.os, 'Linux'))
65-
queue: Hosted Linux Preview
69+
displayName: Linux
70+
pool:
71+
vmImage: ubuntu-16.04
6672

6773
steps:
6874
################################################################################
69-
# vsts-task-lib
75+
# azure-pipelines-task-lib
7076
################################################################################
7177

7278
# npm install
7379
- task: Npm@1
74-
displayName: (vsts-task-lib) npm install
80+
displayName: (azure-pipelines-task-lib) npm install
7581
inputs:
7682
command: install
7783
workingDir: node
7884

7985
# use node 5
8086
- task: NodeTool@0
81-
displayName: (vsts-task-lib) use node 5.10.1
87+
displayName: (azure-pipelines-task-lib) use node 5.10.1
8288
inputs:
8389
versionSpec: "5.10.1"
8490

8591
# build/test
8692
- script: node make.js test
8793
workingDirectory: node
88-
displayName: (vsts-task-lib) node make.js test
94+
displayName: (azure-pipelines-task-lib) node make.js test
8995

9096
# use node 6
9197
- task: NodeTool@0
92-
displayName: (vsts-task-lib) use node 6.10.3
98+
displayName: (azure-pipelines-task-lib) use node 6.10.3
9399
inputs:
94100
versionSpec: "6.10.3"
95101

96102
# build/test
97103
- script: node make.js test
98-
displayName: (vsts-task-lib) node make.js test
104+
displayName: (azure-pipelines-task-lib) node make.js test
99105
workingDirectory: node
100106

101107
#################################################
102-
- phase: macOS
108+
- job: macOS
103109
#################################################
104-
condition: and(succeeded(), eq(variables.os, 'Darwin'))
105-
queue: Hosted macOS Preview
110+
displayName: macOS
111+
pool:
112+
vmImage: macOS-10.13
106113

107114
steps:
108115
################################################################################
109-
# vsts-task-lib
116+
# azure-pipelines-task-lib
110117
################################################################################
111118

112119
# npm install
113120
- task: Npm@1
114-
displayName: (vsts-task-lib) npm install
121+
displayName: (azure-pipelines-task-lib) npm install
115122
inputs:
116123
command: install
117124
workingDir: node
118125

119126
# use node 5
120127
- task: NodeTool@0
121-
displayName: (vsts-task-lib) use node 5.10.1
128+
displayName: (azure-pipelines-task-lib) use node 5.10.1
122129
inputs:
123130
versionSpec: "5.10.1"
124131

125132
# build/test
126133
- script: node make.js test
127134
workingDirectory: node
128-
displayName: (vsts-task-lib) node make.js test
135+
displayName: (azure-pipelines-task-lib) node make.js test
129136

130137
# use node 6
131138
- task: NodeTool@0
132-
displayName: (vsts-task-lib) use node 6.10.3
139+
displayName: (azure-pipelines-task-lib) use node 6.10.3
133140
inputs:
134141
versionSpec: "6.10.3"
135142

136143
# build/test
137144
- script: node make.js test
138-
displayName: (vsts-task-lib) node make.js test
145+
displayName: (azure-pipelines-task-lib) node make.js test
139146
workingDirectory: node

node/README.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
11

2-
# VSTS DevOps Task SDK
2+
# Azure Pipelines Task SDK
33

4-
Libraries for writing [Visual Studio Team Services](https://www.visualstudio.com/en-us/products/visual-studio-team-services-vs.aspx) build and deployment tasks
4+
Libraries for writing [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines) tasks
55

6-
![VSTS](https://mseng.visualstudio.com/DefaultCollection/_apis/public/build/definitions/b924d696-3eae-4116-8443-9a18392d8544/2553/badge)
7-
8-
Reference examples of our in the box tasks [are here](https://github.com/Microsoft/vsts-tasks)
6+
Reference examples of our in the box tasks [are here](https://github.com/Microsoft/azure-pipelines-tasks)
97

108
## TypeScript Tasks
119

1210
Cross platform tasks are written in TypeScript. It is the preferred way to write tasks once.
1311

1412
[![NPM version][npm-lib-image]][npm-lib-url]
1513

16-
Step by Step: [Create Task](docs/stepbystep.md)
14+
Step by Step: [Create Task](https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=vsts)
1715

18-
Documentation: [TypeScript API](docs/vsts-task-lib.md), [task JSON schema](https://aka.ms/vsts-tasks.schema.json)
16+
Documentation: [TypeScript API](docs/azure-pipelines-task-lib.md), [task JSON schema](https://aka.ms/vsts-tasks.schema.json)
1917

2018
Guidance: [Finding Files](docs/findingfiles.md), [Minimum agent version](docs/minagent.md), [Proxy](docs/proxy.md), [Certificate](docs/cert.md)
2119

2220
## Reference Examples
2321

24-
The [ShellScript Task](https://github.com/Microsoft/vsts-tasks/tree/master/Tasks/ShellScript) and the [XCode Task](https://github.com/Microsoft/vsts-tasks/tree/master/Tasks/Xcode) are good examples.
22+
The [ShellScript Task](https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/ShellScriptV2) and the [XCode Task](https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/XcodeV5) are good examples.
2523

2624
## Contributing
2725

28-
### Node
26+
We are accepting contributions and we try to stay on top of issues.
27+
28+
[Contribution Guide](../CONTRIBUTING.md).
29+
30+
[Logging Issues](https://github.com/Microsoft/azure-pipelines-task-lib/issues)
31+
32+
## Building the library
2933

3034
Once:
3135
```bash
@@ -40,11 +44,19 @@ $ npm test
4044

4145
Set environment variable TASK_TEST_TRACE=1 to display test output.
4246

43-
[npm-lib-image]: https://img.shields.io/npm/v/vsts-task-lib.svg?style=flat
44-
[npm-lib-url]: https://www.npmjs.com/package/vsts-task-lib
47+
[npm-lib-image]: https://img.shields.io/npm/v/azure-pipelines-task-lib.svg?style=flat
48+
[npm-lib-url]: https://www.npmjs.com/package/azure-pipelines-task-lib
49+
50+
## Powershell
51+
52+
We also maintain a PowerShell library for Windows task development.
53+
54+
Library: [Powershell Library](../powershell)
55+
56+
Usage: [Consuming the SDK](../powershell/Docs/Consuming.md)
4557

4658
## Third Party Notices
4759
To generate/update third party notice file run:
4860
```bash
4961
$ node generate-third-party-notice.js
50-
```
62+
```

node/Strings/resources.resjson/en-US/resources.resjson

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66
"loc.messages.LIB_MkdirFailedInvalidDriveRoot": "Unable to create directory '%s'. Root directory does not exist: '%s'",
77
"loc.messages.LIB_MkdirFailedInvalidShare": "Unable to create directory '%s'. Unable to verify the directory exists: '%s'. If directory is a file share, please verify the share name is correct, the share is online, and the current process has permission to access the share.",
88
"loc.messages.LIB_MultilineSecret": "Secrets cannot contain multiple lines",
9+
"loc.messages.LIB_ProcessError": "There was an error when attempting to execute the process '%s'. This may indicate the process failed to start. Error: %s",
10+
"loc.messages.LIB_ProcessExitCode": "The process '%s' failed with exit code %s",
11+
"loc.messages.LIB_ProcessStderr": "The process '%s' failed because one or more lines were written to the STDERR stream",
912
"loc.messages.LIB_ReturnCode": "Return code: %d",
1013
"loc.messages.LIB_ResourceFileNotExist": "Resource file doesn\\'t exist: %s",
1114
"loc.messages.LIB_ResourceFileAlreadySet": "Resource file has already set to: %s",
1215
"loc.messages.LIB_ResourceFileNotSet": "Resource file haven\\'t set, can\\'t find loc string for key: %s",
16+
"loc.messages.LIB_StdioNotClosed": "The STDIO streams did not close within %s seconds of the exit event from process '%s'. This may indicate a child process inherited the STDIO streams and has not yet exited.",
1317
"loc.messages.LIB_WhichNotFound_Linux": "Unable to locate executable file: '%s'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.",
1418
"loc.messages.LIB_WhichNotFound_Win": "Unable to locate executable file: '%s'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.",
1519
"loc.messages.LIB_LocStringNotFound": "Can\\'t find loc string for key: %s",
@@ -25,5 +29,6 @@
2529
"loc.messages.LIB_PathHasNullByte": "Path cannot contain null bytes",
2630
"loc.messages.LIB_OperationFailed": "Failed %s: %s",
2731
"loc.messages.LIB_UseFirstGlobMatch": "Multiple workspace matches. using first.",
28-
"loc.messages.LIB_MergeTestResultNotSupported": "Merging test results from multiple files to one test run is not supported on this version of build agent for OSX/Linux, each test result file will be published as a separate test run in VSO/TFS."
32+
"loc.messages.LIB_MergeTestResultNotSupported": "Merging test results from multiple files to one test run is not supported on this version of build agent for OSX/Linux, each test result file will be published as a separate test run in VSO/TFS.",
33+
"loc.messages.LIB_PlatformNotSupported": "Platform not supported: %s"
2934
}

node/ThirdPartyNotice.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
33
Do Not Translate or Localize
44

5-
This Visual Studio Team Services extension (vsts-task-lib) is based on or incorporates material from the projects listed below (Third Party IP). The original copyright notice and the license under which Microsoft received such Third Party IP, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft licenses the Third Party IP to you under the licensing terms for the Visual Studio Team Services extension. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.
5+
This Azure Pipelines extension (azure-pipelines-task-lib) is based on or incorporates material from the projects listed below (Third Party IP). The original copyright notice and the license under which Microsoft received such Third Party IP, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft licenses the Third Party IP to you under the licensing terms for the Visual Studio Team Services extension. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.
66

77
1. asap (git+https://github.com/kriskowal/asap.git)
88
2. balanced-match (git://github.com/juliangruber/balanced-match.git)

node/dependencies/typings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "vsts-task-lib",
2+
"name": "azure-pipelines-task-lib",
33
"main": "task.d.ts",
44
"globalDependencies": {
55
"node": "registry:dt/node#6.0.0+20160709114037",

0 commit comments

Comments
 (0)