Continuous Delivery & Release Management | DevOps for Mobile

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
>> Tune in to this week's DevOps for mobile developers where we show you how to take your app, put it onto the devices, and put it into the app stores. [MUSIC] >> Welcome back everyone to another installment of DevOps for mobile developers. I'm James Montemagno. >> I'm Abel. >> Oh, my goodness, Abel. You've come. >> Such a long way. >> We have. We have signed our application. We've built our application. We've test our application. What's the last step? >> We need to distribute. We need to get this to the app store. >> That is correct. >> All right. >> Now, how would you normally do this in your CI/CD pipeline for like web apps that you've done in the past? >> There's no app store. So it's much easier. You build. You have your bits. My release, I'm going to grab those bits, and I'm going to push it onto the web server, or I'll push it into app service and up an Azure or something like that. >> Yeah. >> Really, it's just a bunch of copying files around. >> That is correct. >> Well, finished. >> Finished, done. >> A little bit more difficult with mobile. >> It's a little bit more difficult on mobile and I'll tell you why. Because when you think of I've given you my app to test. >> Yeah. >> It's not in the app store yet even maybe, like a Dev environment. Now, if you push new file, so that Dev environment when you refresh the page, it's new. When you open up the app for the next time, it's the same app. So you have to worry about updates to your Dev and QA applications, and then of course, you need to push that out to the app store, and then now, you're going to multiple app stores. >> Yeah. >> Doing that in a consistent way can be very tricky. >> Sure. >> So we've talked about the signing certificates and we talked about earlier linked to that episode. iOS has certain signing certificates as well. Now, the first part I want to get into is just, how do I give you my app? >> That's a good question. >> Yeah. >> Like how do you get in onto my device? >> Yeah. That's where it starts and that's where app center comes in. >> Okay. >> So we've built our application. We've done our tasks and now, we get into the release pipeline. So app center, what's really cool about it is Android's actually really easy. Of course, that's an ongoing theme that you might be saying here. >> Right. >> I can just e-mail you this APK and you could open. Open it is only just say, it's trusted. It will install on your device. >> Yeah. >> Now, the Android operating system really gives you the control. Apple, not so how much. >> They control it. >> They control it. Additionally, serving those files is also very tricky. >> Okay. >> So normally, you would think like, "Oh, I could give them a URL where they could download on their Apple device and install it." Doing that on iOS, you can do it yourself, but you have web servers, and config files, and authority files. What app center has done as they say, "Hey, give us your app. We will allow you to create groups, distribution groups. We can set it up. We'll give them a nice web page. We'll walk them through, install, and even provide a cross-platform SDK for any of the different operating systems and languages that will allow you to pop up notifications that a new build is available, and we'll streamline everything for you." >> Nice. >> Yeah. >> Very cool. >> So let's go in and build a release pipeline. >> Okay. >> Right. >> All right. So I'm going to create a brand new release pipeline from scratch. >> Okay. >> So we got that from "Pipelines". We ran "Builds" previously. Now, I have "Releases". >> Okay. >> So let me do "New Release Pipeline." All right. Now, there are a bunch of these, these pilot familiar websites, app services. You've got the IIS's, and the automated tests, and everything. I just do "Empty", just done. So let's just do "Android Dev". >> Okay. >> I'm just going to submit this off to my developers and that's my first stage of this thing. So we're going to have an "Artifact". >> Okay. >> Now, how do you describe Artifacts? Because it's a weird Word. >> These are the Build Artifacts. So these are everything that we get from our Build Pipelines. >> Yeah. So that would be our APK and our IPA. >> Yes, for them. >> So here, we're going to have our Build sources and we've been using this one, our CI cycle here. >> Okay. >> We'll just say "Add". So then, we link up. >> Perfect. >> Optionally here, well, a continuous integration and delivery. >> Nice. >> Why not? Sure. Now, what this does is every time a successful Build's happened, it kicks off the cycle. >> Yeah. >> So I don't have to do it manually. So here. >> I like that. >> I like that too. Yeah. Now, there's some cool things in here like pre-conditions, post-conditions, and I'll get into those in a second, but I always want this first thing to happen. That little lightning bolt that looks so scary, that means it's going to do it automatically for me. >> Perfect. >> So I'm going to create a task here. Now, everything is built-in to Azure DevOps and I'm going to show you. >> Okay. >> So over here, when I say, add a new task, this looks exactly like. >> The Build engine. >> Exactly. The Build engine. I think they're probably exactly the same. >> They actually are. >> Just pretty cool. So I'm going to type in "App Center" over here and I do a distribution first. So there's test, which we saw earlier, you could test. >> Okay. Yeah. >> You could test from here as maybe your first stop if you didn't want that to be part of your Build, but distribute it is the next step here. >> Okay. >> So now, just like before, we were building and distributing or testing our application. We want to distribute it. So we have our "Service Connection". >> Okay. >> Set that up earlier. You can always create a new one, which is going to allow us to communicate with app center if you're the API. Then, what we need to do is specify an "App Slug". >> Okay. >> Now, this "App Slug" is like my identifier and it's really nice up here. It tells you exactly what it is. It's username plus app identifier. >> Cool. >> So here, we're going to go into our Android app and we're going to copy this Slug up here, over into our Release Pipeline. Delete "Apps". Done. >> Cool. >> "Binary", that's our APK. I love this browser window where I can just literally come in and find say, here it is. >> Yeah. >> That's cool. Now, I also like inside here though, if this thing ever changes, you could do something like "star star", and then it'll look in all the sub-directories. >> Okay. Yeah. >> So it's not a 100 percent hard-coded, but you can leave it hard-coded. >> Sure. >> Now, I love this feature, "Release Notes". >> Nice. >> Now, we're just going to say, "Dev Release from Azure DevOps". But what I like is you can even specify in a file that maybe you've uploaded to here or maybe it's part of your a repo, and you put that in the drop folder. You can be right there. >> Nice. >> Now, you can also require users to update to this release. If you have the app center SDK installed, the next time the user launches it, it will force them to install it. >> Got it. >> We're early on for now. Okay. Now, we get a little bit more finite in here such as the "Groups". Over inside of here, we have "Distribute". By default, every app has a "Collaborators" and default group. So this is me. >> Yeah. >> You can also create your own Distribution Groups. So I could add internal or QA in here. I can add people by e-mail or I can even do a public, which is cool. We're going to do just default myself. This is the dev build. >> What does the public do? >> Oh, great. Gregory Great. So what this does is you can do a public, and it gives them a link that they can click and install the app. >> Right. >> Now, there's no releases yet. >> But will this work for iOS as well? >> You will. Yeah. >> Cool. >> Now, for iOS, this public, be very aware that Apple has restrictions there. You can't just take your app and distribute it to the world. >> Right. >> Now, what I'll do to that, you've got to put it through the App Store. >> Yeah. >> But if your internal and then enterprise, you can do in-house, which allows to distribute to all of your developers in-house. >> Okay. >> Additionally, if you're a developer like me, you can register up to 1,000 devices, another test users. >> Got it. Okay. >> Then, those apps could still be installed. So there's many ways even if you're not paying the $300 for enterprise, then you can do this. >> Okay. >> But this is nice, especially for Android. You can get it this up and running in seconds which is cool. >> Yeah. >> So over in my Release Pipeline, I'm going to leave the default group over here, just do nothing, good to go. Then, there's additional symbol files that you can upload and what those give you like additional metadata about your app. >> Okay. >> So we actually have those inside of here. There's a little manifest XML file and that's generated part of the drop. So I can just give it this mapping file. >> Okay. >> That's where it's Atlas. Double-check this here. "Drop". Yeah, that's the mSYM file. Good to go. >> Cool. >> Literally, I'm done. >> Nice. >> Like I just distributed it. >> That's way more simple than I thought now. >> So let's do it. Let's create a Release. Here's my Android and say, "Create". >> Okay. >> Now, we've released. Now, this is going to be queued up. Now, what's cool about this is, this can be done on a Windows machine, a Mac machine, a Linux machine or really doesn't matter. Any of the hosted build agents are there and this is going to go in. It's going to start the Build Agent process. >> Okay. >> Download the Artifacts and then publish it out to the app center, which is cool. So we can see it's downloading a bunch of stuff, deploying. This is where I cross my fingers and hope everything I set up inside there was correct. >> Yeah. >> So a way here for this to deploy. >> So it's using app standard to do all the deployment. So we have to set up who are distribution groups going to be and all of that stuff. Is there a way to, well, I guess, so the process would be first, going to app center. You have to set all that stuff up and then you can use the task. >> Yeah. Exactly. >> In Azure DevOps. Okay. >> Yeah. You can do an App Center as your gateway of all the things after a Build that you can do with your app. >> Yeah. >> So you can test that. You can distribute it in analytics. You can add in other services like data and authentication into it. >> Cool. >> We use App Center as the gateway. A lot of developers may know App Center or that section of it, Distribute, it's HockeyApp, which was a company that was acquired by Microsoft a while ago, and they're part of App Center team, and part of this Distribute, just cool. So now, when I go to "Releases", boom, there it is just now. It happened. >> Yeah. >> I can come in. I can look at the Releases. I can get a bunch of information about it, how big it is. I could download it inside of here. But if I go into my 'Groups" and here, we can see that no one's installed it yet. I'm the tester and I have one release available. >> Yeah. >> So what I can do is one, if I wanted to, I could just scan this QR code. >>Cool. >> That's super cool. Additionally, on Android, let me go and mirror my Android device here. This is my my own Android device. So if I come in, there's a HockeyApp app, so some HockeyApp in there. I can go ahead and tap on "HockeyApp," and I've logged in with my account. So now, inside of here, if I go down, here's HelloDevOps for Android. >> Yeah. >> Now, I can download it. >> Cool. >> Now, this is really cool. This is the cool part. If I don't have it installed, there will be a website that's mobile-friendly, especially for iOS, and then it'll allow you to download it. So I can hit install. Now, here, this is the first time it's been installed. So Google's being like and Android is like, hey, are you sure you want to install this? >> Got it. Yeah, of course. >> It's like the play protection, I can open it, and now- >> Sure. There's your app. >> There's my app. Cool. >> Super cool, right? >> Yeah. >> Now, what's nice about this is you can then distribute it maybe to my public testers. So if I come in to here, before where I didn't specify any identifier, there's a unique ID for each of these, which is pretty cool. So I can could go back and now, I can create a public task, I could create an app store task, I could create a QA task, and distributed just to this group, which is really nice. >> Yeah. >> Now, what's cool though is you can also come in and I could manually do this too. I could say, distribute, create some release notes, and actually say, oh, send this to my public tester. >> Got it. >> I like it to be controlled. >> I like it in a pipeline. >> I like it in a pipeline. So if I went into here and I said edit again and I edit that pipeline, you could then do another one in here, I could do empty, and maybe inside of here, I would have that app center task again. But then, if I tap on this little light bulb section, I can also say, you know what, there's all these gates and deployment and schedules. I can say, you know what, someone needs to improve this. That's James. Don't execute this until I'm done. >> Yeah, right. >> It's pretty cool. >> So manual approval gates. >> Manual approval gates. >> Very nice. >> Now, I have a finished pipeline that I want to show you, just for time sake, so I show you iOS and Android. >> Okay. >> So the finished pipeline looks a little bit like this. >> Okay. >> I'm still working on it, and we can talk about it too. So here, I have Android Dev. If I go into here, it's going to look the same. >> Yeah. >> I go to my pipeline, Android Public, Public. What I've done is I've specified that app identifier down here, the destination. >> Okay, makes sense. >> Now, I also go back to my pipeline. I have Android App Store. >> So you can get all the way to the App Store using App Center. >> That's correct. >> Cool. >> So I can show you this. There's a storage section, and you can configure it. >> Okay. >> So here, you can go to Play Store or Intune. If it's Apple, you go to the App Store or Intune. >> Sure. >> There's a bunch of things that it walks you through this documentation. But you basically get this security token JSON file. You upload that into App Center and App Center now is a trusted authority. Now, what I'm able to do is I can connect and I can say, this is com.company. What did I call it? Let me go back into my Android project and into my properties here. You give it the package name. >> Okay. >> So it's going to be assigned, and that will link it to my Google Play account. >> Cool. >> I've given them some money, I can go inside of here, and then I can tell it to go to the store. It's basically from here to a Production, Beta, Alpha. So you might have a lot of these, Alpha, Beta, Production. You can have this roll out, which is cool. >> Very cool. >> One thing I do want to point out though the inside of this pipeline is that I can also do that from a task. >> Okay, yeah. >> So you have the decision inside of Azure DevOps to use the built-in task from Microsoft to distribute this to Google Play or also up into Apple. If I type in apple, there's Apple App Store here. >> So what's the difference between using just going directly to the App Store and then or going through App Center to do it? >> No. >> Okay. >> Yeah. >> That makes sense. >> The nice thing is that I think that the configuration is nicer and cleaner inside of App Center. Then now what I like about that is, I'm doing all of my distribution inside of here. I would say the extra bonus part is that if you give App Center those additional files, the metadata files. What's cool is at anytime your app crashes, it will get additional information about it, because you've provided symbols. >> Got it. >> I like it's like everything to be there, but if for some reason you didn't have it configured and you just wanted to go straight to the store, you can. >> You can do that. All right. >> Now, over my pipelines, I do have iOS, and Abel, it looks exactly the same. I specify my ipa file, give it release notes, give it groups or store, and then I can give it additional files. >> Okay. >> Now, one thing is that I can also distribute this out to Google, not Google, but Apple, via their thing called TestFlight. >> Okay. >> So a TestFlight in-house distribution that anyone can install it or the thousand limit. >> Right. >> What Apple has is they have something called TestFlight. It's a service inside of the Apple Developer portal where you create your app and allows you to create basically a public Beta for your app. Now, what's nice about this is that I think of this as anyone outside my company that wants to test it. >> Yeah. >> What's cool is that they just install the TestFlight app. They don't have to worry about certificates, they don't have to worry about anything. It's just updates. >> It's my, hey, I'm getting ready to release this before publishing it live. The difference here is, regardless if I want to go to TestFlight or if I want to go to the App Store, I can't use my developer service. >> You're right, you mentioned that. So we got to restart everything. Does that mean we have to rebuild everything? >> No, you don't, which is good though. >> Okay. >> So what's cool here is that part of this process, I'm going to run this on a Mac host agent. >> Okay. >> There is an extension built by Microsoft for that. So let's go into my browse and marketplace here. Here, I can type in apple, and here, I will see the Apple App Store. >> Okay. >> This gives me the ability to send it to TestFlight directly or resign my application. >> Cool. Okay. >> So I've done this thing called Download Secure file. So before we could just take that file in the build, add it in the step. But here, what I've done is I've said, hey, here's some files, they're all in the same place actually, and I'm going to tell it to use my personal cert for there and then my production cert. Then what I can do is I can say, hey, find that ipa, find that p12 cert, here's the password for that cert, and then use this mobile provisioning, and use that and resign my ipa. >> Cool, okay. >> Then, I take it and I can distribute it via App Center to the Store to TestFlight, or I can publish it directly from here too. There's that step in there too if you want to. It goes to the same thing and you create a service connection to Apple directly. >> Yeah. >> Up to you. Again, I like to put everything through App Center because I'm always going to do those first few steps which is distribute to my internal users and even maybe do a public test as well. >> Sure. So this makes me really happy, because you don't have to rebuild your app. But I have another question that I ran into when I was trying with my baby mobile app that I'm writing. So one of the things that I do is I connect to back-end services. So of course, with my prod, it's easy enough. I had the URL that I can just go to. >> Yeah. >> But if I'm sending this out to, let's say, my Alpha testers or something like that, or whatever, my test team, they need to be able to hit my tests servers, the back-end servers. Is there a configuration file? Do they do that? Because right now, it's hard-coded in my code, you're laughing at me. >> No, that 's true. That's true. >> Okay. Do I need to rebuild this multiple times or is there some way that I can swap these things out using magic or something? >> It's a good question. Honestly, it's a problem that everyone has always had in mobile applications forever. So when you think of a website, I love that there's like a web config file and you can have production versus Dev, you're going to have staging slots, and it's just kind of knows, right? >> So it's easy enough for me to like swap in values of where to go. >> Yeah. On the web, super easy, because your users are pointing to the web server, and that file is on the web server and they can't get to it. >> Right. >> The problem is people. They have their phone, they can get to it. >> Right. >> So there are ways of doing like config files that your application looks at. The problem that go against that is that that file is in your app, in your device. >> So hackable. >> It kind of hackable, and you don't want just random files with tokens on there. So combining it into your app is the best way to do it, in general. Yes, you have to build your application multiple times. >> Okay. >> Yeah. So normally, what I will have in my full finished pipeline, if I go back over to my pipeline here, is that I will probably build my application, maybe in a different mode. So instead of a release, I've released QA, release whatever, and that has different configuration in it. Now, what's of interest though is anything internally that I distribute, I will probably only generate like a single APK or a single ipa, and I'll put that in a mode where though might be a splash screen that allows me to configure that. >> Right. >> Because it's not we're going to leave internally, right? >> Yeah. >> So allow me to configure that. If you do it that way, that means that you can even have your UI test run hit different servers if you need it to, because you can enter those values. So that's a one way I look at it of doing it. So instead of generating a bunch of different builds internally, this one is Dev, this one is QA. Just build one and have it configurable in your app. Read it from your file and set it inside your- >> Interesting. >> That's an option. We've also built apps where we would host like a JSON file that can be downloaded for Dev to swap out keys. Again, you'd want to remove that from your final one now. >> Sure. >> So think about, here's a Dev build, here's a final build that removes all that stuff, so my users can't do it. >> Okay. >> So that's one way of looking at it. But again, you're probably going to have to build twice. So for better or worse, you're going to have to build twice. >> Understood, okay. >> There are different Cloud providers and even like Azure has some services to do like AB testing and swap out things. You want to be sure that when you ship this app to the store, that is what's in there, and the only way to do that is compile it all up, because everything is pre-compiled. >> Yeah, fair enough. >> Yeah. That's it. Now, you got it on your phone, you got it in the App Store. >> This has been super helpful. >> Awesome. >> Yeah. >> Abel, well, thank you so much. Thank you for those tough questions too. Because honestly, even though I gave it all, I was like, I've been asked this question so many times. Unfortunately, things have not changed because just the nature of mobile development unfortunately. >> Fair enough. >> Well, Abel, thank you for joining me on this journey. Thanks to all of you for tuning in on this great series. I've got a lot of fun. >> Yeah, this has been so helpful and informative to me. I really appreciate this. >> Awesome and thanks, everyone, for joining in. Of course, you can learn more about everything in DevOps by going to aka.ms/DevOpsforMobile. You'll find all great links there and bunch of documentation to everything that we've shown you in this series. Of course, hit us up on Twitter. If you have any questions, at all, about anything web, mobile, App Center, DevOps, life, playing guitars, whatever you want to do, please just hit us up, and thanks for tuning in. [MUSIC]
Info
Channel: dotNET
Views: 5,217
Rating: 5 out of 5
Keywords: .NET, Xamarin, xamarin.forms, ios, android, devops, azure devops, app center, continuous integration, ui testing, dot net, mobile developer, mobile devops
Id: TXqmOo3l6GQ
Channel Id: undefined
Length: 22min 28sec (1348 seconds)
Published: Fri Oct 25 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.