Can't delete or rename wiki article in Azure DevOps - azure

After migration from Confluence to Azure DevOps I can't delete or rename articles containing dots.
I already tried this api to delete an article , but it didn't work.
Error:
The wiki page operation failed with message : The page name cannot start or end with a "." and cannot contain the following characters /, \. Parameter name: pageName

You can try azure devops cli to see if this works.
To edit a wiki page, enter the az devops wiki page update command.
az devops wiki page update --path
--version
--wiki
To delete a wiki page, enter the az devops wiki page delete command.
az devops wiki page delete --path
--wiki
For details ,please refer to this document.

Related

How to configure appsettings on a auto-generated preview environment

How can I change the appsettings on the preview environemnts that are generated by the Azure Static Web Apps CI/CD Github Action for each pull request?
I can go to the portal, navigate to the generated environment and change its appsettings. Doing this manually for each new pull request is error prone and will become tedious really fast.
I couldn't find any reference to this in the Build Configuration For Azure Static Webapps docs so I'm assuming it can't be configured that way.
I also couldn't find any reference to SWA environments in the CLI docs.
I looked into deployment environments but it looks like this is some other kind of deployment environment as it keeps mentioning devcenter.
In Azure Portal, While Creating Static Web App, after providing the GitHub Repo and Branch details, we will get an option to preview the Workflow file.
I can go to the portal, navigate to the generated environment and change its appsettings
Yes, In Configuration Section we have an option to add the App settings. But it is a manual work, which is not advised to follow.
Once we click on Review + create and create the Static Web App, a new folder with name .github/workflows will be created in the GitHub Repository.
It contains the same workflow file (preview file), which we saw while creating the Static WebApp in Azure Portal.
We can edit the Workflow manually.
To update the appsettings/configurations in the workflow, we can specify the steps in the existing workflow file.
We can use either Powershell/Azure CLI commands to update the Appsettings.
az staticwebapp appsettings set --name YourStaticWebAppname --setting-names "message=HelloEveryOne"
***Sample code for Updating App settings: ***
Before Build and deploystep in Workflow, add the below steps.
- name: Build And Deploy
- run : Your Update appsettings Script
To edit the Workflow file, click on the .github/workflow => .yml file
References taken from MSDoc 1 and 2.
Update
As per the discussion in GitHub, adding appsettings to the preview environment is not currently supported in the default Azure Static Web Apps CI/CD.
Setting appsettings on a specific environment is not currently supported in the Azure Static Web apps CI/CD nor by the Azure CLI.
There is a discussion in GitHub about it.

How to create local file link in description section of work item within Azure Devops?

I am trying to create a link to a local file within the description section of a task in Azure DevOps.
I have tried using the extension file:///H:\Documents\test.xlsx The link appears as a hyperlink, however it is not clickable.
How to create local file link in description section of work item
within Azure Devops?
I am afraid this is not achievable in Azure devops. The description section of the work item cannot add the link associated with the local file.
You can attach local files as attachments to work item.
Choose the Attachment tab icon to attach a file with supplemental information.

Error when deploying custom template in Azure from Azure DevOps repo ("deploy to azure" button)

All,
I'm trying to use the "deploy to Azure" button, using a template stored in Azure DevOps Git repo.
I'm receiving the following error:
Error parsing template. Please ensure template is valid JSON. Invalid symbol at character position 4. (3 other errors).
I created the URL following what is described in https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-to-azure-button.
My structure is the following:
Azure DevOps organization = MyOrganization and project is myProject
Repo is myRepo, and the template file is on branch myBranch, located at myFolder/myTemplate.json.
At the end, the URL looks like
https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fdev.azure.com%2F{myOrganization}%2F{myProject}%2F_apis%2Fgit%2Frepositories%2F{myRepo}%2Fitems%3Fpath%3D%2F{myFolder}%2F{myTemplate}.json%26versionDescriptor.version%3D{myBranch}%26versionDescriptor.versionType%3Dbranch%26api-version%3D6.0
Copy/pasting this URL in a browser returns the above error...
I believe my JSON file is correct (no error) because it works fine in the following two situations:
if using the same JSON template file with Azure CLI (az deployment groupe create --template-file <myJSONtemplatefile> --parameters <myJSONparametersfile>
if copy/pasting the JSON template file in Azure portal for custom deployment at https://portal.azure.com/#create/Microsoft.Template
I don't get what is the reason of the Error parsing template...
Found!
Issue was due to the fact that the AzDO repo is private, and not public.
This was clearly stated in Microsoft documentation, but I missed it... (bolding word is mine)
If you're using Git with Azure Repos instead of a GitHub repo, you can still use the Deploy to Azure button. Make sure your repo is public. Use the Items operation to get the template.
With a public AzDO repo, everything works like a charm.

Tag Azure DevOps Agents when deploying to an Environment VM Resource

I want to install an azure agent onto my VM and have it appear as an Environment resource as described here: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/environments-virtual-machines?view=azure-devops .
This works if you run the script interactively, however when I use --unattended (as described here: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops#unattended-config ) there is no longer a way to specify tags. The --addDeploymentGroupTags option doesn't work with Environment agents.
How do I automate the adding of a VM as an environment resource with tags?
I had a look at the source code and figured out there is an undocumented way to do this. Just use the following commands:
--addvirtualmachineresourcetags --virtualmachineresourcetags "<tag>"
According to the official doc , the “interactive PS registration script” supports to add the environments tags. This document doesn’t mention adding tags in “Unattended config” mode.
You can add tags to the VM as part of the interactive PS registration script. You can also add or remove tags from the resource view by clicking on ... at the end of each VM resource on the Resources tab.
We could simply run .\config.cmd --help to check the help info of this command in PowerShell.
It only mentions how to add a “deploygroup tag” through an option. Not any info related to tag of VM resource in environment.
I'm afraid this is not available to add tags to Environment VM resource in “Unattended config” mode.

No option to copy artifacts download URL in new Azure DevOps Builds

How can I copy artifacts download URL in new Azure Devops Builds?
Currently there is no option to directly copy the download url of artifacts. From the page, we can only download it by clicking the download button.
To solve this issue, we need to press F12 in the browser then select Network to capture the download url .
Directly using the api captured in the above image, I can successfully download the artifact.
You can try to construct your own link with format:
https://devops.azure.com/{org_name}/{team_project_name}/_apis/build/builds/{build_id}/artifacts?artifactName={artifact_name}&api-version=5.1&%24format=zip
{org_name} - name of your azure devops account
{team_project_name} - name of team project where your build runs
{build_id} - id of your build that contains your files to download. You can find it in the link:
{artifact_name} - name of your artifact (by default drop). You van find it in the published artifacts:

Resources