We have a .NET ASP Web form application. Currently we use TeamCity for the CI part. Deployment part is manual. We take the build artifact generated by TeamCity and deploy the artifact manually.
Now we will be using Azure DevOps for complete CICD process. During the POC we have been able to successfully build and deploy the application in IIS. I am new to the azure pipeline and doing POCs to learn it.
In TeamCity, against each build the generated build artifacts are available. So we can easily refer to any specific build and get the build artifact for that specific build. This is useful in case of rollback. We take the last successfully build artifacts and deploy the same in case of any error.
But in Azure is there any build artifacts repository where we can get the all the build artifacts for all the builds of that pipeline ? There is a section "Artifacts" but as per my knowledge this is for publishing as packages across feeds.
Now I have come across JFrog artifact repository https://jfrog.com/artifactory/. But no nothing about this. Need to go through.
Anyone can please let me know , in azure pipelines , where I can get all the build artifacts against all the builds in a pipeline. Is it available against each run in the pipeline or I need to configure it somehow ?
In any release failure , I need to rollback to the last successful deployed artifact version.
Thanks in advance for any guidance on this.
Azure Artifacts is feed source for packages like nuget etc.
And build/pipeline artifact you can find in your build here (of course if you published them):
Here you have documentation about publishing and downloading pipeline artifacts - newer and recommended approach and here about build artifacts
In short what you needs is add this step:
- task: PublishPipelineArtifact#0
displayName: 'Publish pipeline artifacts'
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/
archiveFilePatterns: '**/*.zip'
Of course if your pipeline output is a nuegt package you can publish it to Azure Artifacts.
Related
Assume we have 2 git repos in Azure DevOps "RepoA" and "RepoB".
RepoA has few class library projects whose references are being used in main project which is in RepoB.
So in Azure Pipeline can we create a Build of RepoA and this build output can be used by another pipeline configured for RepoB build?
I am using clasic build template.
Sure. In the build pipeline for RepoB, you can use the Download Pipeline Artifacts task to download the artifacts from the latest or specified build of RepoA.
In the build pipeline for RepoA, after building the class library, use the Publish Pipeline Artifacts task to publish the artifacts as as a pipeline artifact.
In the build pipeline for RepoB, before the build task, add the Download Pipeline Artifacts task to download artifacts from from the latest or specified build version of RepoA.
I am new to Devops. I am trying to set up Azure devops pipeline for SAP hybris.
Could you please give any pointers on how to upload SAP hybris framework
to Azure artifact and use it for build time dependancy?
So far I have created windows build agent.
I am not clear on entire process to create the pipeline for SAP hybris.
Has anyone configured similar kind of setup?
You can create a pipeline that publishes the OOTB(out of the box platform) into Azure Artifacts as an universal package . Such a task should look similar to:
- task: UniversalPackages#0
displayName: Publish Hybris Platform Universal Packages
inputs:
command: publish
publishDirectory: '/yourPathOnTheMachineThatRunsThe/AzureAgent/folderContainingTheFilesToPublish'
vstsFeedPublish: 'feed'
vstsFeedPackagePublish: 'theFeedInWhichYouWantToPublish'
packagePublishDescription: 'Hybris Platform'
After publishing you can use another(Universal Package) task to do the download and further use it in the build process.
The full documentation of Azure Universal Package task can be found here
I am trying to deploy an existing .Net Core application using Azure Devops by creating Build and release pipelines. The build pipeline worked fine, but I get the below error when running the release pipeline (under Deploy Azure App Service).
Error: No package found with specified pattern: D:\a\r1\a***.zipCheck if the package mentioned in the task is published as an artifact in the build or a previous stage and downloaded in the current job.
What should be done to fix this?
This error is because the build task is not configured. You can try to put the below YAML code at the last to make it work.
- task: PublishBuildArtifacts#1
I have a build pipeline with 2 publish artifacts.
In my release pipeline i want to download just the first artifact.
I know that it should be possible as I have read here
In Azure Pipelines, you can, however, select which artifacts you want to download to the agent for a specific job and stage of the deployment. Typically, you will do this to improve the efficiency of the deployment pipeline when the tasks in that job do not require all or any of the artifacts, or if you implement custom code in a task to download the artifacts you require.
but I cant find it...
This is how the release job details look like:
as you can see the artifact selection is missing.
here is how I configured the artifact in the release pipe:
apparently there is an issue with on premiss none NTLM agents.
https://developercommunity.visualstudio.com/content/problem/520932/azure-devops-server-2019-where-is-partially-downlo.html
Partial artifacts feature isn't enabled by default in Azure DevOps Server 2019. We have an issue with "Download Build artifacts" not working with NTLM based proxy hence we couldn't roll out this feature to OnPremise customers.
"az pipelines runs artifact download --run-id 10976432 --artifact-name "Android/Android" --path "c:/foo/" fails with error "Artifact with name 'Android' was found, but is of type 'Container'"
I publish artifacts from our build runs to several different repositories like NPM, Nuget, PyPi, CoCoPods, and this process requires "two factor authentication", so at least for now it will remain a manual post build process for us.
But even though this is a manual process, I want to automate as much of it as I can, e.g. automating the download a dozen or more build run artifacts to a local staging directory that I then use to publish from.
I have found several community post that have done this with CURL and the REST apis, but I want to get this working with the az devops extention.
As far as I can tell from the azure extension this command should work, but it does not!
How can I download build run artifacts (not public feed artifacts), so that I can manually or automatically publish them outside for the normal DevOps pipeline?
Thanks,
Brian.
"Artifact with name 'Android' was found, but is of type 'Container'"
I guess the publish task you are using is Publish Build Artifacts task, right? If yes, as the message shown, we indeed does not support download container type artifacts until now.
As of today, you can just download artifacts of type -'Pipeline Artifact' from az cli.
In order to use az cli to download artifacts successfully , if possible, please go replace the publish task with Publish Pipeline Artifact task:
- task: PublishPipelineArtifact#1
inputs:
targetPath: '$(Pipeline.Workspace)'
artifact: 'AzLogicApp'
publishLocation: 'pipeline'
Now, you will see you can succeed to download the artifact with az cli.