Instructor: Now that we've got production versions
of all of our subprojects put together,
we're now going to create a new Git repository.
We're gonna create a new GitHub repository
and we're gonna link it all up to Travis CI.
We'll then start to write a travis.yml file
and we're gonna make sure that that travis.yml file
has all these steps of making sure that we test our image,
we build a production version of the images, and so on.
So to get started,
I'm gonna first change on over to my terminal.
I'm inside of my complex directory,
and inside of here, we're gonna make a new Git repository
that we're going to eventually push up to GitHub.
So I will run Git in it, that will create the repository.
I'll then add in all of my code with git add dot
and then I will commit everything with git commit,
initial commit, like so, and I hit enter there very quickly.
That's what the command was.
I apologize for doing that too early.
All right, so that created our Git repository.
We now need to go create a repo on github.com
and link it up to Travis CI.
So I'm gonna flip over to my browser
and navigate to github.com.
Once here, I'll find the little plus button
on the top right hand side and click on New Repository.
We then get prompted to enter in a repo name.
So for this project, I'm going to use a repository name
of multi-docker, like so,
because this is a multi-container deployment using Docker.
I'm gonna make sure that I mark the repo as public
and then I'll click Create Repository at the bottom.
Now remember, we have one last step to do.
We need to wire up GitHub as a remote for our repository.
So I'll click on the copy link right here to get the remote.
I'll then go back over to my terminal
and I'll set up a new remote by running
git remote add origin
and then I'll paste in that link that I just copied.
We can then do a git remote-v,
and that will list off our current remotes.
Right now it's just origin.
So we can now push our code up there by running
git push origin master,
and that's gonna push all of our code up to GitHub.
We can now go back over to the browser, refresh the page,
and there we go, all of our code appears.
So now the next thing we need to do is create a link
between GitHub and Travis CI.
We need to make sure that we enable
this repository right here and have Travis CI
attempt to build the code that we placed inside of here.
So inside of a new browser tab,
I'm gonna navigate to travis-ci.org.
We're gonna go up to the top right hand side
and find profile, and because we just created that new repo
like two seconds ago, I'm gonna make sure
that I click on sync account right here
on the left hand side.
So that's gonna reach out to GitHub
and get a updated list of all of our different repositories.
And this step might take a second or two.
I'll give it like five seconds
and then I'll pause the video.
Okay, I'm gonna pause the video right here
and we'll continue the next section.
We're gonna make sure that we enable Travis CI.
Okay, never mind, it's done.
All right, we're just gonna keep going.
(Instructor laughs)
All right, we'll refresh the page
to make sure that new repo shows up on the list right here.
And then we'll do a search for Docker.
And we should see the multi-docker project
or repo that we just created up here.
And so again, all you have to do
is click on the little slide right there
to enable it as a built project.
So now we can go back over to the Travis CI dashboard
and we should see the new entry over here.
Now Travis CI is going to probably attempt to pull this repo
in just a minute or two
and run it as a build, but of course,
we don't have a travis.yml file inside of it yet.
So Travis might show an error and say,
hey, I don't know what to do, which is totally fine.
So let's take a pause right here.
We'll come back to the next section
and we're gonna start working on the travis.yml file.