logo

NJP

ServiceNow DevOps Auto Approved Deployment

Import · Aug 03, 2022 · video

[Music] hey everyone it's justin thank you for watching in this video we'll continue our devops conversation and this is where we tie everything together so um breaking this up into two videos in this one we are going to be creating a work item in azure devops we're going to make some changes to code we're going to commit those changes and when that happens it's going to initiate or kick off our pipeline and azure devops and as that pipeline starts running we're going to switch from a developer's perspective to what that looks like in servicenow with the change request so this one that you're going to see should have a change request automatically get approved because that's the way we've configured this particular demo and you can set those conditions you can look at the change policy uh devops change policy video that i did but um i've set it up so that if i have a work item associated with what i'm doing it will automatically approve the change so we're gonna start we're gonna create a task and we'll just call this demo task within azure devops i'm going to make sure this is assigned to myself and we'll just put the description as the same thing right so it's super easy work items are really common within azure devops and if you look what was just right behind my head i'm going to go ahead and do some development work on this particular work item so i'm going to create a branch in my code repository we're going to call this demo branch and notice that there is a work item associated with this particular branch that i'm creating so go ahead and create that now i'll be able to see the particular files that are in that branch that i just created i'm going to just edit this text file this is just for demo purposes and i'm just going to put demo for the world and then we'll just put that a couple of times so we have some text in there that we actually changed something and up here i'm going to go ahead and commit that code and that means it's going to save it to the repo for us when we commit it i'm going to go ahead and associate again a work item with the commit itself so i'm just going to go from the drop down here we're going to do the demo task that we're working from and i'm going to just first make sure that i put 90 which is the number of this task up here in my comment you'll see me do that twice here i'm gonna go ahead and do that commit once i do the commit i can go ahead and pull that request when i pull that request it will go ahead and start the process to merge this within the code repository right so we're going to take that branch that i just made and we're going to merge it back to the main branch which is going to kick off our pipeline so a couple of things to point out here my title my description i got my number 90 in there i've got my work item associated with it this is important because if i want the workout in there so that it'll auto approve the change requests and service now so i'll go ahead and click create once that's created i get an approval or a complete button up here at the top and this is what will set off that pipeline so i'm going to go ahead and complete and i'm going to customize my merge message so that it also has that 90 in there as well probably not necessary but i just want to make sure everything works like i want it notice again we've got lots of references to what we did and that work item that's associated with this so we go ahead and complete that merge now azure devops is going to do what that yaml file that's another video that i made is set up to do for that particular pipeline so in order to go see what's going on we're going to actually open the pipeline i'll open it here and navigate over to that there's one pipeline for this particular project and the one that we just did the update we just made is in progress actually just saw the build step complete there so i'll go ahead and open that up and we see we've got a couple of steps here build test and deploy is the steps for that particular one so that's what's going on in azure devops it's running through its process now let's take a look at not lastpass or that one we're going to take a look at servicenow this is the pipeline ui service now i'm going to hit the refresh button so we see that build step at least that just got done over in azure devops so once that refreshes we should have a number 49 and possibly a number 50 pipeline history on the left hand side showing what's happening with the particular pipeline as we're matching it over to azure devops so servicenow and azure devops are matching so i do have a number 49 here so my 49 is that build step that completed and if i want to see that commit i can see that the commit is right there and if i want to see that number 90 work item i can see that that was associated with it so we can see everything associated with this particular step same thing on the test and deploy steps so i've got a test step here i can look at my commits i can look at my work items i've also got a change so let's take a look at that change request now remember i said if i had a work item associated with it that change should automatically get approved but i want to show you a couple other things that you didn't see in the other videos number one look at my start description of my start my short description description my justification implementation risk and impact analysis back out and testing plan all completed automatically this is the power of devops happening it got scheduled you can see in the notes everything that's happening so look at this it went from new to assess automatically scheduled implement and then review so it automatically approved this change we didn't have to do anything it automatically went through and it's in the review phase right now we can see on the change what commits were associated with it so if you're an itsm you're a change manager and you want to see okay what did somebody do what was in that particular commit they can come in here and see all the details associated with it they can see what branch it was on the work items that were associated so we've got full visibility within servicenow into that process and if i move i'm going to go above my head here pay attention to this pipeline history i'm just going to switch from 49 to 50 to force this to update and refresh right because notice it looks like it's still working and i don't have a stop date here on the right hand side so let's go ahead and click number 49 we knew that was already passed and i'll go back to number 50 and it's updated it's now green as being done and we have a start and stop date for that particular step if we go back to azure devops and get my head out of the way we will see that all the stage is completed build test and deploy and we have a happy developer and we have a happy itsm or change management team so that's it that's the auto approve stay tuned for another video where we're going to show a manual approval similar process but we're not going to associate a work item and that's what's going to trigger it based on our change policy that we have configured i hope you found this video helpful if you did please like please subscribe or share it with somebody who you think might be interested in devops until next time don't forget to always be learning [Music] [Applause] [Music] [Applause] [Music] you

View original source

https://www.youtube.com/watch?v=E3KOiiZX4LE