0

I'm new to Azure-Pipeline and struggling to put together a C++ oriented pipeline that uses camke which properly compiles, run tests and build documentation on Ubuntu, macOS, and Windows.

I managed the macOS and Ubuntu cases rather easily but am struggling with the Windows case not knowing what's installed and what's in system PATH for the given image & container I've selected.

Not being super familiar with the Azure-Platform I'm basically relying on commit-push-run-pipeline every single little change to my YAML file thus wasting time and resources.

I can't imagine that the only way is to blindly try out commands by commit, push and run the pipeline.

I managed to find a basic description of the currently (hopefully) available images here following the included software link for Windows link yoou end up on a comprehensive list of what's supposedly installed (I have some doubts on whether this documentation actually matches the content of the image). Calling some of those tools like cmake and choco, present in the above list, failed. Whether or not they're actually installed and in system PATH I have no idea.

Q1: Is there any way to locally test out an Azure-Pipeline YAML? Q2: Is there any way to figure what is actually installed on a given image/container (without issuing a DIR /s from the root folder??) Q3: Is it possible to connect to a running container (or is it a VM???) instance and directly tinker with it? Q4: Alternatively, is it possible to run such an image locally (Docker)? Does it imply execution on a Windows machine or is that a standalone VM image?

EDIT: Found out about this question, although doesn't quite answer mine: Is there a tool to validate an Azure DevOps Pipeline locally?

Rastikan
  • 517
  • 5
  • 18
  • Not quite @LeoLiu-MSFT ultimately what I did, and really wanted, was to install Docker for Windows and download the actual image *windows-2019*. It wasn't as much as self-hostling an agent as much as having an easier way to tinker with the available tools and setup in a truly interactive way. Jenkins has [Script Console](https://www.jenkins.io/doc/book/managing/script-console/), it isn't always ideal but it's something. I understand Azure-Pipeline used to have something such. Is there any plan to bring this back? – Rastikan Feb 06 '21 at 11:22
  • 1
    AFAIK, there seems to be no such plan at this moment. – Leo Liu Feb 08 '21 at 09:36

1 Answers1

1

Q1: Is there any way to locally test out an Azure-Pipeline YAML?

The answer is yes. You could create your private agent to execute the Azure-Pipeline YAML.

Self-hosted agents

Q2: Is there any way to figure what is actually installed on a given image/container (without issuing a DIR /s from the root folder??)

Just as you know, we could check the document Software for the software installed on the agent. If you want to know the install the path of some software, you could check the debug log from the build task. For example, cmake. We could check the build log from the cmake task:

enter image description here

Q3: Is it possible to connect to a running container (or is it a VM???) instance and directly tinker with it?

For the hosted agent, I am afraid the answer is not.

Q4: Alternatively, is it possible to run such an image locally (Docker)? Does it imply execution on a Windows machine or is that a standalone VM image?

The answer is yes, we could Run a self-hosted agent in Docker. And it imply execution on a Windows machine.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135