Upload Markdown files to Wiki as part of Azure DevOps Pipeline - azure-devops

As part of an Azure Pipeline to build a Python package and store it in Azure Artifacts I'm generating a lot of .md files from the docstrings as documentation for the package. I'd like to add a step to my pipeline to automatically upload those to the Azure DevOps Wiki. Is this possible? From the official documentation I could only find a way to do it manually from a folder in the repo.

I ended up cloning the wiki repository and subsequently adding and committing the generated files as part of the pipeline step.

You can use Rest Api to update Wiki pages: Pages.
Here you can find a sample with PowerShell: https://github.com/ashamrai/AzureDevOpsExtensions/blob/master/CustomPSTasks/UpdateWikiPage.ps1

Related

Publish Doxygen docs to Azure DevOps

Our release pipeline is generating some HTML docs (currently via Doxygen) every time a PR is merged to master.
As we use Azure Dev Ops it would be nice to publish the docs there (in the Wiki perhaps?).
What is the easiest/most proper way to do that?
In azure Dev Ops you can publish a wiki from git files. See:
https://learn.microsoft.com/en-us/azure/devops/project/wiki/publish-repo-to-wiki?view=azure-devops&tabs=browser#publish-a-git-repository-to-a-wiki-1
This would require to know up front the files that will be created by doxygen so that they can be commited by your doxygen pipeline.

'Centralized' wiki and repo in azure devops?

Living years in confluence+centralized git (bitbucket+github), recently coming to a small shop on MS azure devops, where the repo and wikis scattered between hundred of projects which impossible to find. Would it be a way to structure the azuredevops to make it more 'confluence' like?
Thanks
Would it be a way to structure the azuredevops to make it more 'confluence' like?
I am afraid there is no such a way to structure the azuredevops to make it more 'confluence'.
As we know, the Azure devops is a project-oriented product. Both the repo and the Wiki are based on one project. We can include multiple repo and wiki in a project, but cannot create a repo or wiki for multiple projects.
The workaround is that we could clone Wiki to the target project and Publish the code as wiki, you could check following thread for some more details:
Azure DevOps Wiki for multiple projects

Is there an equivalent of GitHib releases in Azure DevOps?

Simply speaking, does Azure Devops have something that works very close to GitHub releases?
I would like to publish artifacts that are created during an Azure DevOps pipeline so that they be easily viewed and downloaded afterwards in a central location. The closest equivalent to what I'm looking for is how GitHub releases work, where there is a web page listing out all the versions of the repository and the assets that can be downloaded for each version.
It seems to me that published artifacts within Azure DevOps pipelines are always tied to the run of the pipeline, and there isn't an easy way to see one list of artifacts that have been created in a historical view like GitHub releases provides, but maybe I'm missing something.
Azure Artifacts does not meet my needs because it is tied to particular packaging formats and is meant to be used for developer tooling.
I would like to publish artifacts that are created during an Azure
DevOps pipeline so that they be easily viewed and downloaded
afterwards in a central location.
As a workaround ,you can switch Artifact publish location to A file share in Publish Pipeline Artifacts task then specify your network drive folder path.
Specifying the path to the file share where you want to copy the files. The path must be a fully-qualified path or a valid path relative to the root directory of your repository. Publishing artifacts from a Linux or macOS agent to a file share is not supported.
Besides, there should be no other built-in hosting, I am afraid that Azure Artifact is the closest to your needs. because it is tied to particular packaging formats you can consider using Universal Packages.

Does TFS has releases tab like we have at GitHub Releases

I am looking for hosting .exe files in Azure Devops. It seems to don't have feature similar to how we host executable or build files in GitHub for other people to download. Do we have such kind of feature to host the executables and have the latest commit tagged?
You can try publishing the executable or build files as Build Artifacts in Azure devops build pipeline.
You can create a pipeline in azure devops and using Publish build artifacts task to store the executable or build files in azure pipeline
See example here to create a classic azure pipeline. See Here for yaml pipeline example.
When you run the pipeline. You will see the commit hash and the files uploaded in the highlighted field of the build summary page shown in below screenshot. And you download the files from there.
You can retain this artifacts by Clicking retain in the pipeline run. See below
You can also change the retention policy for your pipeline. See here for more information.
Go the Project settings page-->Settings under Pipeline. See below:

Include markdown files in another Readme.md in Azure Devops

In Azure Devops, there is the possibility to view Readme.md files, but I would like to include/merge some text from another .md-file into that document. Or perhaps combine them in a wiki.
I am not able to find documentation on doing these kind of operations.
I have heard of tools like Pandoc and Sphinx, but I am not sure if Azure Devops supports that on their web app.
Markdown syntax supports include other md files [link text](file-name.md), however these files can only be rendered as links.
It seems azure devops does not support pandoc or sphinx, for I could not find any related extensions on azure devops marketplace.
There is a suggestion that you can build your README.md file using pandoc to include/merge other md files, or other methods mentioned in the thread #eskwayrd commented, before you commit to your repo.