>> You don't want to miss this week's
DevOps for Mobile Developers because
Abel and I are going to show you how to take a brand new app,
publish it to GitHub and do a full build in 15 minutes.
>> No way.
>> Yes. Tune in.
[MUSIC]
>> Welcome back everyone to
the second episode in DevOps for Mobile Developers.
I'm James Montemagno, and my best friend has joined me yet, again.
Abel, how is it going, buddy?
>> Great. So I hope I'm still your best friends.
>> Still my best friend, you made it a whole week.
>> Nice.
>> In fact, I'm thinking six or seven weeks,
so you'll be right at the top of this lesson.
>> All right.
>> So on the previous episode,
we talked about what is DevOps,
and also all the tools that we're going to use.
Specifically, around mobile developments
is a little bit different than some of
the other web development and back-end services you're deploying.
So today, I figured we'd start from the beginning.
>> Nice.
>> Like file new
>> So like empty, nothing?
From nothing to a build.
>> To a built, yeah.
>> All right, let's do this.
>> Now, what we're going to do is we're going to
go into Visual Studio Cranium project,
and we're going to push our Source Code. So let's do that that.
Now, I'm going to come into Visual Studio,
and I'm going to type in mobile here.
We'll have all sorts of mobile templates.
We're going to create a mobile app for iOS and Android.
>> Okay.
>> That's going to be our focus.
It's going to be a cross-platform app using our cross-platform UI,
Xamarin Forms, and it's going to use
a .NET Standard Library, share code.
We could share with other projects here.
But everything like I said, we're going to show,
like what we're going to demo with a Xamarin app,
it actually applies to any mobile app.
So whether you're using Xamarin Forms,
Xamarin or you have
a Windows desktop application or Mac application,
anything like that, this process works very similarly.
>> Well, that's great. So just to be clear on what you're
showing us we can also do this for desktop apps as well?
>> Absolutely. Yeah.
>> Cool.
>>Yeah, we'll walk through there, yeah.
>> Okay.
>> So I'm going to call this a Hello DevOps,
seems like a good idea here.
So let's do Hello DevOps.
We're going to create this project.
We have a bunch of different templates.
I'm going to do a blank app,
File New, blank app,
but it has some new Git packages,
it has dependencies, it's not just seeing a blank,
it has some stuff in it.
We're not even going to run the app
because when don't even need to at this point,
because a File New doesn't run then we got problems.
So we're just going to save everything.
It's going to resort the new Git packages,
but let's look at this project structure.
I mentioned we have an Android app,
an iOS app, and our .NET Standard Library.
It's .NET Standard, has some new Git packages.
>> Cool.
>> Things are good to go. Inside of here,
we're basically going to try to set up a continuous integration,
kind of build, our first build for when
I push code Android and iOS build.
>> Okay.
>> We're not going to generate a package,
we're just going to do a debug build.
>> Let's just compile it.
>> Let's just compile it, right?
>> So where are you going to store your Source Code?
>> So we're going to store this Source Code.
We have a few options.
Well here, I am going to have first come into
Visual Studio in the bottom right,
I'm going to actually add a Git source control here.
>> Okay, cool.
>> I'm familiar with Git.
That's what I've used for the last decade or so,
and that's what I'm going to use.
>> Nice.
>> What I love is that Visual Studio jumps in,
and says, "Hey, where do you want to push this code?"
I can push it Azure DevOps,
to GitHub, or my own remote repositories.
So maybe at Bitbucket or your own Git repository, you're good.
We're going to put this on GitHub.
>> Perfect.
>> I'll put on GitHub.
>> All right.
>> I like to do it on GitHub because this is going to be
an open-source collaborative project.
So we're just going to do this. I've already
signed in, let's created public.
We'll say this is mobile DevOps project for mobile.
There we go, and we'll publish it.
Literally, what this will have created is only my iOS,
Android, .NET Standard project, it's going to
create my Git local repository.
It actually just published this to GitHub. So it's there.
>> Wow.
>> They created a Git attributes,
Git ignore files, and it has everything that I need.
>> That's about as easy as you can get.
>> Yeah. Now, I have source control,
I just press two buttons.
>> That blows me away,
because it literally was just a couple of
button clicks and, bam, you're done.
>> I'm done.
>> All right, CodeSource and source control.
>> We are done. What's cool is that I
can create additional branches.
So as I'm working on features,
I can create branches.
So if everyone doesn't commit to master,
I like to call that the truth branch,
you shift from master.
So I can create feature branches,
and then I can build those branches,
and I can set that up myself.
>> Cool.
>> So we want to build this thing.
>> Right.
>> So in the first episode,
we talked about we have Azure DevOps,
and we have App Center.
>> Correct.
>> Now, both of them offer Cloud builds.
Now, App Center, I'll talk about that
and maybe you can talk about the cool things that DevOps we'll do,
and we'll set that up in the next video.
But App Center here,
what I'll show is that App Center
itself is a series of mobile specific build environments.
But it does more than just build,
I call it the getting starting to build because
it has like an optimized path that it follows.
I'm not going to call it a pipeline, okay?
Because it's like I'm going to build your app,
and your app is built,
and then you can do something with it.
>> Okay.
>> So I like to do this in,
I only have just an app that I'm going to build,
nothing special or I'm just getting started like I am today.
I just want something to happen.
>> Sure.
>> App Center though, the parts of we're actually going to
use and do orchestration on are the testing,
releasing, and monitoring it,
and we're going to do that via DevOps,
because DevOps is a lot more.
>> A lot more powerful.
>> Yeah.
>> So let's get started there,
and in the next video we'll set up a CI full pipeline in DevOps.
>> Cool.
>> So bring in App Center,
and I've created an account,
you can log in with all sorts of things.
On the left-hand side are all my organizations.
I did Seattle give camps,
so I have a lot of organizations,
I do a lot of community work.
I have my Xamarin show organization here.
So you can create your company.
Maybe it's Abel's Rockstar group,
and then I have a Xamarin group.
So these are my different parts here.
>> Cool.
>> It's a little bit different.
We create our repo and that has multiple apps.
App Center thinks of each project as its own separate app.
>> Okay.
>> So you have an organization that has multiple apps,
but an app is literally an iOS or an Android app.
>> Oh, okay.
>> So you don't think of it as a project,
you think of my project is my app.
>> Got it.
>> So we're actually going to set up two apps.
Inside of here when I say new app,
we're going to say, HelloDevOps-Android.
>> Okay.
>> Then what I can say is I can give it different groups.
So we're going to say this is going to be
just my Alpha release type.
That's just more of a indicator for me later on of what this is.
So I could build my app multiple times,
maybe I have a full one for the App Store, for instance.
Then here, there's a lot of options.
Notice, we have iOS, Android, Windows,
and Mac, in different platform technologies.
>> Got it.
>> This is very different than
maybe other DevOps products because it's not a DevOps product,
it's a series of things for your app.
>> Very specific to mobile and desktop.
>> Very specific, yeah.
So I'm going to say Android,
and then I'm going to say this is the Xamarin app.
>> Okay.
>> But notice that it has Unity games,
React Native, Java, Kotlin, any of your apps.
>> Sure, can be written in whatever
mobile language you want to use.
>> Anything you want, yeah.
So I'm going to say say, New App. This is going to create
my new Android-specific app.
They have SDKs that you can integrate into it because
we mentioned, it's not DevOps,
it has a bunch of DevOps Services in it,
but it gives you the ability to build,
task distribute, monitor your application,
then do other things such as authentication,
data and push notifications.
>> Would it be fair to say that App Center is
a collection of tools that are
really useful for of the mobile world?
>> Yes, absolutely.
What's cool is you can use one or many.
>> Okay.
>> So if you only want to use distribute, only use distribute.
You can use as much or little.
So for now, we're just going to set up a built,
in here I can connect it to Azure DevOps, Bitbucket or GitHub.
So here, I've already logged in with my GitHub,
that's how I actually created my App Center account.
>> Okay.
>> Here I'm going to search all of my GitHub repo,
so it's going to take a second to come up.
Here, we have I typed in hello,
and then I have hello DevOps.
>> Cool.
>> So this is going to show me all my branches. I have one branch.
What App Center does it says,
for every branch, you set up a different build.
>> Okay.
>> A different way of looking at it.
I usually set it up as a smoke test.
So here what we're going to do is we're going to
say configure this build,
it automatically scan my repo,
it's something cool because it knows that
it's a Xamarin Android project.
>> Yeah.
>> It's created a special build configuration,
and all of the services are very specific to Xamarin Android.
>> Go it.
>> It knows about me, knows about my ap.
It's has done everything for me,
it says do you want it in debug or release?
We're going to do a debug, smoke tasks.
Here, it also gives me the ability to configure
what version of Xamarin Android do I
want to build on because mobile apps,
you may need a different version of Android,
and Java SDKs, and Xcode versions.
There's lot of dependencies, right?
>> Sure.
>> You can't have all of them inside a machine at one-time.
>> Right.
>> Like a .NET core,
you might have 20 SDKs installed, right?
>> Yeah.
>> You can just install one willy-nilly.
But here, these are essentially think of them
as Mac VMs, in a way.
Mac build machines, I don't know if there's build
machine agents that are hosting up by App Center,
that have specific versions of Android installed.
>> Cool.
>> So we'll use the default, the latest version.
>> Okay.
>> That's nice because I select one,
I know it's going to build.
It doesn't change on me behind
the scenes and I can go back and pick it.
>> Yep.
>> There's a bunch of other things inside of here
like that I want to build with every push.
Do I want to Environment variables, signing,
and these simplistic starting point for my app,
but I'm just going to say, "Save in build".
>> What this is going to do behind the scenes,
is set up a full build infrastructure for this app.
>> Okay.
>> Now, every time I publish code to it or do anything,
it's going to look for the source code changes.
Here, it's going to sit and wait for a build agent to come up.
>> Yeah.
>> What's cool about this is when we talk about Azure DevOps is,
it actually running in VSTS Azure DevOps,
like pipelines behind the hood.
>> Right, yeah. As we say, that looks awfully familiar.
>> Yeah, and so now it's going to initialize these steps,
do everything but it's kind of Sandbox, right?
So it is this kind of getting started workflow
where I know when you are talking about ASP.NET version,
there's a lot of different parts to it.
>> Yeah, large parts.
>> So how does this compare to what you've seen in the past,
as far as builds?
>> In some ways, it's super simple, right?
Because you can make the assumption.
This is a mobile app, this is an Android app that you picked,
and is using Xamarin technologies, and these were the versions.
So based on that, there's a lot of manual stuff that
I would have needed to do inside of Azure DevOps, Azure pipelines.
I would have to choose, chosen
the correct steps and stuff which just blows it all out for you.
>> Yeah.
>> So it's fast and easy.
>> It's fast and easy but also now super configurable.
>> I was going to say you're a constraint, right?
You can't really customize this to make it.
Like for instance, if I happen
to have a whole bunch of unit tests,
how do I run those, all right?
>> Correct.
>> So this is just like a quick and dirty built.
>> That's what I think, right. I want to get something building.
I want to prove to my manager that I can set
up a very quick build
and if I push code, I can see that's going to fail.
>> I've noticed you didn't have to have
to set up with build agent,
install all this stuff on machine, it's just bam.
It just click a button and it builts.
>> Is there and it just built my app in one minute.
>> That's sick, that's awesome.
>> So now we'll do the same exact thing
but now we're going to do it for iOS.
>> Okay.
>> Because since that was an Android app,
it has to know now that it's an iOS app.
>> Right.
>> So here I'm going to say,
"Hello DevOps iOS. ".
>> iOS.
>> That's my best practice.
It knows that it's Android because
there's an indicator but I like it in another name.
>> Sure.
>> Again, here we see different options.
We obviously see Objective-C Swift.
If I was to tap on "Windows", there's "UWP", "Unity",
and then Objective-C Swift or Mac OS
applications but here I'm going to select "Xamarin" again.
Here we'll just go ahead and say, Alpha for
funsies and say, "New app."
So now I have like these multiple apps that are in here,
and I'm literally going to do the same thing.
So inside of here,
it's going to know what do I need to connect to.
Every app is connected to a different repo.
So if you had an app in a different repo for instance,
you're on, Hello DevOps too or whatever.
You would have a different app for that.
So here, it's Master.
Click "Configure", and then pretty much is the same.
It's found different projects.
>> Sure.
>> iOS projects, you build the solution instead of the project,
and knows about that.
Here it knows about specific SDK versions but specific to iOS.
>> Got it.
>> Then what's interesting here is we didn't see this in Android,
and it says Xcode version.
>> Right.
>> Because Android has built in
Java dependencies and Android SDK but iOS has Xcode dependencies.
>> All right.
>> So you get to pick and choose,
and if you go further back in time,
like these things are going to change.
>> Got it.
>> This is important because you may have
to build your application and composed in an older version.
You're not ready to move on yet.
It's a little bit complicated but
they have all the different pre-built things there.
>> Yeah. It really simplify the process.
>> Checkboxes, radio buttons, boom.
>> Yeah.
>> Again here, difference
here is this is going to ask us if we want
to build a Device Build or a Simulator Build.
So here we're going to do simulator
because it'll be quick and dirty.
We're not signing it.
We haven't gone to Apple.
We haven't provisioned anything yet.
We're going to say, don't sign anything like literally
just build the quickest thing possible,
and then we'll just go ahead and say, "Save and Built",
and just like on Android this is not going to
configure my iOS build for me,
and then at least at this point within the last 15 minutes,
we've taken File New,
we've pushed it to GitHub,
and we at least have a smoke test built-in.
>> Yeah, you've just created a build for
iOS and Android like you said within 15 minutes, right?
Less because we've just been chatting.
>> We've just been chatting, yeah.
>> That impresses me because I know it would take me a little
bit longer if I tried to do this inside of Azure Pipelines.
>> Yeah.
>> Or any build system really.
>> Or any build system too, because the difference here is like
App Center at least the build part
of it is super specialized, right?
It's like so specialized,
and they have that constraint system built in.
Now you may be saying like,
well maybe you are already building it in DevOps, right?
Or maybe we're using some other CI Pipeline,
the nice thing here is that while we're going to start and build,
we're going to actually switch everything over to
Azure DevOps because what we're going to use App Center
for not only is this great smoke tests which we can just
leave in place like why not have a
built in multiple places are for funsies.
>> Sure.
>> But we're going to use the UI testing,
the distribution and we can
add in some analytics, and crash reporting.
>> Cool. I can't wait to see those as well.
>> That'll be important because we'll see exactly how
Azure DevOps integrates with
App Center to make it seamless together.
>> Nice.
>> But hey, in a few minutes, we're building.
Let's see if our build for iOS is going to finish.
We'll see how fast it is, right?
As I like to see like we have these super fast crazy machines.
I was testing it earlier and it looks like, it's buildings.
It's fun to just watch what it's doing sometimes
and it's copying files, doing things.
>> So I've a question while this thing is building,
I noticed that you create a build for every branch.
>> Yeah.
>> So if I happen to like,
I don't like long living branches because they're paying, right?
So basically I created Branch to do my work
and I try to merge into master as fast as I can.
>> Yeah.
>> If I create a branch,
do I have to actually come in here and then say
create another build specific for that branch?
>> That's a great question. So if we do that, right?
So if we come in here into
our project and let's create a new branch.
We'll say, "Hello DevOps." There we go.
>> Okay.
>> Create that branch there,
and I come back into here.
So now it's finished and I come into
my build again. We'll see it here.
>> Got it.
>> It's not configured though.
>> You still need to click it and say,
"Build this for me if
somebody checked something in or something like that."
>> Exactly.
>> Got it.
>> So there's some nice things with that which is,
hey, you might be creating hundreds of branches.
>> Sure, sure.
>> So don't do that on every single one
but then you're going to have to configure it, yeah.
So it is a limitation or a strength based on how you develop.
>> Or you want to do it. So to me it
seems like this is just a really nice tool.
>> Yeah.
>> It's a nice tool for mobile developers.
>> It's a tool in your toolbox if you choose
to build it and like based on what it does,
it might be a good tool for you but for me,
what's interesting here is that,
we're only building the mobile app.
What happens when we build, back-end services.
>> Back-end code, right.
>> Databases, functions all that stuff,
and that's where I think we'll take a look at how
we transition this into Azure DevOps.
>> Cool.
>> Yeah but hopefully you get everyone like everyone's got little
101 of App Center built at least but SaaS,
we're going to do a whole bunch of great stuff in it.
>> Cool.
>> Awesome. Go Abel,
hope that you liked it. I don't know.
>> It was impressive.
I'm impressed at how fast you've just got your builds right in,
but then it's super specialized in,
I feel constrained, right?
>> Yeah.
>> Because I want to do other stuff, and then I'm like, well,
I can't, but if I just wanted to build it, compile it,
make sure it works and quick-and-dirty,
send it to the store or something like that,
you can just use App Center to do all that.
>> Exactly, and in the next episode you'll see how
we break free of the constraints with Azure DevOps.
Make Abel real happy.
Well that you enjoyed this episode.
We'd love your feedback on the shows,
go down to the comments below on YouTube or Channel 9
and make sure you let us know what
you want to see in the DevOps series,
or just what do you think, and how
you're building your applications.
We hope that you found this useful and make sure you watch all of
the great episodes that we have in
store on DevOps for mobile developers.
Abel, thank you so much for joining me.
>> Thank you for having me.
>> Thanks for watching.
[MUSIC]