Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it able to ignore/disable the first step Get source in vNext Build?

Here is our situation-- sometimes we need to run a vNext build without needing to pull any source code from TFS server.

But we don't want to change the workspace mappings. Is there a related setting simply ignore or disable the get source step in the build definition. Unlike any other task, the "Get sources" task added automatically when you create a new build definition, which is not able to disable or remove the task by right click it.

Any suggestion appreciated!

like image 630
Tomhans.J Avatar asked Sep 26 '17 08:09

Tomhans.J


2 Answers

Update:

Now you should use below to avoid syncing sources at all:

Classic Editor: agent.source.skip=true

YAML:

steps:
- checkout: none

It's not able to directly disable/remove the Get Sources task. However, you could add a variable to achieve it:

Build.SyncSources = false

enter image description here

You can see from below screenshot, the Get Sources operation started and finished without fetching the data from TFS version control

enter image description here

Note: This variable works with TFS 2017 and above/VSTS vNext builds.

More detail info please take a look at this helpful blog.

like image 164
PatrickLu-MSFT Avatar answered Oct 23 '22 04:10

PatrickLu-MSFT


I tried using agent.source.skip = true (instead of Build.SyncSources = false),

and it seems to keep the variables.

Found here: https://github.com/Microsoft/azure-pipelines-agent/issues/1465

like image 38
itsho Avatar answered Oct 23 '22 02:10

itsho