Giter VIP home page Giter VIP logo

microsoft / azure-devops-extension-tasks Goto Github PK

View Code? Open in Web Editor NEW
169.0 19.0 77.0 3.13 MB

Pipeline tasks for Azure DevOps Extensions

Home Page: https://marketplace.visualstudio.com/items?itemName=ms-devlabs.vsts-developer-tools-build-tasks

License: MIT License

TypeScript 96.84% JavaScript 0.58% Batchfile 2.47% PowerShell 0.11%
azure-devops azure-devops-extension azure-pipelines azure-pipelines-task continuous-delivery

azure-devops-extension-tasks's Introduction

Azure DevOps Extension Tasks

Build: Build Status Release: Build Status

This extension provides build and release tasks for packaging and publishing Azure Devops Extensions to the Visual Studio Marketplace. There are also tasks to share and install your extension to your Azure Devops organization or Team Foundation Server.

To use

Learn more about this extension and install the extension into your Azure DevOps Organization via the Visual Studio Marketplace.

Available tasks

Azure DevOps

  • Package: package an Azure DevOps extension into an extension package (.VSIX) file
  • Publish: (optionally) package and publish an extension (either privately or publicly) to the Visual Studio Marketplace
  • Unpublish: unpublish an extension from the Visual Studio Marketplace
  • Share: share an extension with an Azure DevOps organization
  • Install: install an extension to an Azure DevOps organization
  • Query version: query an extension's version (to make it easy to increment on your next package or publish)
  • Wait for validation: waits for the Visual Studio Marketplace validation to come through.

Visual Studio

  • Publish: Publish a Visual Studio extension to the Visual Studio Marketplace

Required scopes

When creating a personal access token for use by your pipeline, make sure the token has at least the following scopes for the task(s) you are using:

  • Publish: All accessible organizations, Marketplace (publish)
  • Unpublish: All accessible organizations, Marketplace (manage)
  • Share: All accessible organizations, Marketplace (publish)
  • Install: All accessible organizations or a specific Organization, Extensions (read and manage), Marketplace (acquire)
  • Query Version: All accessible organizations, Marketplace (read)
  • Is Valid: All accessible organizations, Marketplace (read)

Permissions

Contribute

  1. From the root of the repo run npm run initdev. This will pull down the necessary modules and TypeScript declare files.
  2. Run npm run build to compile the build tasks.
  3. Run npm run package to create a .vsix extension package that includes the build tasks.

azure-devops-extension-tasks's People

Contributors

bfcamara avatar carloscds avatar colindembovsky avatar dependabot[bot] avatar ethanis avatar jessehouwing avatar linuxandunix avatar lucasmior avatar microsoft-github-policy-service[bot] avatar molausson avatar onlyutkarsh avatar renovate-bot avatar ronaldbosma avatar rouke-broersma avatar serkan-inci avatar simonalling avatar step-security-bot avatar stuartleeks avatar t-hugs avatar willsmythe avatar wouterdekort 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-devops-extension-tasks's Issues

Publish Task additional arguments not honored

I've been trying to debug an issue where tfx is failing to validate our extension during publishing. The task is failing with this semi-cryptic error:
2017-12-20T19:16:57.8041612Z error: Error: Validation timed out. There may be a problem validating your extension. Please try again later.
2017-12-20T19:16:57.8261928Z ##[error]tfx failed with error: Error: d:\a\_tools\tfx.cmd failed with return code: 4294967295

Looking at the task.json, I see:
{ "name": "arguments", "type": "string", "label": "Arguments", "defaultValue": "", "helpMarkDown": "Additional arguments passed to the package and publishing tool.", "required": false, "groupName": "advanced" }
However, I could not find where these arguments were processed or added to the tfx command.

In order to debug further, I added '--trace-level debug' to the 'Arguments' under the Advanced variable group. However, I did not see any additional debug output.

Side note - looking at the tfx-cli history, I believe the underlying issue is related to a change to add faster validation values for non-public releases.

IsValidExtensionAgent could show validation error:

Looks like a validation error is actually returned when querying the status: validationResultMessage

Example

2018-04-14T10:43:30.7515913Z GET https://marketplace.visualstudio.com/_apis/gallery/publishers/agile-extensions/extensions/bravo-notes-staging?flags=1
                Response Code: OK
                Response: {"publisher":{"publisherId":"c598cbbe-5149-476f-ad05-e1573099cd8f","publisherName":"agile-extensions","displayName":"Agile Extensions","flags":"verified"},"extensionId":"b98fb4ac-8523-446a-a26e-3213351df887","extensionName":"bravo-notes-staging","displayName":"Bravo Notes (Staging)","flags":"validated","lastUpdated":"2018-04-14T10:42:36.137Z","publishedDate":"2018-03-13T09:28:15.61Z","shortDescription":"Release notes without the pain","versions":[{"version":"3.0.630","flags":"validated","lastUpdated":"2018-04-02T06:39:45.483Z"},{"version":"3.0.629","flags":"none","lastUpdated":"2018-04-02T06:31:25.243Z","validationResultMessage":"Following errors were found in endpoint contribution:\r\n      Authentication schemes endpoint-auth-scheme-basic, are not valid."},{"version":"3.0.628","flags":"none","lastUpdated":"2018-04-02T06:22:07.877Z","validationResultMessage":"EndpointId is missing or empty in dataSourceBinding of task with ID 'ec0ce74c-0b96-4770-9bfd-609f6ae94cec'."},"deploymentType":0}

It probably makes sense to render the error as part of the failure message.

SyntaxError: Unexpected token when overriding version

When setting up a very simple Extension Build, when I set the override version to 0.0.2 (for example) I get the following:

Error occurred while updating tasks version: Error determining tasks manifest paths: SyntaxError: Unexpected token

All other fields have the default values, and it works if no override version is set.

Local debugging example - Publish from VSIX

SET AGENT_WORKFOLDER=C:\Users\JesseHouwing\Source\Repos\vsts-extension-build-release-tasks\dist\BuildTasks\PublishExtension
SET SYSTEM_DEFAULTWORKINGDIRECTORY=C:\Users\JesseHouwing\Source\Repos\vsts-ping-task-demo
SET INPUT_CWD=C:\Users\JesseHouwing\Source\Repos\vsts-ping-task-demo
SET INPUT_ROOTFOLDER=C:\Users\JesseHouwing\Source\Repos\vsts-ping-task-demo
SET INPUT_CONNECTTO=VsTeam
SET INPUT_FILETYPE=vsix
SET INPUT_EXTENSIONVISIBILITY=default
SET INPUT_EXTENSIONVERSION=1.2.3
SET INPUT_UPDATETASKSVERSION=true
SET INPUT_UPDATETASKSVERSIONTYPE=major
SET INPUT_CONNECTEDSERVICENAME=A
SET ENDPOINT_URL_A=https://marketplace.visualstudio.com
SET ENDPOINT_AUTH_A={ "parameters": { "apitoken": "token", "username": "user", "password": "password" }, "Scheme": "basic" }
SET INPUT_VSIXFILE=C:\Users\JesseHouwing\Source\Repos\vsts-ping-task-demo\jessehouwing.jessehouwing-vsts-ping-task-2.1.2.vsix

Support for External TFS service endpoints in install tasks

The publish and install tasks only allow for marketplace service endpoints. I would like to see the filter expanded to allow for External TFS service endpoints as well. For that matter, why doesn't it show "Visual Studio Marketplace" endpoints? Only "Marketplace".

Add support for proxy settings

The extension seems to ignore the system proxy so I can't use it on our on-prem vsts agents. I have tried using the arguments field on the publish extension task but this seems to be ignored so is not getting passed to tfx.

Could you either please fix the arguments field or add a proxy field that gets passed to --proxy?

Unhandled: Cannot find module 'q'

Set workingFolder to default:
C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.100.1\tasks\PackageVSTSExtension\0.6.1
Unhandled: Cannot find module 'q'

(Using "Hosted Service")

TFX publish expects "-major.minor.patch.gen" at end of name

Hi,

My build definition packages the extension as "publisherid.extensionid.vsix" but the release definition attempts to publish it as "publisherid.extensionid-major.minor.patch.gen.vsix". Are you assuming I will always somehow pass the version as a variable and append it along with that ".gen"?

Support tfx tool installer

Instead of having each task try to locate and install tfx, mimick the NugetToolinstaller to install tfx through a specific tool installer task.

satisfies:["tfs"]
demands["npm"]

This should simplify common.ts substantially as well and would allow users to select which version of tfx to install.

Package Extension: Extension Version Override Incorrect behavior

I am currently trying to package an extension during my build using the Package Extension task.
I am seeing an issue when I set the Extension Version Override value to $(Build.BuildNumber).
When by build number format is set to the following: $(MajorVersion).$(MinorVersion).$(Year:yy)$(DayOfYear).$(Rev:rrr)

When I do this the package is created as I would expect. The problem arises after I publish the extension and share it with my VSTS account.

When I try then to add any of the tasks included in the created extension they are not available.

The interesting part of this is that if I just fill in the Extension Version Override with a constant such as 0.0.0.66 and regenerate the package and republish. I am able to see all of the tasks as expected.

Local Gallery Configuration with TFS 2015 Update 2 On Premise

I've got the need to add a new TFS local gallery connection endpoint, but am having trouble finding documentation on how to configure the build/release task extension by setting up this local gallery connection. As I'm on TFS Onpremise Update 2, I believe I'm required to use Basic Authentication. However, before I create any specific user I'm unclear if there is any issue in running in our intranet with encryption/ssl to protect the credentials.

Any guidance would be appreciated as I'm unable to find anything on this for the extension. The "more info" link in TFS Onpremise for this dialogue opens to the latest documentation which seems to focus on personal access tokens, which we can't use at this time.

Install Extension step returns success after failing

After executing the Install Extension step it reported success while having this console output:

error: Error: Failed Request: Conflict(409) - TF1590010: Extension eduardomhg.custom-build-tasks is already installed in this account.

Is TFS on-premises supported?

The readme says:

This extension provides build and release tasks for packaging and publishing Visual Studio Team Services (VSTS) extensions to the Visual Studio Marketplace. There are also tasks to share and install your extension to your VSTS account.

Does that mean on-premises TFS is not supported?

Error occurred before preparing to run tfx: TypeError: archive.addLocalFolder is not a function

2017-01-17T19:42:32.7802980Z ##[section]Starting: Publish Extension
2017-01-17T19:42:32.7812980Z ==============================================================================
2017-01-17T19:42:32.7812980Z Task : Publish Extension
2017-01-17T19:42:32.7812980Z Description : Publish a Team Services extension to the Visual Studio Marketplace
2017-01-17T19:42:32.7812980Z Version : 1.1.17
2017-01-17T19:42:32.7812980Z Author : Microsoft Corporation
2017-01-17T19:42:32.7812980Z Help :
2017-01-17T19:42:32.7812980Z ==============================================================================
2017-01-17T19:42:32.7832983Z ##[debug]tf vc resolvePath $\TfsAxExtensions\Dev\SDK4NET.TfsExtensions.AX\SDK4NET.TfsExtensions.AX /loginType:OAuth /login:.,******** /noprompt
2017-01-17T19:42:33.2192966Z ##[debug]C:\a\1\s\Branches\DEV\SDK4NET.TfsExtensions.AX\SDK4NET.TfsExtensions.AX
2017-01-17T19:42:33.4872983Z ##[debug]agent.workFolder=C:\a
2017-01-17T19:42:33.4922968Z ##[debug]loading inputs and endpoints
2017-01-17T19:42:33.4932985Z ##[debug]loading ENDPOINT_AUTH_$/
2017-01-17T19:42:33.4952987Z ##[debug]loading ENDPOINT_AUTH_2a8f000f-3667-4004-9458-03225e72f0cb
2017-01-17T19:42:33.4952987Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_$/ACCESSTOKEN
2017-01-17T19:42:33.4962977Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_2a8f000f-3667-4004-9458-03225e72f0cb_PASSWORD
2017-01-17T19:42:33.4962977Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2017-01-17T19:42:33.4962977Z ##[debug]loading ENDPOINT_AUTH_SCHEME
$/
2017-01-17T19:42:33.4972992Z ##[debug]loading ENDPOINT_AUTH_SCHEME_2a8f000f-3667-4004-9458-03225e72f0cb
2017-01-17T19:42:33.4972992Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2017-01-17T19:42:33.4972992Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2017-01-17T19:42:33.4972992Z ##[debug]loading INPUT_CONNECTEDSERVICENAME
2017-01-17T19:42:33.4982981Z ##[debug]loading INPUT_CONNECTTO
2017-01-17T19:42:33.4982981Z ##[debug]loading INPUT_CWD
2017-01-17T19:42:33.4992986Z ##[debug]loading INPUT_EXTENSIONPRICING
2017-01-17T19:42:33.4992986Z ##[debug]loading INPUT_EXTENSIONVISIBILITY
2017-01-17T19:42:33.4992986Z ##[debug]loading INPUT_FILETYPE
2017-01-17T19:42:33.4992986Z ##[debug]loading INPUT_LOCALIZATIONROOT
2017-01-17T19:42:33.5002988Z ##[debug]loading INPUT_OUTPUTVARIABLE
2017-01-17T19:42:33.5002988Z ##[debug]loading INPUT_PATTERNMANIFEST
2017-01-17T19:42:33.5002988Z ##[debug]loading INPUT_ROOTFOLDER
2017-01-17T19:42:33.5002988Z ##[debug]loading INPUT_SHAREWITH
2017-01-17T19:42:33.5012990Z ##[debug]loading INPUT_UPDATETASKSVERSION
2017-01-17T19:42:33.5012990Z ##[debug]loading INPUT_VSIXFILE
2017-01-17T19:42:33.5022986Z ##[debug]loaded 22
2017-01-17T19:42:33.5392992Z ##[debug]vstsDevTools.buildTasks.checkGlobalTfx=undefined
2017-01-17T19:42:33.5392992Z ##[debug]Agent.Workfolder=C:\a
2017-01-17T19:42:33.5422987Z Checking tfx under: C:\a_tools\tfx.cmd
2017-01-17T19:42:33.5442972Z ##[debug]Absolute path for pathSegments: C:\a_tools\tfx.cmd = C:\a_tools\tfx.cmd
2017-01-17T19:42:33.5442972Z ##[debug]C:\a_tools\tfx.cmd=C:\a_tools\tfx.cmd
2017-01-17T19:42:33.5442972Z Found tfx under: C:\a_tools\tfx.cmd
2017-01-17T19:42:33.5452980Z ##[debug]cwd=C:\a\1\s
2017-01-17T19:42:33.5472984Z ##[debug]outputVariable=Extension.OutputPath
2017-01-17T19:42:33.5482983Z ##[debug]connectTo=VsTeam
2017-01-17T19:42:33.5482983Z ##[debug]connectedServiceName=2a8f000f-3667-4004-9458-03225e72f0cb
2017-01-17T19:42:33.5492985Z ##[debug]2a8f000f-3667-4004-9458-03225e72f0cb=https://marketplace.visualstudio.com/
2017-01-17T19:42:33.5492985Z 2a8f000f-3667-4004-9458-03225e72f0cb exists true
2017-01-17T19:42:33.5492985Z ##[debug]2a8f000f-3667-4004-9458-03225e72f0cb exists true
2017-01-17T19:42:33.5492985Z ##[debug]fileType=vsix
2017-01-17T19:42:33.5502987Z ##[debug]vsixFile=C:\a\1\s\Drops\SDK4NET.Build.Tools_2.0.1371.vsix
2017-01-17T19:42:33.5502987Z ##[debug]No pattern found in vsixFile parameter
2017-01-17T19:42:33.5502987Z ##[debug]check path : C:\a\1\s\Drops\SDK4NET.Build.Tools_2.0.1371.vsix
2017-01-17T19:42:33.5512990Z ##[debug]System.DefaultWorkingDirectory=C:\a\1\s
2017-01-17T19:42:33.5512990Z ##[debug]publisherId=null
2017-01-17T19:42:33.5512990Z ##[debug]extensionId=null
2017-01-17T19:42:33.5512990Z ##[debug]extensionTag=null
2017-01-17T19:42:33.5512990Z ##[debug]extensionName=null
2017-01-17T19:42:33.5512990Z ##[debug]extensionVisibility=private
2017-01-17T19:42:33.5512990Z ##[debug]extensionPricing=default
2017-01-17T19:42:33.5522986Z ##[debug]extensionVersion=null
2017-01-17T19:42:33.5522986Z ##[debug]updateTasksVersion=false
2017-01-17T19:42:33.5522986Z ##[debug]Start editing of VSIX
2017-01-17T19:42:33.6452978Z ##[debug]Editing started
2017-01-17T19:42:33.6462983Z ##[debug]shareWith=SDK4NET
2017-01-17T19:42:33.6472984Z ##[debug]extensionVisibility=private
2017-01-17T19:42:33.6472984Z ##[debug]connectTo=VsTeam
2017-01-17T19:42:33.6532986Z ##[debug]Finalizing edit
2017-01-17T19:42:33.6532986Z ##[debug]Extracting files to C:\Users\BUILDG~1\AppData\Local\Temp\vsixeditor117017-2888-1x1dvr1
2017-01-17T19:42:36.9672693Z ##[debug]Editing VSIX manifest
2017-01-17T19:42:37.2144227Z ##[debug]Generated filename: SDK4NET.AxBuildToolsV2-DEV-2.0.1371.gen.vsix
2017-01-17T19:42:37.4214234Z ##[debug]Creating final archive file at C:\a\1\s
2017-01-17T19:42:37.4244212Z ##[debug]task result: Failed
2017-01-17T19:42:37.4344229Z ##[error]Error occurred before preparing to run tfx: TypeError: archive.addLocalFolder is not a function
2017-01-17T19:42:37.4344229Z ##[debug]Processed: ##vso[task.issue type=error;]Error occurred before preparing to run tfx: TypeError: archive.addLocalFolder is not a function
2017-01-17T19:42:37.4344229Z ##[debug]Processed: ##vso[task.complete result=Failed;]Error occurred before preparing to run tfx: TypeError: archive.addLocalFolder is not a function
2017-01-17T19:42:37.9342062Z ##[section]Finishing: Publish Extension

New task versioning won't work when the version in the manifest is unspecified.

@colindembovsky

The code you submitted work when there is a version specified in the task manifest, not when there is none, such is how I normally work.

                // Extract version parts Major, Minor, Patch
                const versionParts = extensionVersion.split(".");
                if (versionParts.length > 3) {
                    tl.warning("Detected a version that consists of more than 3 parts. Build tasks support only 3 parts, ignoring the rest.");
                }

causes:

2017-02-21T14:28:57.9694099Z ##[error]Error occurred while updating tasks version: Error updating version in task manifests: TypeError: manifestJSON.version.split is not a function

TFS Local Gallery connection - configurable over variables

Hey Team,

I have the following use case:

I am using the publish Extension task to publish an extension to a TFS.
In my Release definiton I have different stages for different TFS instances (TEST/PROD).

I have not found a way to use a variable for the "TFS Local Gallery connection" field.
I want to overwrite this variable for each environment.

What I tried so far was to put the "resorceID" from the Service Endpoints. e.g. "12346789-1234-1234-12345678912345678" into the variable.

I always get this error message in the log even when the endpoint id is correct

##[error]Error running task: Error: Endpoint not present: 12346789-1234-1234-12345678912345678

I hope you can tell me how I can solve the problem and what value I have to put into my environmentVariable.

Cheers,

Joachim

"Automatically link new work in this build" does not work

The Build Definition option to "Automatically link new work in this build" does not work (this option was released 5/11, https://www.visualstudio.com/en-us/articles/news/2017/may-11-team-services#automatic-linking-from-work-items-to-builds). When enabling via the web UI, there is no option below it to "only link to work added to specific branches." There appears to be a small UI change, but the option does not appear. It seems it tried to show the configuration present in the release notes, but something is breaking it. This is the HTML that gets generated:

<div><div><div><div><div role="list"><div><div><div role="listitem" data-list-index="0" data-automationid="ListCell"><!-- react-empty: 785 --></div></div></div></div></div></div></div></div>

Furthermore, enabling the option does nothing to link the work item to the build. It links to the changeset, but not the build.

https://developercommunity.visualstudio.com/content/problem/74066/automatically-link-new-work-in-this-build-does-not.html

Share Extension Task Failing

Hi! We have a custom build extension that we've been deploying for 6+ months. Today I ran a build against a new commit and the Share Extension build step fails with an error of:

No api-version was supplied for the "POST" request. The version must be supplied either as part of the Accept header (e.g. "application/json; api-version=1.0") or as a query parameter (e.g. "?api-version=1.0").

I'm not sure if anyone else is experiencing this issue. Help would be greatly appreciated!

I've made several attempts to fix this issue:

  1. Re-Built a commit that was successfully deployed before. (Same Error)
  2. Upgraded Share Extension task version from 0.* to 1.* and rebuilt. (Same Error)
  3. Removed and re-added the Share Extension build task and rebuilt. (Same Error)

Our Build/Deployment Process:

  1. Get Sources (Success)
  2. Package Extension (Success)
  3. Publish Artifact (Success)
  4. Publish Extension (Success)
  5. Share Extension (Error)

Error Detail:
2017-04-03T14:48:36.1924334Z Found tfx in current task folder d:\a\1\s\node_modules.bin\tfx.cmd
2017-04-03T14:48:36.1944346Z 22868630-60ed-44f4-b395-c9772bb048f2 exists true
2017-04-03T14:48:36.1976011Z [command]d:\a\1\s\node_modules.bin\tfx.cmd extension share --token ******** --service-url https://marketplace.visualstudio.com/ --publisher ***** --extension-id ***** --share-with *****
2017-04-03T14:48:36.8154271Z TFS Cross Platform Command Line Interface v0.4.1
2017-04-03T14:48:36.8154271Z Copyright Microsoft Corporation
2017-04-03T14:48:36.9124271Z error: Error: No api-version was supplied for the "POST" request. The version must be supplied either as part of the Accept header (e.g. "application/json; api-version=1.0") or as a query parameter (e.g. "?api-version=1.0").
2017-04-03T14:48:36.9274265Z ##[error]tfx failed with error: Error: d:\a\1\s\node_modules.bin\tfx.cmd failed with return code: 4294967295

Support Publish to and execution in TFS 2015 update 2

I've recently implemented support for TFS 2015 update 2 in my own tasks. The same approach unfortunately causes a breaking change in this version, since the Basic auth scheme is already used (instead of the Token scheme which probably should have been used).

Auth-scheme definition:
https://github.com/jessehouwing/vsts-extension-tasks/blob/Feature/OnPremSupport/vss-extension.json#L176

Code to pass the right parameters to TFX:
https://github.com/jessehouwing/vsts-extension-tasks/blob/Feature/OnPremSupport/vsts-extension-shared/vsts-extension-shared.psm1#L401

I suppose that a breaking change to the Auth scheme is unwanted... Which is why I haven't tried porting my implementation over yet.

How to proceed?

Error when trying to publish an extension

When trying to publish an extension with your task, I got this error:


 ##[debug]exec tool: C:\a\1\s\node_modules\.bin\tfx.cmd
##[debug]Arguments:
##[debug]   extension
##[debug]   publish
##[debug]   --json
##[debug]   --token
##[debug]   ********
##[debug]   --service-url
##[debug]   https://marketplace.visualstudio.com/
##[debug]   --root
##[debug]   C:\a\1\s
##[debug]   --manifest-globs
##[debug]   vss-extensions.json
##[debug]   --loc-root
##[debug]   C:\a\1\s
##[debug]   --overrides-file
##[debug]   C:\Users\BUILDG~1\AppData\Local\Temp\PackageTask-0.753142.tmp
[command]C:\a\1\s\node_modules\.bin\tfx.cmd extension publish --json --token ******** --service-url https://marketplace.visualstudio.com/ --root C:\a\1\s --manifest-globs vss-extensions.json --loc-root C:\a\1\s --overrides-file C:\Users\BUILDG~1\AppData\Local\Temp\PackageTask-0.753142.tmp

C:\a\1\s\node_modules\tfx-cli\_build\lib\qfs.js:39
function fileAccess(path, mode = exports.F_OK) {
                               ^
SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\a\1\s\node_modules\tfx-cli\_build\lib\command.js:3:12)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
rc:1
success:false
task result: Failed
Processing: ##vso[task.complete result=Failed;]tfx failed with error: Error: C:\a\1\s\node_modules\.bin\tfx.cmd failed with return code: 1
tfx failed with error: Error: C:\a\1\s\node_modules\.bin\tfx.cmd failed with return code: 1

It was on a hosted build agent, today.
I tried multiple times

Thank you

Install Task Error

I'm getting a fatal error from the Install Extension task (version 1.1.61) . I'm fairly confident this is related to an underlying issue in the TFS CLI (v0.5.4) as there's a related issue opened in the TFS CLI repo with the same error message:

 error: Error: The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.

Opening this issue here both for awareness that the Install Extension task appears to be broken, and to see if there is some interim workaround (for example using an earlier version of the TFS CLI, using v0.* of this extension, etc.) of this extension that can be used while the underlying TFS CLI issue is resolved.

Avoid partially succeeded state when install fails (because it is already installed)

Feedback from user via the Marketplace (https://marketplace.visualstudio.com/items?itemName=ms-devlabs.vsts-developer-tools-build-tasks#review-details) ..

Great set of tasks, helped out big time with our CI release process. However, it would be nice to have an option to ignore "Error: Failed Request: Conflict(409) - TF1590010: Extension is already installed in this account" error. I'd prefer to not to have the task listed as partially succeeded. We want as part of our release process to ensure the extension is installed to our various target environments and if it's already installed, that's ok.

Installing Extensions no longer works

We haven't made any changes to security or our deployment, (haven't used it in a few weeks) but as of today our release fails at Install Extension with the followng 403 error

  • : [Failed: Error: Failed Request: Forbidden(403) - Access Denied: [user name] needs the following permission(s) to perform this action: Edit instance-level information]

Publish VSIX and overriding may cause publish failure if extension contains a dot file

If you vsix file contains a file that starts its name with a ".", then that file may get lost when repackaging your vsix file. In that case publishing the extension will fail with a cryptic error message:

error: Failed Request: Bad Request(400) - Specified part does not exist in the package.
tfx failed with error: Error: D:\a\r1\a\node_modules\.bin\tfx.cmd failed with return code: 4294967295

Document required permissions and make them visible in the Service Endpoint screen

Still need to validate whether the below data is correct:

  • To publish an extension: all accounts, Marketplace (publish)?
  • To share an extension: all accounts, Marketplace (manage)?
  • To install an extension to an account: all accounts | specific account, Extensions (read and manage)? And/or Marketplace Acquire?
  • To read extension data from the marketplace: all accounts, Marketplace?

Same question for TFS 2017

  • To publish an extension: Marketplace (publish)?
  • To share an extension: Marketplace (manage)?
  • To install an extension to an account: Extensions (read and manage)? And/or Marketplace Acquire?
  • To read extension data from the marketplace: Marketplace?

"Extension Tag" not working if extension id is taken from manifest

In my build definition I have two steps that build the "same" package. One is intended for deploying to a test VSTS account and the other for being published to the production accounts.

To keep the build tasks simple I want to use as much information from the manifest as possible.

As the title suggests, if I don't override the extension id, the "Extension Tag" setting is ignored and the second step overrides the output vsix from the first one.

Add support for "override - BaseUri"

For local development lots of folks override the base uri to load files from a local IIS, webpack or fiddler proxy. It would be useful when the package and publish extension could override the baseUri for UI extensions.

packing results in error

since today packaging of my extension results in an error:

2018-03-10T18:08:02.0038988Z Checking tfx under: D:\a\_tools\tfx.cmd
2018-03-10T18:08:02.0059237Z Could not find tfx command. Preparing to install it under: D:\a\_tools\
2018-03-10T18:08:02.0406401Z [command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" install tfx-cli --prefix D:\a\_tools\"
2018-03-10T18:08:15.2880253Z D:\a\_tools\tfx -> D:\a\_tools\node_modules\tfx-cli\_build\tfx-cli.js
2018-03-10T18:08:15.3299156Z + [email protected]
2018-03-10T18:08:15.3300035Z added 172 packages in 12.123s
2018-03-10T18:08:15.3653212Z [command]C:\Windows\system32\cmd.exe /D /S /C "D:\a\_tools\tfx.cmd extension create --json --root D:\a\1\s\ActivityFeed.App\static --manifest-globs vss-extension.json --loc-root D:\a\1\s --publisher davesmits --extension-id VSTSActivityFeedDevelop --overrides-file "C:\Users\VSSADM~1\AppData\Local\Temp\PackageTask-0.253204.tmp" --output-path D:\a\1\s"
2018-03-10T18:08:15.3653771Z  0 [ '[command]C:\\Windows\\system32\\cmd.exe /D /S /C "D:\\a\\_tools\\tfx.cmd extension create --json --root D:\\a\\1\\s\\ActivityFeed.App\\static --manifest-globs vss-extension.json --loc-root D:\\a\\1\\s --publisher davesmits --extension-id VSTSActivityFeedDevelop --overrides-file "C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\PackageTask-0.253204.tmp" --output-path D:\\a\\1\\s"\r',
2018-03-10T18:08:15.3654608Z   '' ]
2018-03-10T18:08:15.3655621Z  1 [ '[command]C:\\Windows\\system32\\cmd.exe /D /S /C "D:\\a\\_tools\\tfx.cmd extension create --json --root D:\\a\\1\\s\\ActivityFeed.App\\static --manifest-globs vss-extension.json --loc-root D:\\a\\1\\s --publisher davesmits --extension-id VSTSActivityFeedDevelop --overrides-file "C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\PackageTask-0.253204.tmp" --output-path D:\\a\\1\\s"\r',
2018-03-10T18:08:15.3656155Z   '' ]
2018-03-10T18:08:16.8675922Z ##[warning]�[0m{
2018-03-10T18:08:16.8690662Z ##[warning]    "path": "D:\\a\\1\\s\\davesmits.VSTSActivityFeedDevelop-3.0.3007.vsix",
2018-03-10T18:08:16.8691158Z ##[warning]    "extensionId": "VSTSActivityFeedDevelop",
2018-03-10T18:08:16.8691525Z ##[warning]    "version": "3.0.3007",
2018-03-10T18:08:16.8691913Z ##[warning]    "publisher": "davesmits"
2018-03-10T18:08:16.8692246Z ##[warning]}�[0m
2018-03-10T18:08:16.8772101Z ##[error]tfx failed with error: SyntaxError: Unexpected end of JSON input

error: Received response 401 (Not Authorized)

Hi,
I’m getting the below error when trying to publish an extension. I’m using a valid newly created(today) PAT for this. Can you please check and let me know the issue? I’m getting the same error when I try to publish to on-premises TFS 2015 update3 local gallery from cmdline and also using this task.

2017-11-23T05:47:33.6546956Z Extracting archive: E:\Agent-Test_work\1\s\buildtool\ragamramachandran.build-task-0.0.10.vsix
2017-11-23T05:47:33.6546956Z --
2017-11-23T05:47:33.6546956Z Path = E:\Agent-Test_work\1\s\buildtool\ragamramachandran.build-task-0.0.10.vsix
2017-11-23T05:47:33.6546956Z Type = zip
2017-11-23T05:47:33.6546956Z Physical Size = 4953
2017-11-23T05:47:33.6546956Z
2017-11-23T05:47:33.6546956Z Everything is Ok
2017-11-23T05:47:33.6546956Z
2017-11-23T05:47:33.6546956Z Files: 6
2017-11-23T05:47:33.6546956Z Size: 6050
2017-11-23T05:47:33.6546956Z Compressed: 4953
2017-11-23T05:47:33.7794964Z [command]E:\Agents_Ext_work_tasks\PublishExtension_631511b4-50ab-47c8-b766-7ae2aa672733\1.1.44\node_modules\7zip-bin-win\x64\7za.exe a ragamramachandran.build-task-0.0.10.gen.vsix E:\Agents_Ext_work_temp\vsixeditor1171023-11684-1hhfljj.0cmn9daemi* -r -y -tzip -mx9
2017-11-23T05:47:33.8262967Z
2017-11-23T05:47:33.8262967Z 7-Zip (a) 17.01 beta (x64) : Copyright (c) 1999-2017 Igor Pavlov : 2017-08-28
2017-11-23T05:47:33.8262967Z
2017-11-23T05:47:33.8262967Z Scanning the drive:
2017-11-23T05:47:33.8262967Z 2 folders, 6 files, 5937 bytes (6 KiB)
2017-11-23T05:47:33.8262967Z
2017-11-23T05:47:33.8262967Z Creating archive: ragamramachandran.build-task-0.0.10.gen.vsix
2017-11-23T05:47:33.8262967Z
2017-11-23T05:47:33.8262967Z Add new data to archive: 2 folders, 6 files, 5937 bytes (6 KiB)
2017-11-23T05:47:33.8262967Z
2017-11-23T05:47:33.8262967Z
2017-11-23T05:47:33.8262967Z Files read from disk: 6
2017-11-23T05:47:33.8262967Z Archive size: 5376 bytes (6 KiB)
2017-11-23T05:47:33.8262967Z Everything is Ok
2017-11-23T05:47:39.0991305Z error: Received response 401 (Not Authorized). Check that your personal access token is correct and hasn't expired.
2017-11-23T05:47:39.1303307Z ##[error]tfx failed with error: Error: E:\Agents_Ext_work_tools\tfx.cmd failed with return code: 4294967295
2017-11-23T05:47:39.1303307Z ##[section]Finishing: Publish Extension
2017-11-23T05:47:39.1459308Z ##[section]Finishing: Release

image

Thanks,
Ragam

Publish task not piping out all output, the --json output is less verbose.

I am able to build and publish manually but not with the plug in.

I created the token with all scoped and then created other token with the recommended scope and still same response.

I tried publishing from the manifest and packaging up then publishing the package. Same results.

2017-12-07T01:25:26.4198066Z ##[section]Starting: Publish Extension
2017-12-07T01:25:26.4203685Z ==============================================================================
2017-12-07T01:25:26.4203986Z Task         : Publish Extension
2017-12-07T01:25:26.4204274Z Description  : Publish a Team Services extension to the Visual Studio Marketplace
2017-12-07T01:25:26.4204536Z Version      : 1.1.44
2017-12-07T01:25:26.4204769Z Author       : Microsoft Corporation
2017-12-07T01:25:26.4204994Z Help         : 
2017-12-07T01:25:26.4205240Z ==============================================================================
2017-12-07T01:25:26.8394617Z Checking tfx under: d:\a\_tools\tfx.cmd
2017-12-07T01:25:26.8429052Z Could not find tfx command. Preparing to install it under: d:\a\_tools\
2017-12-07T01:25:27.4034049Z [command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" install [email protected] --prefix d:\a\_tools\"
2017-12-07T01:25:51.0639172Z npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
2017-12-07T01:26:37.3044560Z npm WARN deprecated [email protected]: Use uuid module instead
2017-12-07T01:27:12.9307278Z d:\a\_tools\tfx -> d:\a\_tools\node_modules\tfx-cli\_build\tfx-cli.js
: Received response 401 (Not Authorized). Check that your personal access token is correct and hasn't expired.
{
    "manifestVersion": 1,
    "id": "build-task",
    "name": "Build Task",
    "version": "0.9.9",
    "publisher": "mypublisher",
    "targets": [
        {
            "id": "Microsoft.VisualStudio.Services"
        }
    ],    
    "description": "Tools for building with Fabrikam. Includes one build task.",
    "categories": [
        "Build and release"
    ],
    "icons": {
        "default": "images/extension-icon.png"        
    },
    "files": [
        {
            "path": "buildtask"
        }
    ],
    "contributions": [
        {
            "id": "custom-build-task",
            "type": "ms.vss-distributed-task.task",
            "targets": [
                "ms.vss-distributed-task.tasks"
            ],
            "properties": {
                "name": "buildtask"
            }
        }
    ]
}

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.