How can I upload a file to Azure Artifacts from my powershell console using Azure DevOps REST Api? - azure-devops

I want to upload a file to Azure Artifacts using the Rest API. Can I do it?
We use on-prem Azure DevOps Server 2019.
Please, note that it is not a nuget or an npm package. It is just a file.

It is not a nuget or an npm package. It is just a file.
If what you want to upload is files instead of packages, in Azure devops, I'm afraid only Universal package can available for files to stored.
BUT, what the issue is Universal package does not supported for Azure devops server. It only support in azure devops service now.
In our official forum, there has such suggestion raised to request for this feature added in Azure devops server/TFS. You can vote and share your demand there to raise its priority. Our product group will review it regularly to consider take some features into develop plan.

Related

Using Jira as Board and Azure Devops as CI/CD

Have you ever tried to use Jira as development board and Azure DevOps as repository + CI/CD Pipelines?
I was wondering if it is possible to link to Jira tasks the results of Azure pipelines deployments and builds, i found this plugin but reviews say is not working properly recently.
EDIT
Using the mentioned plugins seems the right way although they are not working properly at the moment. I will try to contact the support as suggested.
According to your description, you can try to use the plugin for Azure DevOps.
Then you can use the flow: Jira -> GitHub -> Azure Pipelines CI -> Azure Pipelines CD.
For more information, you could refer to the Azure Pipelines integration with Jira Software.

How to use ClickOnce custom prerequisites with Azure DevOps Pipelines

We have a ClickOnce application we try to deploy with Azure DevOps pipelines.
We have figured the deployment process out with creating manifests and signing them.
The problem is now we want to also use the prerequisits option of ClickOnce with some custom packages.
After reading the docs we created a custom bootstrapper package and it was displayed in Visual Studio. When we publish the app with Visual Studio the custom package is added. But if we use it on the DevOps pipelin it's ignored. This makes sense because the build server doesn't know the custom package.
For example one prerequisit is the Microsoft OLE DB Driver for SQL Server.
One Idea maybe would be to not use the option "Download prerequisites from the component vendor's web site", but host the exe/msi files ourselves and link to them.
Another option could be this support URL for individual prerequisites but here I don't know how to set this to other applications.
Does somebody have an idea how custom prerequisites with ClickOnce can be added to a Azure DevOps build server/pipeline?
You could try to use Azure cli to upload the package(with its setup.bin file) to Azure DevOps artifact feeds
as universal packages type.
Create a feed first then you could use az artifacts universal publish to upload the packages.
Then you could use the "Universal packages" task in your Azure DevOps pielines to download the packages for using.
As you said, you could use visual studio run with the packages successfully. If you use VSBuild#1 task as the doc recommend in your pipelines to deploy the ClickOnce, you could add the path of the custom package in Azure DevOps, it looks like something like this:
'p:GenerateBootstrapperSdkPath=$(System.DefaultWorkingDirectory)\bootstrapper'
I hope it could help.

How to upload files into SharePoint Online using Azure DevOps release pipeline?

I have created a build pipeline for the Unity3D project in Azure DevOps. I have successfully generated artifacts for the Unity3D project. I want to upload the artifacts of the Unity3D project into SharePoint Online using the Azure DevOps release pipeline.
So, can anyone suggest to me if there is any release task to upload files into SharePoint Online using the Azure DevOps release pipeline?
Yes, you can upload your artifacts on sharepoint directory. Please find the Azure devops extension which will do the work.
https://marketplace.visualstudio.com/items?itemName=halliba.az-pipelines-2-sharepoint
This extension is well documented and all the necessary steps are given.
Thanks

Kibana Dashboard version control?

I am using Azure DevOps for my source control. I am creating Kibana Dashboard and wondering if it can be source control as well using Azure DevOps. My idea is:
Create Repo in Azure DevOps.
Write automated script(code) so it saves current Kibana Dashboard Saved Object into Azure DevOps.
In this way, I have old Dashboard in the repo. Has anyone done this? It doesn't have to be Azure DevOps, if you have any experience with it, please share with me. I am new to version control.
(https://docs.logz.io/api/cookbook/backing-up-kibana-objects-to-github.html < this was using github)
Kibana Dashboard version control?
The first thing to point out is that Azure devops is not a version control tool. It provides developer services to support teams to plan work, collaborate on code development, and build and deploy applications. Developers can work in the cloud using Azure DevOps Services or on-premises using Azure DevOps Server.
And Azure repo supports two types of version control methods: Git (distributed) and Team Foundation Version Control (TFVC):
What is source control?
You could set the version control type when you create the project:
After that, we could get the URL of the repo is also a git repo:
Git in Visual Studio and Azure DevOps is standard Git, github is the same.
So, that document also applies to azure devops, we just need to replace the github repo link to the azure devops repo link.
In this way, I have old Dashboard in the repo. Has anyone done this?
If you have old Dashboard in the azure devops repo, just clone the old json files to the local and update the json files and push it to the azure devops by git command line. Or you could modify the json files in the azure devops repo UI directly.
So, for the azure devops, you just need to make sure the Version control of your repo is git, and then you can handle azure repo like git.

How to publish build artifacts to external organisation using Azure DevOps?

I have an ASP web application that I have building in an Azure DevOps Build Pipeline. That is all fine.
I want an external organisation to be able to define their own Azure DevOps Release Pipeline to consume the build artifacts produced by our Build Pipeline. I need the access of that external organisation to be restricted with some sort of credentials (i.e. I don't want the project to be public to everyone). The external organisation should be able to deploy the latest version.
I thought this would be a relatively simple process using only Azure tools (particularly with reference to Feeds), but have tried a number of different approaches based on the documentation but all have failed. I don't want to publish to GitHub - I just want to keep everything inside Azure. I have tried using Universal Packages with Feeds, but the Release Pipeline can only pull a specific version from the feed rather than LATEST.
Does anyone have any recommended approaches I should take?
There is Latest option in the feed of your Release Pipeline: