Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3116

Preparing an agent for the job. Agent not running on Devops

$
0
0

I have a dev ops pipeline that used to work, so that when I push my source code the project builds.

I am using the hosted agents.

However at the moment I get a message

Preparing an agent for the job

An agent is ready for the job Connecting...

An agent is ready for the job

and nothing further happens. If I click Summary I can see that the Build pipeline has not started.

I think that it may have to do with a 3rd party custom nuget package source being offline and am wondering steps to troubleshoot.

Here is the azure-pipelines.yml

    pool:
  vmImage: 'VS2017-Win2016'

variables:
  buildConfiguration: 'Debug'

steps:
- task: DotNetCoreInstaller@0
  displayName: 'Use .NET Core sdk 2.1.5'
  inputs:
    version: 2.1.403


- task: NuGetToolInstaller@0

- task: NuGetCommand@2
  inputs:
    restoreSolution: '**\*.sln'
    feedsToUse: config

    nugetConfigPath: 'MyApi/mynuget.config'


- task: DotNetCoreCLI@2
  displayName: Restore
  inputs:
    command: restore

    projects: '**/Api*.csproj'




#Your build pipeline references an undefined variable named ‘Parameters.projects’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
- task: DotNetCoreCLI@2
  displayName: Build
  inputs:
    projects: '$(Parameters.projects)'

    arguments: '--configuration $(BuildConfiguration)'


#Your build pipeline references an undefined variable named ‘Parameters.projects’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971

- task: DotNetCoreCLI@2
  displayName: Publish
  inputs:
    command: publish

    publishWebProjects: false

    projects: '$(Parameters.projects)'

    arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'

- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact'
  inputs:
    PathtoPublish: '$(build.artifactstagingdirectory)'

Here is mynuget.config ( obfuscated)

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageRestore>
    <add key="enabled" value="True" />
    <add key="automatic" value="True" />
  </packageRestore>
  <activePackageSource>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
  </activePackageSource>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="3rdparty" value="http://nuget.devweb.3rdparty/nuget" />
    <add key="SBDCommonFeed@Local" value="https://pkgs.dev.azure.com/myproject/_packaging/myfeedFeed@Local/nuget/v3/index.json" />
    <!-- Others -->
  </packageSources>
  <packageSourceCredentials>
    <!-- secret stuff -->
  </packageSourceCredentials>
</configuration> 

I tried commenting out the 3rd party package source in mynuget.config but it did not help.


Viewing all articles
Browse latest Browse all 3116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>