task-lib | A Task implementation for JavaScript | Runtime Evironment library
kandi X-RAY | task-lib Summary
kandi X-RAY | task-lib Summary
A Task implementation for JavaScript
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of task-lib
task-lib Key Features
task-lib Examples and Code Snippets
Community Discussions
Trending Discussions on task-lib
QUESTION
If at all possible, how can one define a custom source for the "Where is your code" selection in Azure DevOps?
Purely for example, say I wanted to use GitLab as my source. Given that no current extensions exist in the marketplace that do this, how could someone go about defining one that adds a custom source for Azure DevOps Pipelines?
While it is true that one could store the pipeline definition in one location and use a "checkout" task to clone the code itself, such a technique causes some functionality to be lost (build status reporting, for example).
Additionally, while using "Other Git" allows one to connect to any git repository, it has its own issues:
- You would need to create a custom service connection per repository. This is not sustainable given a large number of repositories.
- You still will have the issues found when storing the pipeline definition in one place and checking out a specific repository: loss of build status reporting, PR/merge decoration, etc.
I have looked around Microsoft's documentation websites, as well as the various repositories like the Azure DevOps Task Lib, but I have not found anything that even states if this is possible.
Update Feb 17, 2020As per the answer below, this is not possible today (Feb 17, 2021). I have opened a corresponding User Voice idea: Custom code sources for Azure DevOps Pipelines
...ANSWER
Answered 2021-Feb-16 at 07:57how can one define a custom source for the "Where is your code" selection in Azure DevOps
For this issue, I am afraid that this is currently not possible in azure devops. If you want to select a custom code source for the pipeline, then you cannot avoid creating gitlab service connections. Currently azure devops only provides the option "Other Git" to choose from.
As a workaround , you can try to create repository mirroring. Repository mirroring allows for mirroring of repositories to and from external sources. It can be used to mirror branches, tags, and commits between repositories.
Push: for mirroring a GitLab repository to another location.
In addition, you could add your request for this feature on our UserVoice site , which is our main forum for product suggestions.After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.
QUESTION
I develop all our task extensions in PowerShell
, now I start to translate my first extension into TypeScript
. The extension is a small task which should run in build or release pipelines. The task should get deployed to a Azure DevOps Server 2020.1 (on prem).
- I follow the tutorial create a custom pipelines task and build a sample app with it
- I clone the ansible task extension and checkout the programming style
ANSWER
Answered 2021-Jan-08 at 06:08is there a way to debug an azure devops task extension?
Yes, According to the Step 1 in the article "Add a custom pipelines task extension", after installing all the required libraries and dependencies and adding all the required task implementation files, you can compile and run the task with PowerShell
or other shells. By default, the task is run with debugging mode. See the example I share below.
is it possible to pass parameter and load them via tl.getInput?
Sure, you can pass the value of tl.getInput
as an parameter. See the example I share below.
is there a state of the art or a complete guideline how to develop azure devops task extension?
Currently, the Microsoft Docs about DevOps extensions is the best guide for us to develop DevOps extensions.
Follow your case, I also test on my side, below are the main source code I use:
- task.json
QUESTION
I have task that runs a functional test
...ANSWER
Answered 2020-Dec-16 at 12:21The problem was, that I build not whole dependencies.
QUESTION
I have tried to create two different zip for each project by adding two vsBuild tasks.
While writing my yaml based pipeline I am facing two issue:-
- In webjob project path is
DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\App_Data\jobs\continuous\somethingApp.zip"
but nothing is getting added into it.
2 When I am deploying it azure app service, during deployment of my web app I am facing below error:
...ANSWER
Answered 2020-Nov-27 at 06:42The key to the problem, I think it should be a path configuration problem, unable to access your webjob application.
So I suggest you create a virtual application in portal.
For more details, you can refer to this blog. If you need further help, please let me know.
How to publish webjob from azure devops to azure app service using Azure app service deploy task
QUESTION
I am trying to build an android app using a yaml pipeline. The gradle build task is complaining that it can't find the android sdk root. I've tried both the local.properties file and the environmental variable ANDROID_SDK_ROOT, and neither work. This is my build pipeline:
...ANSWER
Answered 2020-Oct-12 at 07:34You can set environmental variables in azure pipeline by defining it in the Variables section. You can add below to your yaml pipeline.
QUESTION
I was running Azure Pipeline build for react native app in which i am using gradle for android build and got this error:
...ANSWER
Answered 2020-Apr-22 at 13:42It worked after change in local.properties file from:
QUESTION
We have implemented Jacoco in our Android Kotlin project which we can call locally via ./gradlew clean build jacocoTestReport
However, when we deploy to VSTS/Azure DevOps it errors with:
...ANSWER
Answered 2019-Mar-05 at 07:31I could not get the actual gradle process to create the reports so I found a work around
- Set the gradle task to "build jacocoRootReport"
- Use the "Publish Code Coverage Results" task (set up to use Jacoco)
QUESTION
I am doing on premise deploy with Azure DevOps and I got this error as below. I am deploying this on the windows 10 pro machine. Could any help on this would be great help. As I have tried to find some solution but could not find.
...ANSWER
Answered 2020-Apr-15 at 12:27I got the solution we need to remove the webdeploy 4.0 and downgrade to webdeploy 3.6 and then its working well.
QUESTION
In the link to the custom task, below, you'll see several pickList fields; one for the service endpoint, two for environment and command, which are static lists in the task.json, and then a fourth. This one, I need to be populated with a list of items dependent on the selection of the environment, but there is no (functioning) endpoint I can bind this input to in order to get that list. There is, however, a CLI command I can run to do this.
I've found plenty of documentation, and forum answers, on how to use the connectedService type to populate a pickList, but none on how to do it without a service endpoint. In addition, there is no "setInput" equivalent in the Azure-Pipelines-Task-Lib TypeScript API.
Is this even possible with custom tasks, at this point? If so, what are some options that I can look into?
...ANSWER
Answered 2020-Mar-09 at 07:08Is this even possible with custom tasks, at this point? If so, what are some options that I can look into?
I am afraid this is impossible to create a custom task to dynamically populate a pickList input without service endpoint.
As we know, service endpoint provides the URL, authentication info to make the calls. Without that, we could not get the HTTP Get call. That the key point of this issue.
Besides, Azure devops currently don't support data source bindings to associate to task input to query a public URL. MS will consider adding this support going forward.
You could add your request for this feature on our UserVoice site (https://developercommunity.visualstudio.com/content/idea/post.html?space=21 ), which is our main forum for product suggestions. Thank you for helping us build a better Azure DevOps:
Hope this helps.
QUESTION
In the Azure Pipelines task library, there is a call to path.resolve() via apply() that I don't really understand:
...ANSWER
Answered 2020-Feb-24 at 08:28The .apply()
method on any function gives you two features:
- It lets you set the
this
value when the function is called. - It lets you pass an arbitrary array of arguments that will be unpacked into actual arguments (not in an array) when the function is called.
In this case, it is likely feature #2 that it is being used for here because path.resolve()
accepts an arbitrary number of arguments. If you're not using the latest versions of node.js or coding to a lower level of Javascript support and thus don't have the spread operator, then .apply()
would be the natural way to pass an arbitrary number of arguments to a function when the arguments were passed to you in an array.
If you look at the source for the path
module and find the code for the resolve()
function, you will find that it does not use a this
value at all so the path
object is used ONLY as a namespace object. Thus, you can send any value of this
you want into the resolve function and it will make no difference.
So, probably, the code is using .apply()
not so that it can set the value of this
, but so that it can pass an arbitrary array of arguments to the function.
But I'm at a loss as to what is the effect of calling via apply rather than just calling path.resolve() directly. Can anyone explain?
If you showed us more of the surrounding code, we could answer with more certainty, but it seems likely that the pathSegments
variable is already an array of path values that this code wants to pass to path.resolve()
. If that's an arbitrary array, then the two simplest ways to pass that array as separate arguments to path.resolve()
are:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install task-lib
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page