How to integrate Artifactory & Azure DevOps | Integrate Artifactory & Azure DevOps to Upload Binary

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back in this video we are going to learn how to integrate artifactory with Azure devops so let's try to understand what is a use of artifactory artifactory is one of the popular binary repository managers using artifactory you can store build artifacts let's say that you're working in a team they are uh creating lot of build artifacts let's say they are using Maven for building the Java related application let's say they are uh you know building microservices so you're creating lot of Docker images so where would you store them so artifactory is one of the tool to achieve that so believe it or not you know using artifactory you can actually store 27 different type of packages you know you can um use artifactory to store Helm chart Docker images uh you know DL file exe files and whatnot okay so irrespective of the technology stack and artifactory can be very well integrated with a lot of cacd tools so you can use genkins to integrate with artifactory you can use aops you canuse use team City but the scope of this video is just to integrate artifactory with aavs so let's try to understand the use case better so if you look at this diagram let's say that you are a developer you are committing your code changes into version control system so that is going to trigger a build an aavs so you're using some kind of a tool for building your application once you build your application you can store the artifact uh in artifactory so if you look at this diagram right so the way artifactory is going to store all the binaries is it is going to use some file store okay and then it also uh creates a metadata okay so the metadata is going to point the location of the binaries so even in future let's say you are you are storing or let's say in future you are using different place to store your binaries all you have to do is just change the metadata right so that's all it is as simple as that okay and then of course once you you store your binary files and artifactory and then using your pipeline you can deploy into any environment right so yeah so that is kind of a use case of artifactory so let's get started right let's see how we can integrate artifactory with aavs all right so if you look at the prerequisite uh yes we need to install jrog extension plug-in so if you click on this particular link so if you see here this is the plug-in we will be installing it okay so the scope of this video is we are going to pick up a simple Java project okay we are going to pick up a Java project uh so this is my project right this is a Java project this is not a micros service so I'm not building a Docker image as part of this particular video I'm just building a war file using Mayan so we are going to uh you know pick up this particular project okay and then we are going to uh you know build the war file using MAV and then we are going to upload into artifactory okay so we need to install this particular plug-in so we have to install jrog uh plugin do not install jrog artifactory um so that is actually a slightly older plug-in but we are going to go with jfrog plug-in okay so this is what we have to install and then artifactory needs to be up and running so this is my artifactory okay uh I did have set up this in AWS Cloud but it doesn't matter you can also set up in Azure Cloud as well it doesn't matter as long as you're able to access it so this is my artifactory right so which is up and running and then uh we need to create a service connection okay uh so so I can show you real quick how to create the service connection and then of course this is my Java based project right so which which has been configured in GitHub all right so why don't we uh create the service connection first uh let me go to my aaps dashboard so this is my aaps dashboard okay um project settings let's go to service connections I already created one entry but I'm going to edit that and then we just have to make sure that we have right URL so this is my right URL so I'm going to just uh replace that everything else has been configured all you need is you know you need the artifactory you and then you just need to have admin user and password that's all so let me replace that perfect oh let me fix this so make sure you have artifactory in the end so that's it right so this is my admin username and password so click on verify there you go and then click on verify and save and then of course make sure that you check this one so you want to get Grant access permission to all the pipelines and click on verify and save so that's it right so that's our service connection to connect to artifactory so that this is nothing but I'm just given this particular name wonderful so let me go back to the instructions so we took care of all the uh prerequisite now all we have to do is you know go ahead and then uh probably create a you know pipeline for building our Java base project which has been configured in GitHub and then we are going to check out build the Java project using uh May one and then we are going to upload the war file into artifactory so that is the scope of this video all right so why don't we quickly get started on creating a pipeline so I'm going to go here click on pipelines so let me click on new pipeline okay so make sure one one thing I forgot to tell you make sure uh you already have established uh connection with GitHub okay so make sure uh you create a personal access token in GitHub and then you also create a service connection for connecting to GitHub as well okay I know I did forget to mention that but make sure you do that okay I have already done that so I'm going to uh you know click on GitHub because that is where our source code is okay so and we are going to create an AML pipeline so I don't want to create a classic pipeline of course if you want you can do that but let's go with uh uh AML pipeline so click on GitHub okay so now it is going to ask us what is our repository so basically this is my repository name so let me quickly uh copy that okay so let's select that okay so now we have to select which option we wanted to do uh so basically this is a Java based project so I wanted to use MAV to build it and then if you're planning to deploy the war file into aure app service okay into Azure Cloud then feel free to select this option but again like I said the scope of this video is just talking about artifactory integration with aops so I'm going to click on this option okay so there you go right now the PIP plan has been actually created okay so now let me see where my pom.xml file is so if you see here my pom.xml file is in the root of this web app folder okay so I need to make sure I give that over here but usually if you are having your palm. XML file in the root of the root of your repository then you don't have to give this option okay so that's it right so this should take care of uh you know building and and packaging as a war file let's try to save this and then let's try to run it before we go too far and then we can go ahead and then add a task for uploading into artifactory so click on curent pipeline run okay there you go awesome guys so the build has been successful so we should be able to see uh you know the war file is being created right so there you go right the war file has been created perfect okay so this is the name of the war Perfect all right so let me go back to the pipeline so now what we can do we can go ahead and then add a task for uploading the war file into artifactory so like I mentioned we need to install this particular uh plugin so I have already installed jrog plug-in and you can also see that here when you click on Get It Free so it will Clearly say that this plugin is already installed let me quickly show you right now so this is the Azure devops oranization where I have already installed there you go you all see here right so this plugin is already installed okay wonderful so let's go back to the pipeline now we should be able to add a task okay all we have to do is go here and then uh let's select the task here I'm going to say J frog okay and what we are going to do is we need to select uh jrog generic artifact I think this is what it is you all see here right let me make sure what my instruction says yeah so we have to select jrog generate generic artifacts so let's select this one okay so now all we have to do is select the command so we are trying to upload so select that upload from the dropdown and then do you all remember we have created service connection so this was the service connection what we have saved okay and then this is where we have to provide write values so if you're wondering right so we are actually building a war file isn't it so all you have to do is in the pattern just give star. war and then replace me right so replace me is nothing but this is where you're going to uh the mention the location of uh your repo right so let's go into jfrog so basically I wanted to upload uh the Water file into this particular repository okay so again you can just uh select this one and then you can go back to the pipeline and then you can provide that if you wanted to have a different repository and then you can create it and then you can you can select that right over here so I think that should do it okay so we selected the command we selected the artifactory service connection selected the pattern and then we provided the repository name and then that's it click on ADD so that's it right so now our task has been added here there you go so our task has been added perfect so now let's let's try to save this okay and then if you want to provide a commitment you can say added a task for artifactory integration and then save let's try to run it okay wow so do you all see here guys so this was able to upload the war file and then we got a status as a success so now if I uh log into jrog okay I just have to go ahead and then click on refresh so the way you're going to come here let me quickly show you okay so you just need to click on click on here and then click on artifactory and then click on artifacts click on artifacts there you go right so this was our uh you know the repository name and then there you go and you can see here today's date is like you know 10th uh you know um 10th November and then of course this is the date and then the time right so yeah so that's it guys you know that's how you would be able to uh upload your War file into artifactory using Azure devops pipeline thank you for watching this video
Info
Channel: DevOps Coach
Views: 1,355
Rating: undefined out of 5
Keywords: Azure DevOps Integration with Artifactory, How to integrate Artifactory with Azure DevOps, Artifactory Integration with Azure Devops
Id: eAIdBglqjCA
Channel Id: undefined
Length: 12min 38sec (758 seconds)
Published: Fri Nov 10 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.