Getting Azure DevOps Pipeline Artifact output Windows app - azure-devops

Using Azure Devops. Made pipeline using Visual Designer for .Net Desktop application. Trying to get the output (exe). I created a feed in the Artifacts but I don't see a way to specify it in the Pipeline configuration. In the build output for Copy files to $(build.artifactsstagingdirectory) it shows file copied
2019-01-11T01:10:27.4301461Z Copying D:\a\2\s\AzureDevopsSimpleTestApp\bin\Release\AzureDevopsSimpleTestApp.exe to D:\a\2\a\AzureDevopsSimpleTestApp\bin\Release\AzureDevopsSimpleTestApp.exe
2019-01-11T01:10:27.4327361Z Copying D:\a\2\s\AzureDevopsSimpleTestApp\bin\Release\AzureDevopsSimpleTestApp.exe.config to D:\a\2\a\AzureDevopsSimpleTestApp\bin\Release\AzureDevopsSimpleTestApp.exe.config
2019-01-11T01:10:27.4335836Z Copying
D:\a\2\s\AzureDevopsSimpleTestApp\bin\Release\AzureDevopsSimpleTestApp.pdb to
D:\a\2\a\AzureDevopsSimpleTestApp\bin\Release\AzureDevopsSimpleTestApp.pdb
The Publish Artifact step it says file uploaded successfully but where is it?? how can I download it? Thanks!
2019-01-11T01:10:27.8230580Z Uploading 3 files
2019-01-11T01:10:28.1382894Z File upload succeed.
2019-01-11T01:10:28.1382985Z Upload 'D:\a\2\a' to file container: '#/672188/drop'
2019-01-11T01:10:28.1383023Z Associated artifact 2 with build 3
https://imgur.com/a/aBIvlGq
https://i.stack.imgur.com/F56M0.png
https://imgur.com/a/EYbdNpq

how can I download it?
You could download it from Summary tab. For more information, please refer to the screenshot.

Related

Download lost file from DevOps pipeline Library

I lost a file which is still available in the library inside the DevOps Library.
Is there a way to save a local copy somehow?
It's still possible to use in a pipeline, but I have no idea to get it to my local computer.
You can use the Download Secure File task to download the file in the pipeline and then use Publish Build Artifacts task to publish the file as build artifacts.
See below when downloading using Download Secure File:
Once downloaded, use the name value that is set on the task (or "Reference name" in the classic editor) to reference the path to the secure file on the agent machine. For example, if the task is given the name mySecureFile, its path can be referenced in the pipeline as $(mySecureFile.secureFilePath)
So in the Publish Build Artifacts task set the Path to publish to $(mySecureFile.secureFilePath)
Then you can download the file from the build summary page by clicking the related artifacts. See below:

How do I add Sonarqube scans to NativeScript apps?

Has anyone ever integrated Sonarqube scans in their CI pipeline to scan Nativescript apps?
My current scenario is I have 3 separate build jobs.
On-Premise
Build the Angular website
Cloud - Windows
Build the android apk and publish the artifact (tns build android...)
Cloud - Mac
Build the ios ipa and publish the artifact (tns build ios)
The problem I face is that I want to run a sonarqube scan, which needs to run on-premise, which is fine because I can download the artifacts (apk file or ipa), or I can download the source. The real issue is that I do now know what to scan exactly. I don't know what to put in my sonar.properties (sonar.sources). Does anyone have a clue?
The sonar.sources paths are the directories containing main source files. The path is relative to the sonar-project.properties file. Defaults to ..
So you can download the source code, and set the path of sonar.sources to the source code folder.
For example, if the source files reside in mysource folder which is in the same directory of your sonar.properties file. You can set the sonar.sources=mysource.
Please check the document
Analysis Parameters and
SonarScanner for more information.
You can also check this thread, you may find it helpful.
You can also check out this tutorial to integrate Sonarque with azure devops pipeline. Managing technical debt with SonarQube and Azure DevOps

Download build artifacts from file share does not show drop folder content

At the end of the build, I publish artifacts to a file share drive.
But in the release pipeline, if I select the Agent job, I don't see the content of the drop folder, as shown below. Do I have to use a Download Build Artifacts task to go around this ? Or can I still use this option of the Agent job somehow ?
The artifacts were correctly published to the file share. However I also noticed that I cannot open the artifacts folder from the build log. I only see the path. How come ?
Download build artifacts from file share does not show drop folder content
This is an expected behavior. When we choose publish artifacts to a file share drive instead of Azure pipeline, the share drive can be our local path or a network shared folder.
So this share drive is more controlled by us than azure devops. In this case, Azure devops cannot provide a direct download link, only the path where we store the file.
Do I have to use a Download Build Artifacts task to go around this ?
Or can I still use this option of the Agent job somehow ?
It depends on whether your agent running your release pipeline can access your share drive.
If yes, just like Shayki Abramczyk said, the agent will download the artifacts from the file share at the beginning of release.
Note: You need set the build pipeline as artifact source:
The output:
If the agent could not access that share drive, we need use the task like Download artifacts from file share to download the artifact.
Hope this helps.
This is the behavior of publishing to a file share, you can't "explore" the files inside Azure DevOps if it stored on a file share.
You don't need to use the Download Build Artifacts task because the agent will download the artifacts from the file share at the beginning of his run.

How do i make an .exe that users can download on a website?

I already made an build pipeline with CI and i got successful builds. I want my latest successful build to be released on a website where people can download an .exe file of the application. I find very little information about this on how to do this.
I am working with Azure DevOps.
That depends on your website upload method:
File share. Use the Copy Files task or Publish Build Artifacts task in you build definition.
FTP or another. Try to use PowerShell to publish your results with PowerShell task

List files of a build artifact

I've seen that in the 5.0 preview of the REST API it seems possible to download a specific file from a build artifact using :
GET https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/artifacts?artifactName={artifactName}&fileId={fileId}&fileName={fileName}&api-version=5.0-preview.5
But how to list the files of an artifact ? I don't know what to input for fileId.
My usecase is a folder archived as an artifact during the build. I would like to get download links for each files in the folder.
I found that the API you using is not having complete documentation.
I used below to download specific file from Build artifacts using PowerShell. You could get the container ID from GET build details.
https://$collectionurl/tfs/$teamproject/_apis/resources/Containers/$containerID?itemPath=drop%filename.txt