MicrosoftPremier / VstsExtensions

Documentation and issue tracking for Microsoft Premier Services Visual Studio Team Services Extensions
MIT License
56 stars 14 forks source link

Is there a json schema for VSCode's extension Azure Pipelines #173

Closed eholman closed 2 years ago

eholman commented 2 years ago

Hi,

I've installed the Azure Pipelines extension in VS Code and there are warnings regarding the BuildQualityCheck task.

image

I don't have the knowledge to say how the Task got available in the Pipeline editor in Azure Devops, is it default or an installed marketplace thing? Anyway, the Task is editable over there. In VS Code it's not being recognized and this message is shown:

DotNetCoreCLI is deprecated - Build, test and publish using dotnet core command-line.

PowerShell

Run a PowerShell script on Linux, macOS, or Windows

String does not match the pattern of "^PowerShell@2$".
Value is not accepted. Valid values: "PowerShell@2", "PowerShell@1", "AzurePowerShell@4", "AzurePowerShell@2", "AzurePowerShell@5", "AzurePowerShell@3", "AzurePowerShell@1", "MysqlDeploymentOnMachineGroup@1", "PipAuthenticate@0", "PipAuthenticate@1", "Maven@2", "Maven@1", "Maven@3", "DotNetCoreCLI@2", "DotNetCoreCLI@0", "DotNetCoreCLI@1", "XamarinComponentRestore@0", "ManifestGeneratorTask@0", "AzureRmWebAppDeployment@3", "AzureRmWebAppDeployment@2", "AzureRmWebAppDeployment@4", "PowerShellOnTargetMachines@3", "PowerShellOnTargetMachines@1", "PowerShellOnTargetMachines@2", "PublishCodeCoverageResults@1", "RunVisualStudioTestsusingTestAgent@1", "ManualIntervention@8", "InstallAppleProvisioningProfile@1", "InstallAppleProvisioningProfile@0", "SonarQubePostTest@1", "PyPIPublisher@0", "ChefKnife@1", "GoTool@0", "XcodePackageiOS@0", "Go@0", "PublishPipelineMetadata@0", "Docker@0", "Docker@2", "Docker@1", "JenkinsQueueJob@1", "JenkinsQueueJob@2", "FtpUpload@2", "FtpUpload@1", "WindowsMachineFileCopy@1", "WindowsMachineFileCopy@2", "AndroidBuild@1", "TwineAuthenticate@0", "TwineAuthenticate@1", "IISWebAppDeploymentOnMachineGroup@0", "PythonScript@0", "HelmInstaller@0", "HelmInstaller@1", "XamarinLicense@1", "NuGetAuthenticate@0", "ComponentGovernanceComponentDetection@0", "DownloadGitHubNugetPackage@1", "MavenAuthenticate@0", "ReviewApp@0", "JavaToolInstaller@0", "Chef@1", "AzureFunctionApp@1", "npmAuthenticate@0", "MSBuild@1", "PackerBuild@1", "PackerBuild@0", "NuGetPackager@0", "ServiceFabricUpdateAppVersions@1", "ServiceFabricUpdateManifests@2", "DuffleInstaller@0", "AzureMonitor@1", "AzureMonitor@0", "AzureNLBManagement@1", "ApacheJMeterLoadTest@1", "DockerCompose@0", "AzureMonitorAlerts@0", "XamarinTestCloud@1", "ServiceFabricDeploy@1", "Xcode@3", "Xcode@4", "Xcode@5", "Xcode@2", "NuGetPublisher@0", "queryWorkItems@0", "AzureWebAppContainer@1", "SqlDacpacDeploymentOnMachineGroup@0", "Cache@2", "CacheBeta@0", "CacheBeta@1", "CMake@1", "AppCenterTest@1", "VSMobileCenterTest@0", "DownloadSecureFile@1", "UseRubyVersion@0", "Grunt@0", "SqlAzureDacpacDeployment@1", "ContainerStructureTest@0", "IISWebAppDeployment@1", "CloudLoadTest@1", "KubectlInstaller@0", "CmdLine@2", "CmdLine@1", "NuGet@0", "ContainerBuild@0", "NuGetRestore@1", "NuGetInstaller@0", "NuGetCommand@2", "Delay@1", "XamariniOS@1", "XamariniOS@2", "PublishTestResults@1", "PublishTestResults@2", "AzureFileCopy@2", "AzureFileCopy@1", "AzureFileCopy@4", "AzureFileCopy@3", "PublishSymbols@1", "PublishSymbols@2", "CopyFilesOverSSH@0", "Gradle@1", "Gradle@2", "Gradle@3", "AppCenterDistribute@2", "AppCenterDistribute@3", "AppCenterDistribute@1", "AppCenterDistribute@0", "NuGetToolInstaller@0", "NuGetToolInstaller@1", "JenkinsDownloadArtifacts@1", "AzureFunctionAppContainer@1", "DecryptFile@1", "HelmDeploy@0", "InstallAppleCertificate@1", "InstallAppleCertificate@2", "InstallAppleCertificate@0", "AzureFunction@0", "AzureFunction@1", "nuget-security-analysis@0", "DownloadGitHubRelease@0", "SSH@0", "PublishPipelineArtifact@0", "PublishPipelineArtifact@1", "SonarQubePreBuild@1", "DownloadFileshareArtifacts@1", "Kubernetes@0", "Kubernetes@1", "AzureIoTEdge@2", "ServiceFabricComposeDeploy@0", "AndroidSigning@1", "AndroidSigning@2", "AndroidSigning@3", "DownloadPipelineArtifact@0", "DownloadPipelineArtifact@2", "DownloadPipelineArtifact@1", "UsePythonVersion@0", "accessibility-insights@1", "ServiceFabricPowerShell@1", "VSTest@1", "VSTest@2", "ManualValidation@0", "Ant@1", "DeployVisualStudioTestAgent@2", "DeployVisualStudioTestAgent@1", "CondaEnvironment@0", "CondaEnvironment@1", "BatchScript@1", "DownloadGithubNpmPackage@1", "VSBuild@1", "AzureKeyVault@1", "AzureKeyVault@2", "UseDotNet@2", "DotNetCoreInstaller@0", "DotNetCoreInstaller@1", "AzureAppServiceManage@0", "FuncToolsInstaller@0", "FileTransform@1", "FileTransform@2", "ExtractFiles@1", "XamarinAndroid@1", "ManifestGeneratorTask@0", "CopyPublishBuildArtifacts@1", "DownloadPackage@0", "DownloadPackage@1", "AzureResourceGroupDeployment@1", "AzureResourceGroupDeployment@2", "AzureResourceManagerTemplateDeployment@3", "InvokeRESTAPI@0", "InvokeRESTAPI@1", "ArchiveFiles@1", "ArchiveFiles@2", "GitHubComment@0", "CopyFiles@2", "CopyFiles@1", "AzureMysqlDeployment@1", "Npm@0", "Npm@1", "DropValidatorTask@0", "AzureStaticWebApp@0", "NodeTool@0", "UseNode@1", "SqlServerDacpacDeployment@1", "VisualStudioTestPlatformInstaller@1", "PublishToAzureServiceBus@0", "PublishToAzureServiceBus@1", "KubernetesManifest@0", "DownloadBuildArtifacts@0", "DownloadBuildArtifacts@1", "CocoaPods@0", "AzureSpringCloud@0", "AzureWebApp@1", "AzureCLI@2", "AzureCLI@1", "AzureCLI@0", "GitHubRelease@1", "GitHubRelease@0", "cURLUploader@1", "cURLUploader@2", "AzureAppServiceSettings@1", "UniversalPackages@0", "AzurePolicyCheckGate@0", "AzureFunctionOnKubernetes@0", "ShellScript@2", "Bash@3", "PublishBuildArtifacts@1", "InstallSSHKey@0", "AzureVmssDeployment@0", "AzureWebPowerShellDeployment@1", "AzureCloudPowerShellDeployment@1", "DeleteFiles@1", "gulp@1", "gulp@0", "QuickPerfTest@1", "IISWebAppManagementOnMachineGroup@0", "DockerInstaller@0".

There is a possibility to add json schemes to the extension, for custom tasks, so I thought let's add that. But where is it? Is it somewhere? Or should the Task be added to the default supported list of tasks?

image

ReneSchumacher commented 2 years ago

Hi @eholman,

you found the right spot in the documentation of the Azure Pipelines extension for Visual Studio Code.. You first need to ensure that all custom extensions/tasks are already installed in your organization, so that it can be included in the custom schema. Once that is done, just open the URL shown in the docs and save the output JSON file somewhere on your machine. In my case, I put it in a synchronized folder one OneDrive so the schema moves with me. You can then configure the schema location in the Visual Studio Code settings section for Azure Pipelines:

image

Keep in mind that when you open a YAML file, Visual Studio Code by default just uses the YAML language mode which is not very helpful for Azure Pipelines. You can check the language mode in the lower right corner of Visual Studio Code's status bar.

image

To change the language mode, click the YAML indicator in the status bar and change to Azure Pipelines. I'd recommend configuring Visual Studio Code to automatically use the Azure Pipelines extension for specific files/locations as shown below.

image

Does that help?

eholman commented 2 years ago

Aaah I understand now, the result of the constructed URL indeed gives me the BuildQualityChecks task in the complete schema! I thought I had to add schemas per custom task. I feel a bit dumb now 😄 Thank you!

ReneSchumacher commented 2 years ago

No need to feel stupid, the documentation could be better 😉 Glad I could help.