Transcripts
1. Pipeline intro: Hey, looks here, stand up for the champion,
stand up for the champion. For you to actually
make it here, you're an absolute champion. You've been able to
complete the first class, which is the core
moduli it features, and now you're
here to understand the CICD pipeline to see how everything
will go end to end. Kindly note, we're going to
be looking at the core CICD, what it entails,
things like job steps. Injecting environment variable, injecting secrets,
using custom action, storage and download of
artifacts, gutting Docker images, or login and pushing
to DockerHub, all these many more you will
find in this very class. I'm going to take
you first of all, you will go through
a very agnostic. That's a modulitic
agnostic step. We simply mean. That's
baby good, actually. We simply mean, I'll take it through pipeline
seriously pipeline, not favoring any programming
language or any application. Then we then tailor
things down or bring it home for
you to see how to apply to the
modulate application you built in the
first class, right? This and many more you're
going to see this case and it promises to be accelerating
and very engaging. I'll see you in the next video.
2. Pipeline tools required: Hi, everyone. We're
going to be talking about the tools
using in this class. Very easy. We're still
going to stick to our IDE. We're not going to use
anything different. We'll building directly
within the Intellig. Intellig just sufficient. We just be leveraging
on Intellig and Github. That is all we need.
With this set, I'll see you in the next video.
3. Pipeline flow chart: Hi, everyone. Z here. Okay. This section
is primarily focused on trying to automate
our image but. We went in before now, Do We session that's the
production very features. What we did was try to
build the image manually. We run the Docker
command manual. We don't have to do that.
Fortunately for us, we'll be making use of
Git actions, right? So the idea behind the idea behind using a pipeline
is all about automation, trying to eliminate user inputs. That's what we're trying
to do. Once you set it up, you can be sure that
and it's tested, it is foolproof so
you come overhead. That is what we
intend to do here. Leveraging this, first of all, let's get a picture of
what we intend to do. I will be using Jerod Ohio. This is a free tool, which
you can also use, right? I think are my past projects.
Let me just descart. Yeah, I have everything
already set. Just take over. Okay. All right. So let's leverage up let's have a few of what
we intend to build. What we will do is that we're going to have
two sections, right? We're going to have
these two sections. The first section is going to be the beauty section, right? We're going to have
the But section. Let me bring this in. Let
me just pick some image. Let me pick this, the generals think I think this
should be enough. T should be enough. Okay.
So we're going to have, I think, let me take a text. So we're going to go
to have But section. Okay, so we're going
to have two sections. Let's leave the sections. You have two sections,
the sections are going to be the build section, and then we also
have the push image. Let's just call it push
image section, right? We need to understand
what this does, then it give us a good idea of what we
want to do. All right. I'll try to diagrammatically
represent this. Let's start. Yeah. So when you
push your code, right, what do you
expect to happen? Push your code, you want something like an
automated pipe lab to kick in to run your code,
once you run your code, then probably in a
virtual environment or a particular environment, try to build your
moving dependencies, pull all the details, right? So let's keep that in mind. We always refer to this
guy while we build. The first thing is once we push, so let's label that push code. This is the only step you probably need to
do push your code. So once you push your code, ick. Once you push your code, the next thing is that you want to push
the virtual environment. Let me label this as a
virtual environment. Let's pick this. Pick
this entropy here. Let's call it
virtual environment, let's call it via
virtual environment. Let's just call it virtual
literal environments, environments or a container,
whatever it is, right? This is where your
code will be put into. Then once you have this, the next thing is then what do you want to
happen within this guy? What you want to happen is
you want to set up your Java, set up Java Beameber just
like a local environment, you have to set up
Java, set up Maven, set up Maven, then pull
dependencies, pull dependencies. Dependencies. I spell
this dependencies. Pull dependencies, right? Once you are able to do this, we pull dependencies that
we want to basically run. We want to do is looking at it, what is the next step
you probably want to do. The next step will be
pull dependencies. After setting up Java, or environment may
we put dependencies. What does nesting want to do? We want to build the image. We want to build the image. Let's move that to
yet another section. Call it image. But image. Let's use an arrow
for diction of flow. Let's take this stuff
sky production of flow. This guy comes here.
Then we have this. Then we also have this right. Okay, so beauty image.
So this is what happens. So the moment you push
a code to get up, this happens, then
build an image. Then after building your image, you build your jar Sorry, this should be a beauty Jar file, not image, jar.
That's what I mean. Sorry. So But Ja file. After building the Ja file,
what do you want to do? Remember, we have a command that does which is the Mv in clean
package. Remember that. So that's what we're going
to use. Then Build Jar, let's say But Jar with profile. Remember, we specified a lot of profile, what are the
profiles we have? Let me check the cost
again. This is the modulus. We have the Dev, the Docker. We don't want to use Dev, because this is my
local environment. We probably want to
use this I would say, Let's but I think this
will be sufficient. Let's use this profile
which is Docker. If you're using the
profile, which is Docker. Right? If you're using it, so we have to specify
the profile docker. But jar with profile. I believe you guys understand what I'm
trying to bring out here. Okay. Let's be sure that
Ja file but successfully. Let's be sure that Ja
file successfully. We are going to do we are
going to list the file. Let's list the file buts. That will give us a good idea if we've done the ripen, right? Done the writing. S,
let's call this why let's call it is list files. When I say list files, we want to list what's the jar that was built in
directory or the likes. Now, this is more
like the first step. However, it's a
virtual environment. This is the first step
of building the image. Now, we now want to go
to another section, that section will be
a case where we want to push the image, right? You want to now build
the image per se. That is the want to build the application
image, they want to push. So to do that, right, I'm going to add two
more steps to this. You can do all this
in one go, right? But I'm going to add
two more steps to this. And the reason is because
I deliberately want to show you some features
about gear actions, right? So features about gear action. So what I would do is I
will come in here and I would say let's
uploud the artifact. Now, why is this necessary? This is necessary because
we can always trigger the same job or we can save our artifacts but we use
that for later time. I'm going to say
upload artifacts. This is very essential. Once it discovers that there's a part where you
can easily cache things, not to actually dude, which we are going to
see primarily within this section because we don't want to be pulling the
dependencies every time. We want to actually cache to ensure that things
actually move. So we push the image, we set up our details, we'll build the jar
with the profile. They want to list
the files we want to use that is necessary
for building the image. The the file that is
needed, apparently, I think we need to
think about it, I think we need our JA file,
we need our docker file. Those are primarily
the two primary files we need to actually build our image because the
Docker file will tell us we we tell exactly how we
want to build the image. Then the Ja file is
basically the guide that we run within the container.
We want to upload. Let me just be consistent,
upload artifact. Step one. We have this. Step two. Step two now, what are we doing in step
two? We want to take this. We want to download
the artifacts. Want to download the
artifacts Artifacts, T on download artifact. After downloading the artifact, let's output the contents. Let's also list the
contents that we have. Let's list it. Let's
list the content. Let's list contents. Let's list content. Let's
be sure that what we uploaded is the same
thing we've downloaded, right? Let's list content. This is I know why it's pretty, but I just want to
just elaborate. So once we have done
so now we have this. The next step is basically
we want to login. Remember, you are either
using Docker Hub, you want to push Docker
Hub by private registry. Either Docker Hub a
private registry, you basically need to log in, you need to log in
to the environment. For Docker I do Docker login. There's a command called Docker login you need
to actually use, but it's a better
way which would see. Here we say let's login. I'll just say Docker login. So I'll login. So as I log in because that
would actually give me full environ access into my Docker Hub account.
So I'll do this. So okay. All right, so login. Remember, these steps
are sequential. That's I placing them this way. Then we log in. Then
what do you want to do? So after login I think
the next step is clear. We viewed and push the image. Now, it should be
Bute then push, but I'll place it
together and you see why. You see why in a bit. So
call it Bute and push. So because there
was something I'm going to show you guys
which is really awesome. Rather than building
one step and building, there's something we have like, Okay, let me let the
cut out of the bag. That's basically what
we are going to be looking at in the
next section, right? So we'll be building and
pushing to Docker Hub, right? So once we have done so, I think our steps is as
good as complete, right? Our steps are as
good as complete. So because that's
the primary goal. The primary goal is to
when we push the image, we want to push
out out to Github, we have a virtual environment
automatically spin up, and this will actually
build these details. Once it builds details of Java, the Mv in, pull
the dependencies, they want to catch for later for another trigger once trigger again once
you've done this, you build the jar with profile. Once you build the jar, want to list the file and
the files basically here are the Dockerfile
and the jar file. They want to upload the
artifact for later we use. That is step one. Then step two, you want to come in here, download the artifact,
you uploaded here, list the content to be sure is the same as
what we have here. Then we log in,
don't but the image, don't push to Docker Hub. I'm using my private account. Okay. That being said, what I'm going to do is
I'm going to save this and shows part of the files. So I will push this
to Github this image to Github so you can
always reference later, right? It's no why it's pretty, but I just want you guys to have a feel of what we intend to do. So what I'm going to do lastly, I'll just call this step one. Step one, step one, then pick this and
place it here. Let's call this step two, right? Step two. Step two. Step two. All right. Now, we know this is all
dependent on each other. But however, let's continue
in the next video.
4. Pipeline start: Hi, everyone. Zee here, thank you for coming
back with me. In the previous video,
you actually looked at this diagram to see exactly what we're
going to be building. You can always refer to it. I would actually refer to this every time, every now and again. I'm going to push this so
you can make sure that you find this in the repository when you
actually look at it. Now, the next step on
you think about it, if you think about this is should you run this in parallel? Step one and Step
one are dependent on each other. So
it'll be sequential. The answer is it has
to be sequential because even though
we go through this, whatever we want to
do here is dependent. Step two is dependent
on step one. Be step two is
depend on step one, so we need to wait for the upload to finish
before we then go to the other step to
actually pull details. All right. Um, so that explained
that totally explained. So I think it's time for us
to now move to something more concrete for us to now see exactly how we have
this planned out. So with that being we'll
be exploring Github. We're exploring GitHub to see
what we will be building. So this is, okay this is
one of my other courses. Let me just switch to my course. Let me just switch
to the other course. Okay, so this is
swing Modult course. Okay, so in Git actions, sorry, in GitHub, we have called actions, called get actions. So actions, you could primarily see actions like your
basic pipeline, right? Everything you will do with
ajo pipeline or you will do with a Jenkins a Jenkins DSL or Jenkins pipeline file. Right? It's exactly the same
thing you would do. Now, they just have
different syntax. But some things
are quite similar, but you just have a little
bit of different syntax which you used to probably the same the body all achieve
the same goal. So I want you to have in mind. You don't have to
learn everything, but you just need to have
one solid good grasp of one. And which is why I'm showing you the ones you can
actually have for. Which is Git actions. The documentation
is quite powerful, I go through it and
I can tell you see, I've not learned
everything, but it's still quite a number of things, but you would always find
what you need to use, always have what
you need to use. We'll be exploring Git actions, and that is exactly what we'll be using to actually
build our pipeline. Now, we could go
ahead to say, Okay, since we have a moving project, let's just pew the
moving project, but this would have
been bootstrapped. A lot of people have
be bootstrapped already. I don't
want to do that. I want to show us exactly
how this will work and how this will work is that we'll go within our
projects, right? We'll go within our project,
then within the project. In the root file
of your project, which is basically this
is exactly what you're to get root in this root
file of your project, so this root fold our project, you create a directory. And a directory must be
labeled dot Git Hub, right? If not, called Dot Git Hub. So the moment you actually
press a Dot GitHub, that's exactly what
it is expecting. You must label a GitHub. It must not have
a different name. Dot GitHub. That is how it recognizes that you're
trying to push an action. All right? Okay. So
now we have that. Now, what is the next
step we need to do? Within that Github. There is something
called workflows. Workflow is like, we
have several flows. You could have within the
same project sever flows. You could have a
flow you could have different deployment flows for several things to
do several things. But be focusing on one just
to deploy or build our image. Within this, you have to create another file called workflows. It must be the
exact name please, the exact name, workflows. Exact name. Now, within the workflows, we don't create a Yarmofle. Now this Yarmofle could
be any name at all. It could have any name, but
it must be a Yamal file. I'll call this deploy dot Yamal. This is the guy would be using. Now automatically, I have to, I have an intelligence
here saying now you can create a file without it
needs all these properties. We'll get to this we
get to this in a bits. I need to understand this. Going back to this once again, I have created, I'm trying to explain that for your
action to trigger, you need to have
this file within your package using
the deploy file and the file must be use deploy
Yamfi can be any name. It could be maybe pipeline or Yarmo doesn't matter,
but it must be a Yam. It must be within
the workflows folder and roflesFolder must be Dt Github and Dt github must be at the root
of your project. Okay. Since we have a good
understanding of that, I think it's time to
start jumping in. It's time to start jumping in. Now, there's a basic form
you need to actually. If you check the documentation, there's a basic form
they actually explain. Number one is your workflow
or your deployment. It needs to have
a name. It needs to have a name. Let's
give it a name. We have a name. The name what we call it,
we call it I think we're trying to the goal is to build an image, Build push image. I'm going to call
it let's call it a build push image be anything. The name could be push image for production or for deployment, whatever you want
to call it, just give it a niname Any
fan syname fine, right? Now, once you've
given it the name, the next thing is expectance. How do you want this
action to be triggered? Now, there are several ways, tons, numerous ways where
this can be triggered today. How do you want it
to be triggered? Define it by using the keyword, then I will be saying I want
this to trigger on push. Now, if you look
at this, you see, I just press a P.
You could do this on pay viewed projects,
PogRquest, Book review. So you should basically
explore, right? Explore. You can
basically explore. So I I need to actually
have this idea. In fact, you could
do this on issues. You see? There's issues.
Let's say you have issues. Remember, we were actually
working on issues sometime ago, had
this get up issues. So you could work
on issues. So if it's this project, you
could work on this. So you could say, Okay, on
issue closed on issue book, remember we tried to close several issues on the
chance with the deployment. So that we're going to do. So so I'm saying you could
actually use issues, right? But we're focusing on action. And what we are really
interested in when we push the code to get up and pushing the code to give
up push is a push action. So that on push. So that's the verb
basically on push. That's what we're trying
to actually target. Now, even though we are
even using on push, this in itself is
not sufficient. If we just label it on
pushing we are saying any push to any branch, right? Any push to any branch. Luckily for us, we can
go a step lower to say, I want to specify
branches. You see? You could ignore some branch or you could use some branch. Now, I can't fully explain everything that we
have on G action, but I just wanted to have a few. It's about you thinking, think
about what you need to do. W you think about, you
can easily access it. Now, I could say, I want this to run for main branch
for Dev branch, but should not run for
probably a feature branch. You could place the
feature branch on this. This is what I
mean, I could say, my primary aim is to make
this run for main branch. This run for main branch. Then I could say, I want to
ignore I want to ignore, so I will ignore for
probably feature branch, if I have anything called
feature branch, right? This will not run
for feature bad. If I push anything
to feature but, it will never run, right? I need to actually
have that idea, right? This is basically. You could watch this,
but I'm going to remove this just to for us to
have exactly what we need. Exactly what we need. This way so that when we're building
a personal project, we could know exactly
what we need to do. All right. So we're
going to take a shock break from building this so now move into something
a little bit more detail. Now the next step is,
we could have Remember, we have environment variables. These environment
variables to determine. These guys we actually defined all these environment variables. While we are running, remember
we are ing in gaction. We are no longer running
on my local system. As a result, where will file where will
these guys be found? This file will be
found in environments. Luckily for us
also, we have what we call ENV environment. We have environment. I can go ahead and define all
the environments. Example to say my
spring profile, and spring profile, remember
we use sprint profile? This I'm using sprint profile. Even though we know
sprint profile active, spring profile is exactly what will be read into
the Docker file. Remember this Docker
spring profile here. That's I'm being consistent. All right. I could
say spin profile, do this, let's just say Docker. I say Docker, then
probably model it host, the host, local
host, local host. But it's a better way. This is me manually
defining it within this, but give her gives us
something better for us to do, something better for us define where all our
environments could be. That's what we'll
be exploring in the next video. See you guys.
5. Pipeline first run: Hey, everyone, e here. Okay. So I told you wise, I should create another
that's another application am which we use for action and define I'll tell
why in the bits. This is the reason.
Let's duplicate this, let's call it action. We're using action. Now, why
did I decide to do this? The reason is because
remember our Dockerfile, that's the application,
the Docker environment, the DA profile uses a DDL
tool, which is known. But we don't want that.
We don't want that. We want this guy to be update, want that to be update and why
remember we used Remember, if we have any table
all the tables we actually have within
the project, these tables, basically, this guy, all these guy will be
expecting they are created and if they are not
created tron exception. Remember, Mtell tran exception. As a result, this table,
the Mitron exception. Let's use update that
way would ensure that the tables will be auto created in the
virtual environment. The member is a
virtual environment. Because it's a
virtual environment, everything we do at every point in time dies,
except those we catch. If anyone we don't catch, it dies with the container
or you spin it up again, so with the virtual
environment, it reloads. So we are safe to use updates
every single time for that. So that is why I decided
to use induction, so I don't end up
modifying this Dockerfile. So as a result, doesn't mean we are going to
recreate everything. We create everything once again? No. So what I've done
is I've gone ahead and created an environment
called action. I've created an
environment called action, which is the exact
same replica of this. The only differences.
The only difference is this. The only differences. We have seven variables and using it because
I added a profile. So this profile, other than use action, I'm
going to edit it. I'm going to call it action. So action is what
we'll be expecting. What's okay, action.
Let me minimize this. No, no, no, no, I
don't want to delete. So I want action. Okay, so date variable. I want my password. My authentication code because it sees it as a sensitive code, so we need to actually
place details there. This is fine. I actually
have this setup already. So I'll just pass in
my authenticator code. This is a one time we don't
try to mimic because it will not work. One time
news. All right. I've edited this. We have all this already available,
we have to secret. The secret and everything
remains the same. So to avoid confusion
when people actually come back
to this course to look at this and say,
why do you have? I'm going to delete this
docker and delete this. So we have action here. We've done the very basic thing. The first step is completed. Now, what's the next
thing we want to do? Now we have this completed, we can then go back to our file, the file we're building
earlier, this action file. Now, we don't intend
to use this anymore. We are not using this
environment anymore. All we then need to
do is that will come within we have jobs we
have a build section. I'm going to explain
this in a bit. I quickly want to specify where
we place the environment. They have environment. And what is the name
of environment? Action. Please
don't get confused. The action I placed here. This action here
is spring profile. This environment is the Docker
is the GitHub environment, GitHub environment
action. Where is this. This get action, this
action here, no get action, environmental action
is this environment. Then what about the
spring profile action? The spring profile
action is this. Please understand
the difference. Don't get confused
about it, too. I thought I should
actually mention that. Okay, great. Let's go back. So this is where you
define it, right? It's where you define
it now. What is jobs? Think about it, you could have what do
you want to do, right? What do you want to do? Think of jobs as the same thing
when you want to run a cron job or you want
to run a specific task. Let's use that word. You
want to run a specific task, and that task basically
is called jobs. So you define anything you want to do is
defined on the jobs. Now, from the name, you
can see it's plural. No one, plural, meaning
it can be many. So that is why you need to now give each of your job a name. H of your job a name. And that is why this is you
can notice this is all built. So I'm calling this
the Bute job, right? The built job section. So you can name in any name. Give it a built section. It doesn't matter, but
just give it a name to distinguish one job
from the other, right? So I'll just leave this as bulled leave it as
built. Now we have this. Okay? So, what about the other section
we're going to run? The other section
we're going to run, it will be called
the push image. I'm going to call it push image, right? Push Image section. Call it pushimage section.
That's exactly how. Now this is complaining
because he's expecting me to
finish up my detail, which I have not done, but
I just want to show you guys how to matrona your Mfa? So I could leave this as But section or give
it a name, right? Give it a name that
distinguish it. So I would commence this out because we'll come
back to this, right? We'll come back to this. So now that we have the action, you need to specify
to get action what environment you want to run the application on, what
environment, right? What environment to actually
define that you have what we call it runs on the runs on. And it runs on specify several containers
that can be used. I'll be using Ubon to latest. How you'll be asking, How did I get to know
this information? Oh, that is pretty easy. So once you actually once you
actually go to Gear action, let's just go to
what I usually do Gear action job So this is our search using jobs
in the workflow using jobs. So if you go down, you will see saying these are
the jobs that can run. Let's give you a typical example of how your job should
look like. You see? Jobs, then you one job too. I just label mind dued action. So I needed you guys to
actually see this, right? So now that we have
this, let's go back. Let's look at using jobs. If you want to use
job, using jobs in the workflow, right?
We have this. Now, we have to
configure the runner. This is what I was looking for. You choose a runner, right? Which is where we
use the runs on. You can provide the runs on and it tells you the
variations you can use. Let's go down to
see what you can. You see? If you specify an area
of stremT one then, for example, here the job we only run on this,
which is this, right? So you can explore several
details to it, right? Choosing self hosted runners. So look for what
you actually need. I want to run on Ubuntu, I used the word latest in. Using latest version
of Ubuntu, right? Using latest version of Ubuntu. So these are the
available versions. Can you see, these are
available versions. So I'll leave this link,
look at this link. I'll leave this link, right? These links. So I would leave
this link for you guys. Let me just paste it
in my file or place it in the resource
section so you guys can actually come all
the links you get, which we actually
use to navigate. So you see you can
specify Linux. You can use a Windows,
a Windows environment. If your job watch running
requires a windows. Let's say you actually want some command that we
actually power shall biz or or MAC. So define
whatever you want. So I will be using and Ubuntu,
I'll use Ubuntu letters. It says, Ubuntu currently uses the Ubunt 22 oh
four Runner image, which is exactly what I'm using. So this is fine. This is what I'm
going to use. This is enough for us to do
what we want to do. I think I've been
able to specify. I don't want to over
flog this issue so that you guys can always call
me I'll share the link. All right, let's go here. Now, I've actually said I'm going to be
using Ubuno latest. Now the next thing is
the next thing is, what about what about the environment I'm going to be using the environment
that I'm going to be using. Remember, I don't need to define by defining this
environment alone. Within this job, which
will run on Ubuntu. Within this virtual environment Ubuntevery all these environment to be available by default. I need you to keep that in mind. All the available everything will be available by default. Now, this being said, the next question is, what is the next
thing you want to do? We now have this environment.
I want to get my code. How do I get my code? But however, how do
you even proceed? The next bit to proceed is
you now have within a job, tell action, what are the
steps you need to perform. I hope I would love you guys to watch this so this can stick. What are the actions
you want to perform? The action you want
to perform with this can be labeled as steps. At each step you have, you
can have several steps. Meme you can have a job. You have several jobs that does several things. By default. By default, every job
runs in parallel. I think I need to mention that. By the voculy documentation, every job runs in parallel. If you want it to be sequential, you need to actually tell and there's a
way you can tell it. I'll show you guys
in a bit how it. When we get to the
push Im section, I'll show you how jobs
run sequentially because the push IM will be dependent
on the bit section job. We need to tell the
step we want to follow and every step must have a name. All right, what I want to
do I want to get cold. Let's get the cold,
get source cold. I'll call it get source cold. Okay. So we have something
beautiful here, right? We have something
beautiful here. So how do I get it? Now, without even proceeding, we've covered quite
a bit here, right? We've covered quite a bit,
but I've not done anything. So because we've
not done anything, I don't want to make
it too complex. Let's push this,
right? Let's push this to Github, and
let's see how it was. All you need to do is
just push this file. Once you push this, this
will kick in immediately. So any change that happens on push will actually
cater for this. So I'm calling this
guest source code, but rather, let me just
print out something. Let's just say print something. So your step could be anything.
I just print something. I'm going to call this
I'm going to say we could use a run there is this
run command. I run command. It's available in
the step section. Just check the step section,
I actually find it. I'm going to display that in a bit, but let's just
quickly do this. I'm going to echo. Let's
echo something else. Let's echo something.
I'm going to say, Hey modules I am
running something. I am printing
something. Something. And that is all I want
to do. This being said, let's actually give our action. Let's create an issue so that we can actually
track this, right? I'll say action starts or
just call it pipeline. Let's just call it
pipeline, right? Pipeline pipeline one. We could actually just follow through one
after the other. I'm going to commute this with
this pipeline one message. Come here commits a CM is here, then closes, what does it close? 20. So this is 20. Okay, so let's push this
and let's see it work, then we'll come back to see Catali explore
some more features. But this is the
first thing. I think it's a good place
to stop the video. So let's push this. I'll
quickly allow this run. So let's go to my
action forward. Is a push complete? Yes, my push is complete,
let's quick jump in here. Now, as you can
see, let's refresh. Can you see? You see it just
popped all of a sudden. There was nothing under actions before other than what you did. We should just choose a default. But because we labeled
it the way we did, this has already
figured out that we just pushed the
commits with this name, and if you open it
up, you can see it recognizes a file,
which is a deploy file. You could see we only set
the but section alone. If you but a but
section, what do we see? It sets up a job for
you automatically. You see? Now, you run what is your putting
system? Can I see Ubuntu? And that is exactly
what you use. That's the runner image, right? And don't worry about this. These are all the
permissions it guns to the environment for it being to run the action is
automatic, right? Then, though not
totally automatic, there's some complex
things around it, but I don't think it's
relevant for this case. Okay, so you see? I just said you should
run this and see, hey, hey, molts, I am
running something. And because there's
nothing else, it run the job and
it's successful. Come on, guys, this
is a good milestone. I'll see you guys
in the next video.
6. Print env variable: Hello, guys, Z here. We're able to run and
do the first thing by running this and
things are shaping up. I believe you agree
things are shaping up. Now, coming back to our
details, we have this. We want to push the code. We want to push the code, we actually pushing
the code, so we don't. Over here, I think
I missed a step and the step should be we
need to pull the code, let's call it pull code because the push code
is the action we do. The pull code is what
the Git action will do, which is the command,
the Git action to pull the code into
the environment, call it pull action. I think this is pull code or I think this is actually
more this is better. Let's go back to our file. O. I believe someone might say, but you just
printed something. Can we not do something more amazing other
than just print? Okay. So why don't you try
to pull the environment, put the details in
the environment. Now how do you pull? How do you put the details
in the environment? Put the details in
the environment, you want to use basically
want to pull the environment. You have the EMV action, which is automatically
available to you, because it's available to you,
you can then pull that in. So you actually denote using this using $1 sign for
those that are okay let's call this you
have to call it a so just say show let just
say show hosts, right? Show hosts file. I show host EAV. Show us the environment.
Environment variable. I think that'll be fine.
Environment variable. Just want to show you guys
this also works right. Variable. Just you away. So it would actually run, and let's echo something.
Let's echo it out. Then I'll call it so use
string interpolation. Then place it in between. Then let's call it E and V. Then what is the name? What is the name?
Let's check the name. Let's check the name we used. I'll go in here, check
my environments, open this up, pick one of them. Let's pick one of
them. Mind you, don't even try log in this. This will not show because
it's not supposed to be shown. If you try to log it or you
try to, it will not show. There's a rule already
against if you try to actually echo this, this will not even work.
Then we don't even try. Let's just pick this guy. Right? So come back here. I actually have this
actually stat it out. So actually, G Actions uses a
double Cali double courier. This is how Get Actions
actually use it. So it's going to
be double, right? What's tumbling here?
Replace with a positioner. What is this? Okay, no, I think it's just right. It's just fine. I think this is Intelligent giving me
this one but this is fine. Okay, so let's see
this works, right? Guys, let's see if this works. So I would do so
let's do reduction. I'm going to call
it pipeline two. Close this apparently
should be 21 21. I'll call it pipeline two, print environment variable.
We're going to do that. Okay. So let's go here. Let's create another issue. Let's create another issue
and this issue will be called Prince inn V Variable. Let's call it pipeline. We know what we're doing pipeline, print
environment variable. Let's do this. This will be 21. That's 221. S's 21, aiable look at how I
spelled it. Variable. Close 21. Now, what
did I spell it this? Print What was I
trying to spell it? Print environment? I
think Columbia did this. So you can amend with Git
commits, da dash amend. So that would amend
your commits. Okay, so some of the changes, so print not print print, okay? So I can save this. Alright,
so then do Git push. Alright, so while
this is going in, so let's go to the paths, and let's go to our actions. You see, this has
jumped in, right? Let's go in. Okay?
Does this pass? Does this fail or C?
So I can just go in. Apparently, it passed.
Let's see, does it pointed? Nothing was pointed.
Shows echo. Let me see. Let's go back here. I tried to run this by saying,
show environment variable. Which one I wanted
but this did not run and why did you not run? Let's see. Let's
see, let's listen. Where you so I specify
the action environment. I'm saying print this guy,
but this is not working. When we checked this place, check this guy, he
tried to show this, but it's not even
recognizing it. There must be something,
there must be a detail, must be a detail. You could practically
just quickly jump into the configuration. Let me just pause this video and actually come back to you guys. Okay, guys, reading
through the documentation, I'm seeing if you're
using a Linux runner, you don't need to
actually add this. So you're going to
test it out, right? You don't need to add this. You can just use it
directly, right? So I can call it call it
trator ActratorEpoints. Attractor endpoints. We just want to see
actuator endpoints. But it saying you could also use because it is
the documentation, this one checking documentation.
This is variable. It's saying, in
addition to runner, get actions allows you to
read or set key values, environment, variables
and contents are intended for use
at different points. Then it says, for example, just this name for Basell
which is on the Linux runner, which you're using ENV
column name for Powershell. On a Windows runner.
In most cases, you could also use context. It says just use
context, dot property. I assume this to be
context. That's context. Dots the name we
actually want to access. Let's just print this to
see how it actually works. Let's do this. I didn't
change anything, so I just push this
alongside the same thing. I just commit it against the
same name this time around, but I will not add any comments. Not add any commits any
ID. Let's just push this. So let's push. Let's
see how these runs. Is it a good to print
it out or find out. So he's a runner and go to actions.
Yeah, this is running. So let's see what
happens? Let's check this out. The job is starting. Okay, let's see. Okay. Run
echo, same trato endpoints. It shows this, but I'm
still missing this bit, I'm still missing this bit. I'm going to just run it
again and see exactly. I'm going to run it in the
bargain before coming back to be sure it works, then
I'll get back to you guys. Here, guys. So having done
a little bit of research. I discovered I was
actually mixing things up. So what we're
supposed to have is say we have an environment
that we declare the legacy environment some
environment and we set this to some variable or we
just call it maybe some data. Some data. Now this is available
at job level. Let's just do this and I'll
explain what job level means. Job level environment,
the whole environment and step level. We can actually know exactly
how to actually use this. If you want to assess this, I'll say some data. Some data can be assessed with this can be
assessed with this. ENV. So this is where we use
this EV then two S, right? Sum. Okay. Then for
the actu end point, we use the keyword verse. So I was messing it up.
Use the keyword verse. I think this is a trito
what is the name again? Let me check my notes.
Actuator, exposed endpoint. Okay. ActuatorEpose endpoint. So this will be
able to print this while this will print what we saved in the sentence, right? This will actually print it out. Allright let's
test this out. Let's test this out.
Let's test this out. Okay, let's push. All right. Okay, this has gone through, so let's check our worksho. This is no fail. Just run this again so it's a
trigger, this is not fail. This cool, starting up. Succeeded, let's
see what happened. All right. Let's check the section.
Let's print something. Okay. That's what we've done before. All right, can you see? I was able to get this what we set for health and
this and this was also possible and some
data, we got some data. All right. So this
is the paraded show. Now we have a good
understanding of how it works. I was mixing it up myself. This video is already very long. Let's come back next
video and I'll explain how environment works
and get action. See you guys in the next video.
7. Print env for all levels: Hi, everyone. Z here. All
right, so we're back here. Let's talk about printing. Let's talk about environment. Now, we could have
an ENV here, right? We have an ENV here, environment here,
and we have job ENV. Let's call it, let's
give you some name. Now, this is a JobyNV. Meaning this environment is available for all the jobs will define to be available within. I'm going to test it out,
so I'm going to come here. I'll do name. I'll say print, print JobinV. I'll do run. I'll do echo. Job ENV. What is Jab ENV? Okay. So I'm going to just pick this. Don't do this at home.
Don't copy and paste. Okay. All right,
so we have this. Okay, let's say we
activate this section, I will have a step that runs. We'll have a step that run, and this step we want to run. Let's co. So this will be expecting us to what environment
you want to build on. So let's run on
Ubunzu also, okay? Let's run on Ubunzu. So let's print this also, right?
Let's print this. These are totally
I also use this to show to us that this job
actually run in parallel. You see this will run without
even waiting for this? So let's have you want to
test this environment. Now, we've been able
to test job level, right, and we're
able to test it. So we are going to go in and see exactly how this actually
play out, right? So I also want to show us there is a step level environment.
It's a step level. It's step level, ENV. I'm sure you guys
are getting the idea of how this works now. Let's call it step ENV. Envy. You guys can have
an idea how this works. Okay? I'll come here. I'll just to Step
ENV. I process here. I Okay. Then put this. I want to show the job level, the step level and so you can see that
everything's available. This step level
cannot be accessible here because it's within this. Only the job level will be
accessible in all the jobs. The job level here will be
accessible in all these steps while the step level is accessible within the
steps. Let's run this. Let's run this. Okay. Let me let's give
it a better name. Let's give it a better name. Let's amend it. Let's amend it. Code is printing
mvable all levels. We have this. Let's let's all levels closes that
should be transit I believe. Let me copy this name. Et's go to juke issue. New issue, this save. Okay, so let's save this 22. So save this. Alright
so let's push. Okay, so this is going through right now it's going through let's jump in
here. Let's take our action. Opening how we don't
have any syntax error. Now, can you see this is running independent of this.
It's a dependent. You see an arrow. So
it's independent. I showed you that jobs
are running parallel. So by default, they're
running parallel. So let's open this guy.
That's a push action? Can I see, we're able to
print the job environment, which is SSSS that's exactly
what we actually say here. I see SSSS that is working. Let's check out this one
that has the job level at the EMV so we can validate that the job level actually prints. So I'll go to the But section. But section series. Can you see we have this done before let's creen job here. Can you see SSSS step level. All this I've been able
to show you guys how to actually print for all levels. I think that is good enough. Right now, I will do some
cleanup then we would actually go into
pulling the code. I'll see you guys
in the next video.
8. Pipeline custom actions : Hey, everyone. Z here. We actually went to the
last session to actually print environments in at all levels, we
actually did this. So we don't take out
this good section. Let's change on this bit. Let's change this so
we can leave this. Remember, I showed you
guys in the last section that jobs actually
run in parallel. We could actually just leave this here and just
probably call it sample job section and just
call it Sam job section. We can then come in here and then quit the one we need
for this project, right? So I'll call it but yeah, let's call it a But
But drop section. And this works. Remember, your
name is totally up to you. Then I could pick this
because we need this, right? Okay. Then that's not going to actually detail
the step we need. All right, this step
probably need right now, what we need right now is
to get the code, right? And when we want
to get the code, we could actually do
something like this, right? We do a git checkout, then we probably want to
pull or we do a Git clone, then put this full URL to
actually get what we need. But this is we basically now be trying
to get past the security, try to see if this workout
is avoid this complexity, that is why Git actually created things called we are already
created actions for you, actions that already
to do this work. So they are basically the
exact same thing as this. Basically the exact
same thing as this. However, they've been
compiled where you can just use it on the go
to perform an action. And one of such is the Get code. So if you were to explore, if you look at this carefully, this is how Git action it's called Git action marketplace. So Git action marketplace, you have everything, some of
the major things you need. Take for instance, you
want to interact with AWS. I'm sure you find things
related to EWS here. If you look at this carefully, you see, this is a
secret manager for AWS. If you want to set up some CLI, if you actually go down a bit. They do a lot of
stops, a lot of stops. I'm sure if you also
have something on AshiCOP that's Ash Cov
volt Ash Cov volte. Ashy cup, see. I just speck again.
The hashi, hashiKup. So you see, we have things
on hashiKup on how to interact with Tashi cup vs
tightly from your action. So this actually works. They interact the whole
lot of things, right? So basically, that's the idea. So what we are looking at today, while I searched around, I discovered we also
have the checkout. So when you see this Blue tick, it simply means this
has been verified. That does not say the other
ones are not verified. Well, it simply means they've not really get easier to verify. My to go into checking the code to see if
it's exactly what you need and if it doesn't expose any form of your detail. For
this, we'll be needing this. Now, I'll be sticking to things we have I have this
Blue tick except maybe exploring some
other stuff which we might look at later.
Let's go in here, right? What does this do? It says, This action checks out your depository under
Gitub workspace. Now, if you're
familiar with Jenkins, Jenkins also have a feature
called workspace where it's a vectual environment
where it runs your code, it manages all your
artifact and the likes. The same thing with this.
Now, what if you're not interested in you
want to pull you also clone another
another check out another repository within that is different from the one you
are currently working on. That is why you have this
other parameter which is the w. It provides you
with a repository. Once you provide
you have to provide the positre to check
out into check into. Now, sometimes you might
be needing the Git token to access some repository. That is why you also need this. It's a token already
available for you. Sometimes I need the
SSH key, SSH key. I personally use SSH
keys both works, H key to connect to all
of my Github details. How's the use? Very straightforward.
Let's just go down. A simple as this.
Just pig it out. Just using this alone is enough for us. We don't
need anything extra. This does not mean inventing it. You can just check
through what you need. I'll go in here. All right. Remember the keyword is what? Uses. I don't want to say this handbook Mark. Uses, right? And when I use the word uses, then I just need to just follow the exact
same thing they did. Which is checkout.
Checkout then ask V four. This is basically a
light need, right? This basically light.
And this sets. What is this guy complaining mean to connect
to your git This basically l, so I don't think
I need an extra. We actually find out and cod. Now, remember a diagram,
we pull the code. Now we want to set up
a virtual environment, we want to set up the Mv set up our Java Mv
in and dependencies. Now, someone already gone ahead to also do this
entire thing for us. We don't have to worry
about all this which brings us to this
action custom action, which is the setup Java GDK. The cool thing about
this setup Java JDK, when I found out
is this, if you go down, look at the specification. It actually it works for both. It is targeted towards grade two and also targeted
towards Maven, which just makes
everything awesome for us. It's title towards God
and towards Maven. Then it advises you you actually use the checkout first of all, which
is one we just used. Then at the same time, then you pull in and use this
particular one. This is exactly
what we're using. I really don't anyway, I don't have any issue
with distribution me. I just personally prefer
using Coreto Amazon Coreto. I'm sure you're
familiar with it. We have several distributions. If we go up, you have
the ones you could use. You have Tamarin Zurupt
adopts then I prefer Coreto, use whichever one you
think is best for you. Then as far the version, the version also states
you could use 811-16-7201. You can see which is
Java version here. Let's just go in
and set that up. Let us go in set that up. What I would do go here. I'll I'll call this setup setup JDK, 21. Remember we use 21 for our project then we're
using the action. The key word is
actions, not action. Actions. Actions, then setup. Java, I don't need to
actually cram this one. I don't need to
just go in and copy it exactly because
as your lessons. So just copy all this. Yeah. Avoid mistakes. I just come
in here and that sets it. So what are the other
details I need? So what are the other
details I need? So if you check
properly, remember, you have to state the
version that you use. That is where the
with keyword comes. I told you the with keyword
is when you want to set extra parameters, right? So I'm using a distribution. You see, there's a distribution. And distribution
we're using is Coret. You don't have to remember
you don't have to cram this. You can just go back in
again I just pick it. I'm interested in Koreto. I just go back to Coreto. Yeah, just go back to Coreto. Then Java version, see? It's already available here. This why I love using the plugins that just
helps me with all this. Then I'm using 21. Then I want something
called cache. This cache, I want
it to be maven. Let's go to find that out. Let's see exactly
what that does. Okay. So you can see, you say this setup actions setup Java action provides the following functionalities
and run, you see? There is a caching
dependence managed by Apache Mavin which is one of the reason I
love this, right? Let's go down to this. You see this cache says,
quick setup caching for dependence is
managed through one of predefined package managers. It can be one of Maven,
gradual and SVT. This already will
do a lot of work. So what we also build once and it actually saves our case, when we run the same job again, there is a key that's
assigned automatically. We don't have to worry about
all those integrity details. That's handled. No matter
what we do is cache. We have to cache manually, give you the key, then
retrieve the key. If it is that key,
we use a keyword. If it is that key, then
it shouldn't cache. If it's not key, it
should be build. But this is just
sets this up for us. One of the cool
thing about this, if you were to go
down a little bit, it this is if you check this. It also gives you
some extra details. Let's see the
keyword being used. What I like to do
is I like to just just search within this center and look for the keyword catch. So that gives us a good
thing. Now look at this. It says action Buting for
cache restoring dependence. You see? Cacher restoring. It uses two kit cache
under the hood. For cache in dependence, bog requires less configuration
and settings. This is exactly
what I'm looking. I wanted to show you
guys that there's yet another action that is
being called underneath. However, it's a good way for us to actually
see how this works. Such this call it cache. Cache. So there is this
cache feature, right? That's also available that you
could use manually, right? But you not have to
worry about the key. There's this key you have
to use for the cache, then you have to restore there's quite a bit
of configuration. So I would always recommend you going to look for the key
things you need yourself. You don't have to do
these things manually, right? Search for the action. The only time if the
action is not available, you know you have to make
things step by step. If you've search story you can't find any action,
it's very simple. Just look for the closest
thing that you want to do that probably does one or two things
that you want to do, one or two steps you
want to carry out, then define your
step one after the other that just saves you
a whole lot of stress. What I'm going to do, let's
come back in the next video. Let's view this
and follow through the file step by step to see
how this actually works. I'll see you guys
in the next video.
9. Pipeline remove spring boot docker compose and skip Test : Hey, everyone. Z
here. All right. So we've been able to actually
detail out g actions. We worked on this, we're able to actually changed the name, we changed this thing, then we actually set up this session. We're not done with
this, however, let's see what's going
to happen with this. I want us to be able to
confirm that this is actually working as it should and we don't have any
errors proceed. This will give us a
good idea of what has been done and what
has been generated, right? Let's test it out. That is the goal of this video. I've gone ahead to create
an issue. Create an issue. So let's commit against
this issue. So we commit. Okay, so I'll just push this, then we'll see our action
kicking. All right. So let's go back to action. Let's go to actions. All right, so this is coming. So let's follow it through. Remember, this is
we've declared this, everything is running in
parallel as it is, right? I'm more concerned
about this but section to see if things actually
work, so I'm going to go in. All right, so this is completed. We didn't get any errors. Oh, good job. Good job. Number one, get code. Were we able to get it
quite successfully? Let's confirm. So
we check properly. What can we see here? We check properly. So this was able to do everything
we wanted to do. So this doesn't
give us any error. So it means our
code is basically checked out properly, right? Are we sure? We would probably
want to log to be sure. But before then, the best way
to actually confirm this, let's check let's
check the setup JDK. So you can see it
actually run this. It actually picked this
guy where he's in Java 21. Awesome. Then we'll
caching with Maven. Awesome. Then the post setup, this is the post setup,
this is just a cleanup say part error specify
part and no case. There's no case. Apparently,
there is no case, there's Reason because we
didn't run any moving command. Didn't run any moving command. That is a beautiful
thing we're going to do in this current video. Now we've ensured that there is no error actually came up. So let's proceed. What is the
next thing you want to do? The next thing I want to do is let's output some information. Let's output some information. Let's call this output Info. Just call it pot info, and
I'm just going to run. I'm just going to
run an LS command. That's all I'm going to do. I'm going to run an LS command. And if you're
familiar, you know, LS would basically run
everything that needs to be that needs to
actually come out. So we'll be able to
see everything in the root folder and see if things actually
play out correctly. So I will go a step
in one more step. The less have this, the less build with Maven. Apparently, we are building
with Maven, right? So because you are
building with Maven, this setup will recognize
that we are building with Maven and catch the details
because you recognize, you're building Maven, awesome,
let me cache it for you. That's going to
catch the pulling of our dependencies
and the likes. What is the command
we're going to? We're going to use the plain
commands that we know. That'll be VN clean package, then D, spring boots, dots run dots profiles. This is how to run spring
against a particular profile. We've already figured out
how to get our profile, which is the vase dots. Remember we did that sometime. We actually use the vase. This time is spring profile. Remember we got this
spring profile. Remember this, let's go. If you check this guy, we check this guy,
go to our settings. Then if you check
our environment, then remember action, we set up spring profile,
which is action. Let's now kick this in. I'm going to do this and
see exactly what happened. In fact, I guess I'm
courious enough. Let's do something
else. I'm going to do let's list the files. If this actually
but successfully, I should be able to assess
a folder called LS targets. You know, that's how it works in targets for Mavings a But file, it's a But folder,
sorry for G But folder, but for Mavings a target. I want to print out everything
within this target folder. So let's go ahead
and try this out. Let's create an issue.
Let's create an issue. I'm going to call it I'm
going to call it pipeline, just to be sure we're
still on the pipeline, then build wed with me man. I think this is cool.
Yeah, that's fine. So can I say this
is an enhancement. Yeah. I didn't use
this all true, I just thought I
should just add it just enhancement.
You can do that. Then copy this then I
just commit against this. Then closes. So if
everything works perfectly, we should see our
maven cached, right? If you see things catch are
things working properly. So, gets push. I'll get push push. Alright, so let's jump in here. I'll jump in, so I'll
go to my actions. Go to my pipeline.
Alright, remember we're concerned
about this. Yeah. This part. Alright, so things
are. Things are working. Now I'm in the bit
section. So can you see? It's ply dependencies.
You can see this. This is awesome.
This is awesome. Now, this is always very large, so you might not be able
to race her with it. So what I usually
do I just see now, it's building the data, everything that we're expecting, or something is failing. Awesome. Something is failing. Now, you see it was
able to pullb to pull. And this actually run you see? A profile is actually
I got it correctly. No, but something is wrong. F now's called the way the White was then trying to pull this.
It's missing something. It's missing something,
it can't find what is it? A response repository
dot login, denied. This is fine in a way. Let's see what else are we missing? What else
are we missing? Let's look at this
evaluation report. We just want to check
out what is the issue, what we might have,
and let's see this. Remember we are running
virtual environment now you have to be very detailed in looking at the logs to see what could have
possibly gone wrong? What could have possibly gone
wrong? I'm looking at it. Okay. So we have Docker login. I'm not interested
in docker login. Okay? Why Repository
does not exist. See, repository does not exist or may require
Docker login, okay? Now, let's check we're file. Let's check Let's
check this file. Let's check this.
Let's check this out. If you look at our compose
file, this is our issue. Are you guys aware?
This is our issue. Now, running this, this is
where the issue comes in. We already went ahead to define this and if you're
particular enough, if you look at this particular
enough, look at this. We have the spring
boots docker compose. Now, this spring
boots Docker compose is trying to assess a
Docker environment, which we did not provide. I don't know if that's
making good sense. We trying to run
decker environment, which we did not provide. Apparently, this will break. You understand this will break. What is the ideal way for
us to actually move in? The ideal way if we intend, remember, we are trying to
build for production now. Docker compost should
not be used anymore. The springboard Docker compost should not be used anymore. As a result, we need
to commence this out. When we commend
this out, it will not use this compost
file anymore. Trying to see how we can automatically wire
things in for us. That is what I will
try to achieve. Let's close this out.
Let's close this out. That's the first step. I want you guys to actually
be careful with this. I will explain this again. Right now it is using our
dock because you added disease we automatically
still use this guy. When you have a compose file, having all this, it
will automatically be looking for
moduli it service, trying to figure
out these details, trying to get a container
that dispose guys, which we don't have in
that virtual environment. This is no longer my local box. We've gone ahead
to disable this. Now, next stop, it
will also be tried. Remember, we actually
use the Docker compose. If you remember
what we did here, we said it should not skip
the Docker composing test. It's going to be trying to run the test because if you look at the command,
we actually placed them. If you look at this command, this command does not skip step. It does not skip the test
does not skip the test. What we are going
to do, are going to do clean moving package, then dash the skip tests. Then dash D this profile. So what this will do is to skip this test because
this is not a goal. We want to build the
image. It wants to do but this image, but
this will still fail. I'm sure you realize
this will still fail because we don't even have a post gas environment within this Docker part which is what we are going to be
exploring in the next video. But before then,
let's push this to say skip test. Skip test. We'll call it pipeline, remove Docker compose, spring Docker compose and skip test. And that
we'll be exploring. So let's go in here. So
I move this forward. But our comazoe we
didn't get any failure that they're having failures
on the main view right now. So I'll go in here,
I'll create an issue. I'll call this issue.
We move spring, boots Docker compose,
and skip tests. So this will be
pipeline. Pipeline. Now, so let me ask a question. Why are we skipping test? I thought we already have
everything's already detailed. Why are we deciding to
skip test here right now? So I'll explain that
in a bit, right? I'll explain that in a bit. Now, I'm skipping
test because if you look at the structure
of our code of how we actually
structure this code, we are expecting this here, this Docker compose well. If we intend to remove this, if we intend to take this out, we need to pass in this
environment variable. We need to pass this
in and must connect. That's the word we
must connect to a defined pose grass database within the Git
actions container. So let's skip test. Let's come back, I will come and fix that
in the next video. Let's actually do
that. What I will do, I'll call this skip test, pipeline test skip test. So I'll copy this. So I'm taking it step by step, so you could have a good
idea of what you're doing, commits, then touch this. Then closes. All right,
so let's push this. So let's see what's
gonna happen. All right. We still want this. This will basically fail, right? But we've been able to narrow down the issue so that I'm
taking a step by step, so we could have a good
idea on what next to do and how to actually
make things proceed. So let's proceed. So we are
now in the but section. Okay. This usually takes
a lot of time, really. So let's just bear with it. Because this was not successful. So apparently it
won't catch anything. Apart is successful, right? Okay. Now, look at these
guys. Can you see? This has run successfully
and I'm able to see the jar. This is what I was trying
to bring out, right? So we are able to actually
do this successfully. Doing this, this
is now successful. This is now successful.
That's exactly what I'm trying to bring out.
This is now successful. This will not have any issue. It's not connect
to any database. I just trying to generate a jar file and it
gets what I need. It gets what I need,
if you look at it, these are all the
files where we listed all the files and
generated this car size. I generated a car
a new car size, and it was able
to save this key. This is the key to use. When this is running the job,
is what it's going to use. This being said, why don't
we allow the test to run? Let's allow the test to run
to allow the test to run, we need a post gas
service actually running, which is not
available right now. We don't have it available. Because if you check our action we are passing in data source, all these postgaar
details and everything. It's not actually connected
to Postga let's look at that. The next video.
10. Pipeline service containers: Hey, guys, thank you for coming
back with me. All right. So we've been able
to do some details. We've been able to actually
build the JAR file. Now we want to explore
in an ideal scenario, we don't want to skip the
test because the test is an essential part of the application, so we
don't want to skip this. So how do we go about it? So the first thing I recommend
is we have to go in now, we're not going to skip test, we want to change the command
to actually allow the test. But this time around, I will
go to the action folder. I copy all this and use it
directly within our test. I then copy the data sur. Let's copy the data source. Let's copy the data sas. Same way, I think
I'll need this. Let's just copy the updates. Okay. So let's bring this in. All right. All right. So I also want you guys
to remember something. Remember, we loaded
this as startup, right? And if we check our test, you check our test, is
the inventory test? Did you do much yet? Let's see. So there's a part we are
actually loading in some detail. Searching are looking
for a list of this guy because we know this already exists in the database, and actually adding against it. This will fail if we don't cater for westrapping the data, this data, initializing it. Because we're running
this guy in there, what I'm going to do
is I'll pick this. We have to pick all this. All this will have to
go. Initialize our data also within this guy. Initialize it. To initialize it to
make this always. So make this always. So this should run. We're saying,
Okay, you know what? Run every time. Once you
connect the database, run every time and all. We sure hope you're
using in one place else we're going to end
up with duplicates. But anyway, it's still worth
trying. So let's see this. So now we've been able
to do this, right, to be able to add
this detail would then go back to this file, then remove the skip test
not skipping test anymore. So you're not skipping
test anymore. The test, remember our tests, we don't have any profile, so our test will just run
on this default, right? Now, what other things are
we going to be missing? A little missing something
very vital because remember, we are using Doka using
what's the name now? You are using a post guest. We need to be able
to bring this also. This guy needs to be present within our container
else's going to fail. Remember we we're
using the poses, even in our test to connect. So there is the same we
have this composure. We also have a services feature. There is a services feature within Git Actions.
Is that awesome? Do you have a services feature, which would exist per job? It exists for each job. So I want it to run within
this job. Place this here. So this guy would also be available within our GitHub
and within Git actions, and this will actually
I just copy directly. So now let's now look at what are the things
that are not allowed. It says container
name is not allowed, prohibited so we
don't want this. Apparently, we are
not even using this. What does it say here? Environment is not allowed, Scheman is not allowed, but we need to add
some environments. Okay? How Okay. Since I know we need we need this Post
guys DB to be available. We need this post guys DB. Let's go search within the services layer to see how we can wire in the environment that
would actually require. Apparently, we not
using the vases, the vast users who standards. But let's go in to see
how this actually works. Yeah, with this, then
explore services. All right. So let's look at services. So these are service containers. Now, look at the definition. You can use service containers
to connect to databases, web services, memory caches, and other to your workflow.
Now, see this part. Service containers
are Docker containers that provide a simple and
potable way for you to host services that
might need to test the operate in your workflow. So this is basically
what we need. Let's jump down to how it works. Now, this is a very keynote that I want you guys
to keep in mind. If you're using
ito hosted runner, which you're using,
you must use Bunt. If you're using self
hosted runners, you must use Linux machine, and door came must be installed. You need to actually keep
this in mind, right? You need to basically
keep this in mind, because if you don't
keep this in mind, this will not work. I I there is a self hosted runner, you
must take care of this. If you are using
this, he's saying, docker might be installed
Der might be automatically Docker Engine automatically
is available for us using Git hosted runners. How do you do it?
This is a sample. You see, I remove
the container name because we can say a name here, we can
state the name here. If you go back, you can
basically come here. Put this side by side.
The side by side. Okay? So if you look at this, says you can then call the services. For that service,
you can come here, then give it a name, the name of the
jog that I'll run. So I'll call this container. So the container
can have a name. What was the name here? I think it called Boosre
call this Spores. Then we have this, and if you look
at this properly, we luckily have a postga service
container, which is good, which is just a predefined way to connect the postgas
as with other databases. Let's come here. I think this will just tell out
everything we need. The image we need, I need the image 16 or two. That's
what we tested with. Now this is supposed to be ENV. It's a command source using ENV. Here we have to use the name without a quote, let's do that. I will place the EQ
with a column, right? This also take this
out take these out. I think I can do this
with g, can do this. Take these out, then change
this to Changes to column. Changes to column. Yeah, then remove
this, and this. Okay. Okay, this is
not properly aligned. So there's aligns aligned. So you see this now remember, we don't have to had code because you already know
exactly how to fetch it. So just do this. As that's a DB, right? That's a DB. That
should be model it. Module its underscore
DB underscore name. They have this already. For the username and
password, same thing. You don't have to
already define this. Oh, sorry, this is DB now, this is the password.
This is the user. This is the poscas user.
What do you place here? Let's go check. I don't
mix things up. All right. We used what we do as our user. Let's go back to our
compose file, compose file. Compose files also
modulates the same thing. Username and the
password, the same thing. We'll come back here to
deploy come back here. The same thing. As speak the name.
What's the name? Isn't Spit as
passwords the name, then VSA password.
This are what we used. Now, remember, we did
not save this assign. We didn't save this assign
environment we receive, we save a secret how
do you assess secrets? How do you assess secrets. Assess secrets, you use
the keyword secrets. That's how you assess secrets. Secrets are assessed with
keyword secret sorry not this. Secrets. I assessed with this. I think this basically gives
us an idea of what to do. Now, you can see
these post does not actually require
us using this guy. So we then place this in and, it's actually we can then
go ahead and test this out. Let's test this out to see if we gradually going ahead to remove this to
remove the skip test. We've we've come in
here to add this guy. Then we're coming in here to
add the service container. I've explained how the
service containers. I will share the link
to the services. Then we want to run this. This will not hard coding. We just tested again this
and we can just see, does this work? Does it work? Let's. Let's find out. We just go in and run this. I'll just create procedure Usually I create an issue.
I'll create an issue. Let's call the issue pipeline
using service containers. All right. So let's do this. Then I'll just save
this alongside this. Commits TAM, closes Then we'll push. And we would see this
actually coming in here, close this, and
this will come in. Alright, so let's
expand this and let's find out what
happens. Okay. This is running.
We're interested in this section, remember?
Keep watching. I think we can refresh, you're not seen it moving just refresh. We can refresh started, we can then jump in to
see what is happening. Something failed
Something filed. Let's go in to see what
happened with a built with M. It says possess actually filled, envy and not found. W. But we just VN works for
us. What's happened? If we change anything, you would actually find
out, V are not found. I don't think they should
our service containers, but envy NV are not found, we have to go back in, or let's see how we
structure this guy. Let's expand this Okay. So this we have a service
containers which is available, which is a progress, and this will actually give
us the details we need. Then we are pulling this guy. Then let's go. Did it even pull? Did you pull the
image? Let's see. A series. So stop
and remove poquest. That means we have a
postgast container, which is good. Containers okay. This is fine. This
is fine. Let's see. I just want to confirm that.
So where did Maven jump to? We had Maven running earlier. So something definitely had
happened within the job. So let's go back and see
what might have happened. So did you change anything here? VN is what we run. Then the package, and
this was consistent. We use the VN keyword
set up in Maven, then what else would you do? Yeah, we cleaned the
package, we list files. So ideally, we shouldn't
have any issue with this. I shouldn't be any
issue with this, right? So, shouldn't be
issue with this. So let's go back to the parts. Is there a way to re trigger?
Let's rerun this job. Let's run I want
to rerun this job. We run a C that could pick
this file this workflow, this B push image, Bud pushimage for di player. That's the name. Can
I run from here? Now, I have to go in here. Then we run we run
all field jobs. Let's run this guy,
this beauty section. Let's see what happens.
Let's probably en login. Let's see, maybe there's
something we're missing. We run this again and let's
see how it plays out. See the video lens
where we do this, this 14 already might have
to let's check this out. Then let's see how it
plays out get in the code. Okay. Okay, so let me
pause this and come back, Sarus and get the
video unnecessarily. All right. So this is completed
and it's still filled. So let's come back
in next video. Since you're not finding Mv in, might probably need
to add a Mv in action to set up a
moving configuration. Let's do that in the next video.
11. Pipeline maven error fix: Hi, everyone. Z here. All right, we failed to
actually do this successfully the last video and due
to the fact that we were not having this
moving or found. What I had to do
is to go check I had to go and check the
pre installed services. So once the container is up, Git Hub Git action promises
you that there will be some certain software installed on the Ubuntu environment. I want to show you guys how
to actually find that out. So if you actually check this
Okay, let's look at this. I thought I pulled it up. Okay. So we have the
list of host runners. Yeah. Okay. This is it. I'll drop the
link. I'll drop this link. I ensure that actually save
it in and make it available, the link these links. Now, if you look at this, this is the available images. Now we are using Ubon to laters. Boon to latest would defer to 22 oh four and say this
are included software. Let's click on this to go see the included software.
Let's go down. So you can easily see
so you don't have to go about installing
the software that is already available, right? Now, we see this is the image so software the language that are
available by default. We don't have Java in here. That was why we
actually had a Java. Then package management, we
have PP PPPx let's go down. Then if you check the
tools that are available. Look at the project management. We have Maving three.88. Maving three dot eight is
supposed to be available. However, we tried that we saw that we're not
getting that feature. I said me something is wrong or something actually
tampered with it. When we check this,
I don't think we did anything out of
tone in bringing this here because set up
the Java environment. This would have
worked basically, but for some reason,
it actually failed. What I'm going to do, listing this out, let's also do this. We can also add under command. Let's do an VN dash version. Let's see this
actually installs. In Ubuntu, most oftentimes
we have this part. The path is actually
called slash OPT, Apache. Let's do an LS on
this. Let's do this. Let's do an L S on
this on this path. Let's see if this path is available and if it's available, let's see what is available
within this directory. You're going to run
this right now. I'm going to run this to see. I'm going to say
printing moving version, called the printing Mv version. They just come here issues. Once we don't find it just go ahead and include an action, a custom action that just sets up Mving directly. That's what
we're going to do. All right. Let's go in
here, just say pipeline. Pipeline. Then let's say print. Moving details. Let's save
this. Let's copy this. Let's go to the code
unless get commits. Then let's close this. I think
I didn't copy everything. That's 27, 27. Let's do this. Let's get push. Let us go through.
Let's come back here, check our actions. Apparently, this stressed
in this but job section. So let's run this. Let's check. Okay, continuer
are initializing. So we don't have to be scared. If you look at it containers,
we can't stick critically. So this is actually getting you look at it,
post gas container. So we are sure it's even pulling
post gas sistein or two. So we are sure that our post gas available. So this
is really good one. This is a good stuff. This
is good stuff for us, right? So we know that post gas
installed successfully. Let me close this initialized
continuers. G code. I think we run get code. This is the para
field. Let's see. This is setup. We
couldn't find it. We're trying to print this and what did you find
out? Let's see. It says moving version,
Ls anving version. This exited, you
don't have anything, right? Uh so ENV. Apparently, we're not
seeing what we need. This is CyndiPa because this movie this is the version
that I should have run here. This part that I should have but it's not finding VN not found. VN is not found. I haven't tried printing this
probably I should have printed this before
the other part should have printed this
before. Let's check that. But rather than do that not so long gets the
video any for that. Let's just go to the
marketplace and look for let's just go
to the marketplace. Let's go to the marketplace
here. Let's pick this. Let's use this moving plugin, this moving we have this
moving action, custom action. We'll just bring this
in and let's move. What I'm going to
do, I'm going to put this immediately after this. We're going to do
this. Then we're going to set this us with. If you're not sure, we could
also manually install. If you check, we could
manually install. If you do a patcher moving, a patch of maven.
Then you do Ubuntu. So to install Pache Mav in on
Ubuntu, how to install Pat? So you have several
links to actually show you how to actually
install a Pach on a Bunto. So this is step one. We have a Java
environment variable. This is already set up for
us. We have this available. And so to now install, we
could actually get this. You see, this is available.
You could just pick this then you see there are too many steps, there's
too many steps. I decided to use
the custom action, but however, you
could actually just pick this and use
it directly, right? You just need to show us
so we can see this works. So let's try the first option. If you're still
getting issues, right, then we'll have to do
it low level ourself. We have move this low level, add it to the pass, and we
get things done ourself. I thought that she
actually mentioned this. Let's go back to the code. Now that we have this save
so we do git commits. I CM then I'll say added
custom moving action. Call this out. Added custom
moving moving action. So you can get this
closes. All right. Okay. So, let's see. This actually does the work. All right, so let's
go to actions. So this is Building. I'll
just chill refresh this. So let's go in. All right. So this is Building. Let's
refresh this once more. So this is Building. I just
want to see the bar move. Right? S initialize. Okay, so started.
Second jump in. So setting up this
has gone directly. So closest up Mvn
setting up Maving. So you're trying
to set up Maven. Yeah. All right. So let's see because
this give me detail now. All right. So you see this was actually printed
out successfully. Maving was printed
out this VN version, and OPT file gave us
all these details. Okay. So we can see
Mavin is running now, so we've been able
to solve that issue. So let's go down.
Let's wait for this. I think you see
getting errors here, let's just allow it finished, then we can actually debug to
see what the error is now. This job failed let's
check. L just check. Basically, some of the issues
you find in your pipeline. Some things that were working
before we stop working, you want to debug to see what happened with time you get to see how to
actually solve this okay. So once you go down, so this is the test. Now, yeah, great, great.
This is the test. So what is the issue
with the test? So it says there's a no
pointer, its SQL, right? It's talking about, oh,
it's not connected. You see, it's not
connected to database. This is what the issue is here. It's not connecting
the database, okay? Then apparently,
this is the issue. It's not connected
to the database. Yeah, it's not
connecting database. So check this out again. Yeah, starting, you
see the carry pool starting could not obtain
connection, apparently. The test is not connecting. That's basically
what the issue is. We've been able to
get to that stage. All right guys. I'll see
you guys in the next video. We move faster step
of a moving issue. Now we actually stuck with the database not
connecting and that will fix in the next
video. See you guys.
12. Pipeline explain build changes: Hi, everyone. Z here, right. In the last video, we actually the custom action and
using that we actually use the custom
action and applying the custom action using
this particular part here. So we're able to introduce this. So what I realized is that
some of the features actually promised within
the Ubuntu runner was basically not working
as it should, right? So we've gone ahead
to actually had a custom moving setup, and this was able to bring
in the moving command. Then we have put
it some details. All right, so what I
did, I did some bit of testing around having
to run the Mving test, maving test and the build I discovered that some
things were failing. And the things that were
failing was that I saw that the environment variables we set were not being injected. They were not being injected. Looking at the configuration, looking at I have to look at the documentation once again. Looking at the configuration,
then it gave me some ideas on basically how
to actually go about it. And that was how I was able
to actually get this done. If I come back here, this is
the one we use for moving. So let's just go to action. So I'll go to post gas
container service containers. I'll call it gtconcion services. Get action services.
This service continuers. This is where I got the
idea which I actually use. Going to post gas container. I saw that when they were trying to run this
within this step, they still added an
environment variable to add the environment, what they wanted to use within
within the application. I went ahead and did
the exact same thing. That is why you
see, first of all, I showed the environment to
be sure that it's actually coming in because I wasn't sure anymore I was just
getting so many errors. If you were to check the
action but of this project, you would see that there
are several figures because I did a lot of testing
and I didn't want to do this live on video to be able to get your accurate
before coming back to you guys. So having done this, then I went ahead and
I separated the test. Remember before now, we were doing a moving clean package, we didn't have the skip test. What I did is ideally
in a pipeline, you want to separate
your test on to be sure that all your
tests run successfully. That is why I just run the moving test direly with
this moving clean test. This will run all the
tests that we have. Then I then separated this to do the building then
moving clean package. Since we've run the test here,
I can skip the test here. And here I was
introducing that spring pf that would actually be
using our Docker file. This is basically what I did here and things actually
pan out successfully, which is really good,
is really good. Yeah. What is the next step? What are the things actually
changed to make this work? First thing first,
remember we're using the Springboks composed. Now, that would definitely
cause issues here. Remember, that
aspect that you have a Docker engine running and
it's trying to actually botrap some of the post gas cure by itself, there'll
be a conflict. First and first, I
went in and I removed the springboard docker compose and removing the
springboard docker compose, automatically, I had to
remove this property, which is Docker
compose skipping test, which we used earlier
in the video. I think this second
or third video also. I had to remove this so that we don't have disturbinance, right? Yeah, so that I was able to do. Secondly, remember we
remember we had this script, as well as injecting
the inventory. So injecting the
inventory also will fail for us because
the property we set within this part is
for you to run updates, then this should be
probably never, right? But when we're running our test when we're running our tests, we have to set this to never. We said this to never because
we only injected once, then we're just running the
test over and over again. But now it is automated, I need to find a way where when each test
contest is running, it would always try not to bootstrap or
we try to bootstrap. Remember when you run your test, each test each test carries
the spring boots test. This a spring boot test. Which simply means it will bring up the contest
every single time. And bringing up the
contest every single time has one advantage or should
I call disadvantage now? If you always try
to run your script, if you set this to always once it's there
to keep on giving you the error saying that this probably property
already exists in the database or venture already contain this keyword,
it will keep failing. What I had to do in addition
was to create a schema. I picked up the
schema directly from. How did I get this very simple? So depending on the
client or two you're using, I could have
this directly. You can just if you're using Intelligent ultimate
like I do or Data grip or some other
clients or post gus, you can basically generate you can basically generate the DDL. So what I have to do is when I went in here you
see, so I have this. I just generated it directly. So that's what I did.
I just generated it. And to generator I just copied and that I
actually placed here. So I'll go over it
again, just quick. I just click, go to SQR
Scripts, then generator. Once you go to generator, that would actually generate
it. I just copied it. I didn't need this.
I took this and I took this and that's
what you have here. You can see I have
the create index, I have this just
exactly as we have it. What is now the idea? The idea is if you
look at our property, we said, what's
the property now? We said it should
defer initialization. I'm not creating the
inventory table. I'm manually creating
inventory table. That is to favor our test. That's basically what
I did. Coming in here, this goes off, this goes off. Took this off. I added this I mean to
say, added this I am dropping the table every
single time if it exists. I drop it, I recreate, then I insert. This
will do the insertion. So the creation
is the insertion. So that for every time the test contest actually comes up, this will drop the
table if it exists. Once it does, then we insert. You would not have the case of the key already exists.
The key already exists. Remember, all this
is in favor of us having to build the image. So you can actually move
things around, right? But ideally when I'm
going to production, you would have a
production database, which you should
not even be using the DD ello DD
yellow too, right? This is the Yellow too.
You set it to null or nu rather you move
it totally, right? I think I mentioned that
sometime earlier in the videos. So what you're supposed to do is you load the
script just as you have this script here, as
you have this script here. You basically generate this
script for all other tables. Then you go, you give it to your DBA guys and run it
directly on the database, the inside the
properties to null. But it's still
fine. Since you're actually building
this in the pipeline can still move things around to see if things actually
work accurately. Uh, yeah. So that I was able to do. I'll go over the changes
again, we have an overview. So if you're actually
following through this project and you're
trying to code along, so you know exactly what to do. When you get to this
stage, what you have to do is disable this guy, which is the springboard
Docker compose, then come in to act the script, just showed how you
can create the script. Remember, don't forget
this job table. Don't forget this job table. Everything will be
committed as it is so that I can actually
use it directly. Then I have this and we're aware that I'm using this action. But if you're very curious
to know, look at this, while I'm running the test, you can see I did not pass in. I did not pass this part. I did not pass any profile. I'm saying use any
default profile you see. That would actually use
this default profile. And this default
profile will always have a always this as updates and remove this guy
and that I was able to do. Remember, I had to add all these properties
this property, all these properties
you see here. So every property
one, two, three, four, five, if you see, if you miss one of them,
you have errors. This is not supposed
to be the use schedule because I believe
once you wired it in the settings as in the sets
what you do it on Github, I mean, this part here. I'm in this packet. I see why this in here,
this environment. This environment
here, everything should actually be
injected automatically. But I discovered when
you get to the steps, things are not working as it is. And please kindly note here, it is expected that we use
Pogues and no local host. So whatever you used as
your container name, right? Whatever you placed at
your container name should be your host, right? Because I tried local host. Local host was filling and it gave me a bit of
trouble with debugging. So when I changed to this, it worked, and I got the
idea using this part. This part here,
adding the host as Postgest I was able to actually
get that to work, right? Alright, so I think
this has been done. As we run the test with you guys now so you see
exactly how it works. I just probably change
one more thing. Now that we've built this,
we have a sample section, we have a built section. Now it's time to focus on this. But first of all, we want to see what was
listed in the file. We'll explore this to
see what was listed. But I'm going to
add a property Ns. I'm going to add a
property, which is needs, and this will basically a basically we need a build what's the name of
this section? Section is what? Build section. These needs, you
could actually add it as you add it this way. It works. You probably
add this way as a list. If you have seven jobs
this job is dependent on. But if it's just
since it's just one, I can just go ahead and
add it as a single job. Now, what does this it means that remember the
default implementation, the default behavior is that the jobs are parallel,
they run in parallel. But adding this to it,
you're forcing it to say, Hey, this push image section is totally dependent
on this guy. You will see that this is totally dependent once
you run it right now. I'm going to post I'm going to stop this video
here so that we can actually come in
the next video and run it because it's about
10 minutes already. See you guys in the next video.
13. Pipelne upload artifact: Hey, everyone. Z here. All right. So now we've got this section where
we need to run this. I'm just going to do a
quick recap because I like the frien I believe it helps stick the
information stick further. I got issues here while trying to run this
test, the test. I separated the test
from the main build, and you can see, I'm just doing ving
clean test here, but over here, I'm not
skipping the test. So ideally your test should
run before your main build. That's basically how pipeline should go to ensure that you don't have a any failing test. I had to bring in all
these properties, which was actually stated
within this application of the yam and this Yamil
is totally for the test. You can see it's in
the test. It says, how to bring in all
these properties. Now, this should have
been wired directly because we set it
in the settings. We actually configured
in the settings, but I discovered it does
not bring anything. So how to manually bring
in the environment and I got the idea from these parts. I saw documentation where they had to bring in the
test the properties. So that I was able to do
that actually worked. Right now, what we
are testing out is I added this feature
which is Needs. Needs means whatever you place in there, this
can also be a list. I showed it in the last video. It means this will run first
before this actually runs. So that will do, and at the same time we
explore this target file to know the files
and what to cache then we can move
ahead what to upload. Wever I want to upload, I
want to download some things. Once I actually do so, so we'll be able to actually
jump into the section. Alright. Let's do this. I'll commit this go over here. Over here, I actually
commit this let's say configured call this pipeline
to maintain context. I'd say run job in sequence. That shows you'll be able
to actually follow with that running jobs run, just call it Run
Job is sequence. I'll copy this, then
I'll go in here. Then I'll just commit
this against this Git commits this then closes. Then I then push. You push. Okay, so let's follow this
trip. So this is gone. Let's come in here. And
let's go to our actions. This is the part I was
mentioning. If you look at this, there's
several pelos. I had several philos, right? While I was trying
to test all this, but I was able to actually
get work in here. Let's follow this. You can see because I run
it in sequence, you can see this because
I had the neat keyword. You see this is now
waiting for this to run before they were all
running independently, but now this is
waiting, which is pretty cool, This pretty cool. Now we know how to run sequa
Let's follow this through hopefully we don't
get any errors and we'll be able to move
on to the next bit. Let's wait for it. Okay.
So this is going through. I'll just post the
video. I'll come back once this job is fully run. Never mind, the job is close 30, but the job run is 40. I'll be 40, so I'll come
back once this is done. So I don't want to delay. Okay. All right, guys,
the job is done. As you can see, this
but was successful. I was really happy to
successful because I actually went to a lot of
the bugging to get this. And you can see this also works. So we got things
actually running. So we're interested in the
files that were listed. Remember, we want to download, we want to actually move files from the But section into
the push Min section. We could have done
everything one single step, but I just want to use
the idea to just show you guys how to actually
upload artifacts. This part actually there
and how to download it. That's pretty much the Else you could have done
everything one single. Right? I also wanted
to show you guys step one job can be dependent on another job and how to
actually configure. Yeah, so that's the whole idea. All right, so let's list file. Okay. All right. So
listing the files, we could see that we have a
JR file, which is script. Then looking down,
looking at this, we have pretty much
all these details. This files are actually
running, these are the Yamofle, the Do file, the dock application
of Yamil and the like. So we have everything
actually in pretty works. This
works. All right. So the idea now, what are the things
we want to upload? We need to specify what are the things you
want to upload. Now, remember this is available within
the targets, right? This is available
within the target. So if you check this path out, Remember, outside the target
file, we have the compose. We have the Docker
file, I mean to say. Remember, let's just
look at the structure and the project so
we can have a few. So we have this. This is a structure. We
have a Docker file outside, and within the target folder is where we basically have
the JAR file once it's built. So let's keep that in mind. So this is outside
basically the root, and this actually within
the target folder. So let's now going into add. Let's now going to add the
files we want to upload. So to upload files, let's go to the marketplace and see if there's anything else
regarding upload. Actually, there is, but
I want to show you guys. So let's go Gits,
action, marketplace. Come in here let's
search for upload. So let's upload. Okay. If you look at it, we have
upload a build artifact, Upload a Bed artifact,
how is it used? Just down. Use. You use Actions, upload artifacts at V four. Then how do we load the
files we want to put in? Down. Let's go down. You see, there is this
part called Path. First, we can give you the name, the name. This name is very key. This name is very key. We
need this name so that this name is what we use to
actually once it's uploaded, is to use this name basically as a key and when we
are pinging it down, we'll be able to
actually fetch it. Uh parts of the files you
want to actually upload. You see says if
there are no files. Basically, this is how to use. Let's if you give
us more examples. Great. So you see, you can pads to the file you want to use. Then can we upload
multiple files? Because you want to upload
the download, Oh, yes. Can you see this?
Can upload this. Now, actually What is this here? And this means you want to
run a multi line command. A multi line command or actually pick this path
at separate lines. Tho all be registered
as separate lines, and that's exactly what
you're going to use. I'm going to add
this documentation I actually share so
you guys will know exactly how to look through it. Yeah, let's go back
to our project. So how do we go about this? Let's go back. I'll
just pick this path. We want to use this.
Interested in this, I'll just copy this as it is. Yeah. Yeah, I want something like this want
something like this. Okay Okay, so we want to upload some
tails. I'll come in here. Calling Ning. Let's give
it Upload Artifacts. Alright. So that is cool. Then use. That's what I copy
it so this aligns I don't need this anymore. We have this. Then pretty
much, that's what we need. Then we want to go into
our target folder, our target folder to pick the file we want
to actually use. So I'm going to say targets. Remember this will be in the
root file targets and slash. I don't know if this
accepts a wildcard or we're going to test it out
that accepts a wildcard. Then within this, you want
to pick also the Dockerfile. Now it also has another feature which I
just want to show, let's say you don't want to keep this file because it's
sensitive on GithuFever. There was something
called overwrite. You could overwrite. Saying for every
time you generate this file, always
youritesready existing. Because if you don't do this,
I use the same keyword, I use the same name. Sorry, sorry. I messed this up. It should be a pipe. Then, yes. Then let's call it spring mood leith then
swing modulates Artifacts. Okay, so we have to set this, then we have to set so we can also set
the retention days. So these parts, so
what is saying is, if this already exists, if this already exists and we generally new you override
the files that we have here. Then we also want the
retention days, right? Retention they say, I want let's say let's retain it
for ten days, right? It's in days, you say, retain it for five days, okay? But this supersedes this guy, this will always
override this guy. Okay? We've been
able to do this. So let's try it out. I don't know if the
Wildcard works or else we would have to
pick the entire name, but let's just explore. Let's explore. Do
you use a wildcard? Say you can use this
then let's see. Okay, I think the
wildcard works. I think this would be
cool. This would be cool if the wildcard
actually works. So we don't have to
look for the entire name of the spring file. All right. So let's save this. So I'm going to
call this let's get an issue. So create an issue. I'll call it uploading
ClesPipeline, for comtet sake, pipeline. Uploading artifacts. Okay, so let's pick
this and let's see. So do kids commits All right, so done that then let's push. Let's push. Okay. This is looking good. This
is looking good. All right. So let's follow it
through and see if this actually comes as
we actually expect. So we reload this. I'm going to pause this
video and show that finish this finished building before
I come back to you guys else to just delay
the video longer. Let me just pause this again. Okay, guys, we're back. So this actually this actually
all successful. So let's go in to
quickly explore. This way we uploading the
artifacts, jump in here. Uploading artifact, two files. There will be two files upload. Yes, that's all Artifact
name is valid here. So if you go through
and says Cool say Cool. This is cool. Doesn't
display the namal artifacts. It's loading. Apparently, but we know
exactly what is loaded. So what we are picking is spring anything that actually
starts with any name, but that ends with a dot jar. We just have one file that
ends with the dot jar. Basically, that's what
we're looking for. And yeah, I'm also picking this doc also
picking this docker file. This is going to
actually load two. Let's be sure that
actually happened and now how are we going to be show? We're going to find
out in the next video. See you guys in the next video.
14. Pipeline download content: Hi, everyone. Z here. Okay. Remember, we
were able to upload successfully and how do we confirm the files that
we actually uploaded? We are going to do that and see exactly that's what we'll be
focusing on in this video. How do we actually
validate all very simple? Since you're uploading,
we should be able to download and that's exactly
what we're doing over here. Remember this other job
is dependent on this job. We then come in here and we've already printed
something here. Let's come in here
and let's download. Let's call it
download. The name. Call it download. Call it download, Artifact.
Download artifact. Now, we want to see
since there's an upload, we are 100% sure
there will also be a download. Let's go in here. Let's go to the marketplace
and let's download. Okay. So since there's an upload
that will say download, right? They work
hand in hand, right? They work hand in hand.
If you go to the usage, it just similar, the same way. Similar to the usage
we just place this in, then we have to the
name name is very key. The name of artifa to download. Remember, we actually added
this name so we must be able to use the same name. I
think that's pretty much it. We don't need
anything else, except you want to probably
configure some actuality, but I think that's
basically what we need. I'll just come in here. I'll just use this. I think I can just copy this directly. I'll just copy this with
the W and I'll come down here and I'll just
test this here, right? We don't need this anymore. We've got ready,
just arrange this. With then name. Apparently, then
what is the name? We must use the exact same name so avoid any issue,
exact same name. That's basically you guys. That's how to do that.
We don't have any. Let's output the contents. Let's output the contents. Remember, guys, remember, guys, each bud has a runner. So this sample section
use an Ubuntu runner, once it's done, it closes. This uses an Ubuntu
different runner, so they are not the same
virtual environment, you must be aware
of that, right? You must be aware
that this server that was actually spun up is
different from what is here. So once this is
actually uploaded, once you uploaded
our details here, we uploading the details here, I just sent to a cache somewhere in Github
Github storage. So once you actually
download it, it looks is it the same
job that is running in the same context for
the fringmd cost that is owned by myself? If that is so, then it
looks for this name, then download the content. So I needed to point out that. So don't think you are going to see these
extra details that we printed here when we come
in here because they are two separate jobs and they
run two different contexts. Okay, I wanted to explain that. So let's output. Let's outputs. Let's outputs, let's
call it outputs. Downloaded contents, downloaded contents.
So I'll just run. I just run an LS. Let's LS. So that's this guys. All right. So this guy so let's just wire
this in, let's call this. Let's create an issue for this. I'll call this pipeline, download and output content. Pipeline. Download and output
contents. We have this. I can just copy this.
Then come in here, then commits EM, then
uses here then closes. Let's push All right,
let's follow it up. Let's follow it up. I think
this has gone through. Yeah, it has gone
through. This should have gone to the actions. So it has closed this,
we'll go to the actions. We see this has
started up, started up.This ready to start. All
right, so it's started. Just as before, I'll pose
this video and I'll come back once this build is finished. All right.
See you guys. All right, guys, this is done. We can see the build completed successfully on the pipeline and the push image action or section completed.
Let's explore. Let's explore this. This where we're downloading artifacts. So it was able to download
a single artifact, prepare to download, and
it was able to actually go through and find the
artifact, One artifact. Remember, you might be wondering why are we seeing
one artifact here? I think I failed to explain
that in the last video. Let's go to the But
section, the But section. If you go to where we
actually uploading, if you go to where we
actually uploaded, if you look down, you could see it was
zipping everything. Everything was zip so
we only have one file. To Zip two we have
just one file, right? Because we were uploading two
files, but it was zipped. I think it makes sense. I
told that the files are not scattered or it's probably
probably managed. So it zipped the when
we get to this part, we could see that everything is downloading
just one artifact. I wanted to point that out.
Let's say outputted content. So one total of one
artifacts downloaded. Let's see contents. Can
you see? This works. This is bringing in the target, the Docker and the target. Oh, we don't want
the target file. We actually wanted the
spring, what's the name now? The spring the JA file.
We're getting this. We need to basically look
at exactly what to be done. Let's go in and see
what we are missing, right? That's what
we are missing. All right. So let's go in here. Yeah, checking I want to explore this download
artifact again. Upload artifact. I think
I want to duplicate this, let's duplicate this tab. Let me go to download
upload artifacts, I think the wildcard is
not working as expected. Let's look at the W card. It saying upload an individual
file an entire directory. This is the part it was picking. Basically picking all this. But we wanted a W card pattern. Saying we want you
to pick a path. Start then let's see. Start study paths targets, I think we're
supposed to use this, right? Supposed to use this. A file any dietary in between, then any file ends with.
Let's try this out. Let's try this out. That
should be looking at this, so this is negative. This is an exclusion. However, this is an input, what we have, which
corresponds to this. I'm going to pick this
with tax the excretion. Then I'll try this
out to see if that actually works as it
should. That'll be here. That'll be the
target targets star, then star dot jar. So we show that is directly
under the target for da. So seen any paths in
between there are no paths, we just look for the Ja
file Let's try this. Let's try this. I expected
this to work either way. Let's just see how
this pans out. I would not commit this.
I'll just run it directly. I will not commit
it with an issue, I just pipeline tests upload. Test upload. Let's see how
this actually plays out. All right, to see if it is actually uploaded successfully. I'm going to pause
this video as usual. I'll come back once
the But is done, to be able to see if this
actually work correctly. Else, if we don't actually figure this out,
I'll just go ahead. I'll just use the full journey, and that should basically
fix this issue. I'll see you guys
once this is done. Okay guys, this is
done, so let's check. All right, so we are
concerned with this. So let's see the
output contents. We're still getting
the same thing. We're still getting
the same thing. I'm expecting just
the other files, giving the entire target file. And we don't need the
entire target file. That's too much of
an information. What we're going to do,
I'll go in and I'll then bring in just
that file. What we do? Let's quickly jump in here. I will go to the But section. Let's output. Let's check our uploaded the
files we listed. We have this file called
the spring modulate, then case I believe
that's the name spring Modulate Case that should
follow this pattern. If you go to this file, you should follow this pattern, which is spring modulate course then you should append
this then the jar. That's basically
what should happen. So I want this
splits and writes. Then I'll come here, I'll
just put this here all right. Then you should have a 001. We're going to bring
this appendice. Then I think should be
hyphen, then don't jar. Let me confirm. So we're
going to come here. It's a spring we cause
hyphen this here, you can see it matches. It's matches, right?
Which is good. So at this here,
so we'll notice. All right, so let's
com in this and I'll post this video and once it's
done, I'll be back, right? All right. This is
done. Let's check and this video is
already over 10 minutes, so we're going to see
what we uploaded. So we uploaded two files. Great. Let's check this out. So we're targeting this. Let's go to push Image section and see if that actually
downloaded the ripen. The one or two flat outputs. Give me the target folder. I think I know
exactly what it is. I'll come back in the next
video and I would actually see why this is actually
picking the target folder. I'll see you guys
on the next video.
15. Pipeline docker login: Hey, everyone. Z here. What I had to do, I went in
and I didn't change anything. I just said, let me just do an LS and do an L S
of what is in file, this target folder. This
is what I found out. When I checked, I could see we have just one
file, which is this. Thinking about it,
guys, I think this works in our freeboo.
You might wonder how. Now, remember our Docker file by running this Docker file, which we intend, this
Docker file will basically look within
the target folder. I don't think I want to change this, I want to
change this else. We have to change
this Docker file to now point to the
JAR file exactly. That's exactly not what we want. I think this works in our feboo so we don't have to
change anything. Just leave it at the ts and
this will work directly. I just want to point
that out. This works. So what we have currently works. So what is the next step? The next step is, let's push the image. Let's push the image. But for push the
image, remember, we need to assess Docker
Hub. I'm using Docker Hub. Because I'm using Docker Hub, if you pay attention
to why we're doing the Docker push we had a section which we actually
called we had a section, which if I could remember
correctly right now, the name of the section,
let me just get it out. I think it's production
ready features, if I'm wrong, production
ready features, right? Yeah. I think it's a
production ready features. We have a section called
production ready features. Yeah, that's correct. That's
correct. I looked it up. Remember we had to log in because I was
already logged in, so I had to push to Do. The same thing has
happened here. Remember, this diagram, we have to once we've
listed the content, we log in, then we
build and push. The same thing we're
going to do here. So how do you go about it? Let's first of all,
call this Docker login. Docker login. Because
I want to log in, I'm login just waste my time. So there is another
action for docker login. Let's go find out. All right. So we're done with this, so
I don't need it anymore. Let's go back here. Let's go back here and let's
look for Docker login. Do we have anything
like Docker login? Docker login with config.
It's what I'm looking for. Let's call this log
in. Say Docker. Let's call it Docker. I think it needs the
action I'm looking for, I know the name of
the action because the name of the action
is log in action. That was the one I
used physically. Log in action, right? It is a login action,
Docker login action. Let me just put in
the exact name. Do login action. Log in action. Docker log in action, I think
this is it on the wrong. Let's look at it. This
is not properly defined. Let's check this
one. Docker login. Is this Dal Login. Oh, awesome. Yeah, this
is it. This is it. So just log in,
pass your username, pass your password, and it should be fine. So
hsically that's it. Pass the username, pass the password, and
it should be fine. So that's viscally. So let's go. Now, remember, it's expecting a Github token Git up token. So using your password directly
might not work, right? Using your password
ditly might not work. We're going to try
both, and I'll tell you exactly which is going to
work. So let's jump in. Let's jump in. So I'm
just going to pick this. I already have already
have it copied somewhere. I'm going to copy this
then jump in here. Jump in here, then I'll
just click this then. This exactly how we
should look like? Yeah. All right. Then the
next thing we need to do, the next thing we need to do is we need to add this
to the secrets. This needs to be
added to be secrets. I know my username, my username
is quite open now there. It's called Eikoz but the
password is actually heated. I'm going to go in and then add my password,
then I'll come back. What I'm going to do, I'll
copy this to this guy. I know the first
one is user name, the first one is password, go into the spats here, let's go to Dispat
settings, secrets. So I'll go to environment.
The same action. Then we have to wire in C. So we have to
wire environment, Remember we need to wire
an environment to be able to detect what's
actually do the uniform. I'll come in here.
So this is action. Coming Secret secrets.
She the secrets. User name, parcel. I'll just post this and I'll come back once I've
actually uploaded this. I just post this and let me
quickly add my. All right. I've added it in. So very cool. How do you add it when
you on Docker Hub? What you need to do once
you've added on Docker Hub, just go to the right hand side, go to account settings, another account settings,
go to security. And under security, you can
generate in your SSIs token. So it generates,
puts in the name. Then once it generates, you get the token. Once you've gotten the token, then you just copy the
token and use it directly. So that's what I did. I did
for this modulate Aces token. So I've added it to the
environment variable over here. I've added it in, so you
won't be able to see it. Then we can use it directly. Okay, so I think
that's what we need. Yeah, so we're here.
So let's be sure. These actually
work successfully. So we have to be
sure if you actually log in successfully, right? So if it doesn't work, this trend error,
but if it works, this would basically work
directly. So let's stay out. So we're going to
call this we're going to call this login,
pipeline, do login. So call this pipeline do login. All right. So pipe and Doc login. So I'll
just close this. Just get commits. How do I get push? Okay. Just as before, I'm going
to post this video. Once the pipeline is done, I'll come back to show you guys how it
actually panned out. So we to see what happened. I'll see you guys
once this is done. All this is done. Coming back here, I see
we're having the same issue, Docker login and parcel
rep, but I supplied it. So what probably happened is the same case we
actually experiencing here. The same case we experienced where I had to add
this in manually. So what I'll do, I'll come
back here to do this also. What I'll do, I'll come in here. So because this is correct, Docker Undersco user name,
Docker UnderscoPassword. And it matches what
we actually have in settings, we will
check the environment. To the environment,
check action. Oh, okay. So this might not work actually, because I did not specify this action. So this
might not work. I didn't specify
the environment, so I think that error
might be for me. So let me quickly
do that. So you have to specify the
environment you're running on. So I'm running this guy. You see, we didn't
add an environment, so I'm running this guy in
the environment action. Okay, so let me push
this saying it commits. That's then pipeline. Pipeline, then
added environments to push image section. So that basically closes 34, though I've not created it yet. So I'll call this do this. I'll do this, then
I'll jump in here. Then I'll create an issue, do this, then place this here, then submit and
that's 34, right? Yes, that's 34. Then we
can then commence this. Then I can push I can push. Let me quickly
pass this and I'll be back once this
is done, you did. All right guys, this is
done, let me just go. That should be the last
134. Remember, 34. That's the ID we used. Then we'll go in
and check a push me section and do a
login. See succeed. Yeah. This brings us
to the last phase. If you look at this
correctly, this succeed. Push image session, succeeded. This brings us to the last
phase, the last phase. What we're going to
do we're going to do is we just need to
just push the image. That's all that's left. We just need to push the image. We call this a lane, then Octo cd this push image. That's what we need
to do, push image. Then we then proceed to say
so we add to push the image. The cool thing is, we
have yet another login. You have another. That
works exact same way. So I already have this
already copied somewhere. So just look for it. It's called the push
image action, right? It's the push image action. So the pushiection.
I think this is it. Push Imuction. The last one
I used was version five. It's now version six. I think it's now version six. Okay. Six that's what I use. I see, this is what's the name? No, no, this this. Let's let's look at
this Docker bet push. Apparently now
this Scott Docker. Compose service push image. It's Docker But push. Since there are so many
options right now. I find it difficult to
see the exact same one. No, no, no. Let's look for this. What's try this Appaly not this. I think I've tried this
try this C small preserve. Away, I already know the exact one to use.
I did a research. I did a bit of research. Let's
try this, let's try this. Apparently, not this also.
I did a bit of research, so I know exactly what it is. So it's supposed to be it's
supposed to be this guy. I do it in everything else. I'll just push. I just add it in here. I just add it in and I'll
explain the details. This would be uses it's
the conversion five. This videos get it long. I'll just post the
video here and I'll see you guys
in the next video.
16. Pipeline docker push image: Hey, everyone, here. I was able to locate the
action we actually needed. This is the name of the action. I think why I actually found it for difficult because
it's now in version six, and I was using version five. What I'm going to do is
I'm going to switch to Version six so we can
actually see how it works. This is exactly
how it looks like, and it expects you
to use a setup Dux. This is very key, you login
and the likes but we've already completed this step as regarding logging
in and the likes. This is the push action
we've completed this. This is the part you're
supposed to use right now, which was actually
given us a the issue. So it also expects
that you use a Bx, this Brex to set up a
Bex section, right? This actually it's
quite a bit of details, but I've actually gone in to modify that to
make that work. I think I played out the
projects that actually did that. So this is how it's
supposed to work. You just set the buder
and set the Bex. So I need to be sure
that these steps, the Brex actually exist, right? This steps, the builders
actually exists. So that is exactly what
we are going to use. So the Bex section is what you're going to
actually pass in here. So the outputs the name. So that would basically be
the output of this guy. So I'm going to go to see if if this context exists and Builder exists or file
exists in Version six, you can play around Version six. So that's what I'm
going to do. So I like using the latest
updates of stuff because it means that they've
actually probably done some work that we
are not aware of. So I'll go to the
file section, so. So expecting a
context context here. Yes, there's a context.
A eri file is located. So is there a file or
yes, there's a file. Then is a Builder? Oh,
yes, that's a builder. Okay. So I think this
is what we need. Yeah, this is basically
what we need. So this part is
what we need now. If you look at this build, if
you look at this correctly, this is taking the steps, the BdexOputs dot name. And this actually looks a sees
within one of these files. So that's where good to
actually figure out. So let me switch this to let me switch this
to a version six. Please so, then switch
this version sick. Okay, so this is
supposed to be there. Then I'll go ahead and change. This is from one of
my earlier projects. So what we're using
is modulates. So with override what
we already have, remember, if you're pushing, you have to push
to your username, your username, then
slash the projects. Okay. So this will
do all the building and push to Docker Hop, right? So let me comment this. I'll commit is are call
this push pipeline push. Hopefully, we get no errors. So call it pipeline push
docker bead and push. This would be 35, I believe, because the last time
around was 34, be 35. I'm going to copy this. Then quite an issue.
Quit an issue. Sir, I think I'll look a
project Quate an issue, then it in here. Quit issue, that's 35. Then already have this in here. I'll just paste this. Push. Push, guys, I'll just
post the video here. I'll be back with you guys
once this has been done, so we don't have to wait
while this is loaded. All right see you
guys. Guys, this is done and this is
completed successfully. Great is great. What we do
is we'll go to Docker Hub, I'll confirm and refresh this. And you can see this was
pushed 1 minute ago. We have our image. This
is fully automated. This is fully automated. One
more change I want to do. I was using Version
five here where we saw this Version
six available. Let's try version six.
Let's try version six. What I'm going to do, I'll
just leave this as it is, all the other configuration
and I'll just push. I'll just a push Pipe and
Lou push version six, then closes 36, right? 36. So let's copy this. I just want to see if
Version six is working. If it's not working,
we just reverte. All right, so let me go. Let's pick this up. Let's
let's get an issue, new issue, less than paste. Bit a push six. Okay? All right, so let's omit that. So coming this and push. Okay. All right. So guys, I do want to go to the video once again
if you're confused. As regarding this party member, I had to add my token
here other than the normal Der password,
I need to mention that. This will be run. Let's see. Pushed successfully, go to I'll go to my actions.
So this is started. I'll just post the video when it's done. I'll come
back to you guys. Let's see version six works. Okay, guys. Yeah, this is done. We see everything
completed successfully. So let's just check out the
push image again, right? So you can see just as usual, it's using Emas Koreto. It's using our Docker file. It's building and everything works as it should. You
can just confirm this. This was 1 minute ago,
let's refresh this. Okay, so that's with
1 minute to go. This is very recent. Okay, so we've been able to
actually complete this and this is this is basically what you want to do to
build your image. Any extra steps you want
to do that probably pull the image from Docker Hub then
move to another registry. You could add more
steps to this, add more steps or
add more jobs that are running in sequence to this. You could upload the image,
pull the image upload. You could basically do anything. Now, the whole idea
is to make you understand that pipeline
is something difficult, or rather just for you
to have at the back of your mind that it's all about automation manual
steps you're doing, just want to probably
automate and we use Gear action to
actually achieve this and everything worked
as we actually hope. Looking at this file at
once might look daunting. But going through step by step, as we explain all
through the videos, I'm sure this would
actually work. Basically you to actually
follow through. Thank you guys. Then there's one last
thing I want to mention. Remember we had to add
this setup moving while the default moving
that was inbuilt in Bunto container
was not running. So you might notice, as a result, you might notice that this cache is
not kicking in. For some weird reason,
it's not kicking in. My analogy actually showed that this is because you
actually added this. Probably before you add this, please run this
directly. It's possible. The movie might kick
in. Maybe there's just some default issues and you might not have
to actually add this. With that done, I thank
you guys who stay with me. Really appreciate the time and see you guys in the next video.
17. Pipeline env secrets: Hi, everyone. Z here. Okay, so we're back. We as stopped this and we're trying to define all the
environment variable. Remember, we took a pause from
building our action file. Saying we want to define
this environment variable. Now, you could see several
actions out there, where they define
all the variable, but this is okay. This works. It works accurately. Well, so it means if I need to actually
change any variable, right? If I need to change
any variable, I would have to rename it here, I have to come in
here, change it, then push to GitHub. And that is what I
do. That's what I do. GitHub actually gives us offers us where we
could actually save over all our variables
alongside our secrets, right? Vilas, what are secret? Secrets are like your username, your password, sensitive data that should not be
open to anyone. I you understand, these are secrets and these are your
environment variables. So variable secrets, let's
explore that now, right? So let's jump into
Github. This is GitHub. Now, I am saying, this is where we
have our actions. Our actions are available here. Now, I'm saying within the
spring modulate course, which is sutil
because let's go to the settings. Let
me see the stans. Now look down here,
you can see there's an environment. There's
the environment. Let's go to the environment. Now, it says there
no environment. Apparently, there
are no environment. Let's label what environment
do you want to have now. Think of environments
like your profile, right? Think about your profile. Remember you could
actually have things like a Dev UAT production for your application the Yao application
of properties, right? So let's think about it, think about it with
respect to this, right? So you could actually have a Dev environment, a
Docker environment. So I'm going to label this because Dev was on my local
system, everything was weird. I am more interested
in my docker environment because
this is where we have some details we need to actually wire in the
variables and the secrets. I'll come in here,
I'll call this, what is the name of
my environments? I'll call my environment Docer. Let's configure my environment. This is my environment. So
you could set up rules. If there is an
organization, you know, Github is an
organization feature where you could have
collaborators, right? You could actually do that and start setting your views,
but this is not the aim. I'll just jump
into what we need. So what we need is we have environment secrets and
environment variables. So this is what we are
going to be defining here within our Docker. Remember the environment Docker. So this will be defined within
the Docker environment. So if you have a production, it means you create yet
another environment, so you come in here. You now create yet another
environment this time around, it probably name or production. Ensure you specify this
production environment within your action file
and that you see do. We want to explore
this. First of all, let's define our variables. What are our variables? I have actually outlined
some of them here. Let me come here. So these are variable. I've gone ahead to separate
every one of them, to separate every one of them. So we have things like the modes we have the
modulate username, password. I said, set up
environment variable. So anyone you see I place
a V here is a variable, anyone I play a S is a secret. These two can be
labeled as secrets and all these can be
labeled as environment. So it's a choice. You can
decide which you want to place as sec or which one to
place a environment. If you have an IP that
I want to you don't want to expose you don't want
anyone to see physically, however, it's a secret. You could just place
take for instance the IP the host IP. Place it within secret,
I just want to show you guys that you have this
options to actually explore. Let me see if I could
split if I can bring my two screens together.
So let's do this. Okay. I'll come in here and
I'll say, I'll pick this. I want the variable. Sorry.
I pick the variable. I want the spring
variable, what am I doing? So my variable and
swapped Docker. Remember it's Docker. Remember this is exactly
what we passing to the spin profile mentioned this earlier to the
Docker file, right? So I add the variable.
Cool. Now we have this. Let's add more, right? Let's add more. Let's add
another variable. The next one, I'll
pick the host. My host is swapped Local
post. Nouns is Local post. Cool. Let's pick the next
next is pots. Oh is the pots? Hi 43, two, four, three, two. Cool. What is the next
is database name. Spring Modulf. Now, what happens if
this is not available? Simple. If this
is not available, you can just easily
come here to check, you see there's an edit built in here. You come here and edit. You come here and quickly
edit. That is the advantage. So you don't have to
redeploy your action file. We also have a property called
the delete event ratio, which you use now we are
publishing the failed events. We actually use 4,000.
Let's pres this here. Cool. Then we have another one called the actuator endpoints, the endpoints you want to
expose, 10.1 to expose. This is the value that
will place on the modulit. Cool. So we've been able to actually set this
up now for the secret. Also set up the sequit which
is the modulit user name, which is modulits then
the Module password. Let's set this mult password. It's also the same modulate. All right. Okay. Now
this is awesome. We actually have this, and I think this is good enough,
right? This is good enough. You guys, we'll set this up. I will see you guys
in the next video while we continue process. See you guys in the next video.
18. Pipeine wrap up: Yay, stand up for the champion, stand
up for the champion. Look who's here, the champion. I'm referring to you for you to get to this
section of the course, not only do you
understand module it, now you know how to
build the CICD pipeline. You can just pick up
the knowledge and apply it wherever on any platform. It works the exact
same way, right? My job or my purpose is to pass on this knowledge which you have amass now it belongs to you. Why don't you go off and
show off that skills. Okay? Now you can develop
the CICD pipeline. Now you know how to
use a CICD pipeline. It's no longer a mystery, now you can demystify it. Gill action is just one
of dive into Azure, dive into any other platform. Remember, the key secret is, know what you want to achieve, lay step by step. Everything uses
the same process. They use concepts like
jobs, concepts like steps, and the likes, and you can also inject secrets and
environment variable. I'm so happy you were here, now you've been able
to actually make it. However, like I said, like I mentioned in the last
wrap up of the first class, there is one more section, which is the final section,
which is Kubernetis. Kubernetis are some call it KHS. That is a very
exciting platform. I'm sure you've
heard of Kubernetis. This is an opportunity
for you to actually delve into Kubernetis and it's
going to be achilrating. I can assure you that it's
going to be wonderful. I'm going to take it from
step by I'm going to take it from the very scratch and I'm going to go step by step. You don't have to worry, I don't know exactly
what this means. You're going to actually
become very familiar. And become a master
in a short time, you can then go ahead to
apply that knowledge. I hope to see you
in the next class. Remember, check the Asap. Check the about tub. I'll
leave you a link there, take it to the next class. I hope you would
actually come with me. See you in the next class.