►
Description
In this video, Veer Muchandi explains how to use external Jenkins to deploy applications to OpenShift with a simple example. You may consider this as a starting point and build upon this example for your specific enterprise needs.
In the blog post https://blog.openshift.com/promoting-applications-across-environments/ you can find some notes that can make it easier for you to follow all the steps mentioned in the video.
NOTE: For the latest information on OpenShift 3, please visit https://enterprise.openshift.com or subscribe to the OpenShift Blog (https://blog.openshift.com).
A
Hello,
this
video
is
about
deploying
applications
into
OpenShift
using
Jenkins.
In
order
to
follow
this
video,
it's
a
prerequisite
that
you
would
want
to
watch
my
previous
video
on
promoting
applications
across
environments
across
the
projects.
So
if
you
are
not
seen
that,
please
see
that
video
and
then
come
back
to
this
video
I'm
using
an
external
Jenkins
environment
here,
although
you
could
be
running
Jenkins
within
OpenShift
itself,
and
there
are
a
lot
of
improvements
coming
in
that
area
on
running
Jenkins
in
openshift
which
can
deploy
applications
into
OpenShift.
A
So
these
things
will
change
as
we
move
into
the
future.
But
in
the
meantime,
how
can
you
use
Jenkins
and
an
existing
Jenkins
in
your
in
your
environment,
to
deploy
applications
into
OpenShift?
Is
what
I'm
going
to
show
you
I'm
building
upon
my
previous
video
that
talks
about
promotion
of
applications
across
the
environments?
If
you
have
watched,
my
previous
video
you'd
have
seen
that
I
have
a
development
project.
I
have
a
QA
project
and
I
have
setup
necessary
access.
A
For
example,
the
developer
would
have
edit
access
to
the
development
project
and
the
tester
would
have
edit
access
to
the
QA
project
and
the
Duster
has
view
access
to
the
development
project.
Things
like
that.
Also
the
the
the
QA
project,
the
testing
project,
would
have
image
pool
access
from
the
development
project,
which
means
that
if
a
docker
image
got
created
in
the
development
project,
the
testing
project
can
pull
it
from
the
development
project
right.
So
we
are
going
to
build
upon
the
same
same
approach
as
that
we
have
used
in
the
in
my
previous
video.
A
All
I'm
doing
here
is
I
have
set
up
two
Jenkins
projects,
so
how
did
I
create
this
I
clicked
on
this
new
item,
once
I
logged
onto
Jenkins,
I
clicked
on
this
new
item
chose
a
freestyle
project
and
I
call
it
deploy
to
development
right
now.
Let
me
show
you
what
is
there
in
this
project?
This
script
locks
your
user
in.
You
have
some
environment
variables
that
I
pass
to
this
Jenkins
script.
This
this
script
logs
in
using
the
OC
command-line
tool,
I
installed
OC
command-line
tool
on
the
Jenkins
server.
A
It
gets
into
the
development
project
and
if
the
application
doesn't
exist,
it
goes
ahead
and
creates
any
application.
If
the
application
exists,
it
starts
a
new
build
and
then
once
the
build
is
complete,
it
goes
ahead
and
deploys
the
application
and
you
could
the
I
have
written
the
script
in
such
a
way
that
you
could
include
your
test
scripts
at
this
stage.
A
If
you
wanted
to-
and
that's
it,
that's
the
deploy
to
development
part
now,
there
is
also
another
project,
a
deploy
to
QA,
which
takes
the
core
from
that,
and
it
takes
the
docker
image
from
the
dev
from
the
development
project.
It
tags
that
image.
Just
like
how
I
explained
in
the
in
my
previous
video
of
how
you
can
promote
across
the
projects,
it
tags
the
image
and
it
takes
that
image
that
is
stacked
as
promote
and
it
goes
ahead
and
deploy
that
application
into
QA.
A
If
the
image
already
exists,
it
doesn't
have
to
create
the
new
application,
the
application
that
was
already
there
we'll
get
redeployed
right.
Very
simple.
Also
note
that
I
have
made
this
code
available,
the
scripts
that
that
you
would
use
in
those
Jenkins
projects
available.
As
part
of
my
github,
there
is
a
the
deploy
to
dev
script
is
here
and
the
deploy
to
cue
a
script
is
here.
A
I
also
have
two
empty
projects:
development,
which
is
which
has
nothing
in
it,
as
well
as
the
testing
project,
which
has
not
now
before
we
start
running
I
have
in
the
Jenkins
project
for
development.
I
have
set
some
environment
variables,
which
the
script
uses.
One
is
the
application
name
which
is
which
I
call
it
my
app
for
the
application
host
name
since
this
is
turning
in
development.
I
said
my
app
dot
del
dot,
my
URL
and
then
for
the
get
URL
I
am
I'm
using
the
same
exact
code
that
we
used
in
the
previous
video.
A
This
is
the
kitchen
sink
application
and
I've
passed
the
other
things
like
my
username.
Where
is
my
OpenShift,
like
that?
In
the
same
way
in
the
QA
project,
I
have
the
environment
variables
defined
and
Here
I
am
calling
the
I'm
giving
the
hostname
as
my
ab
QA,
the
application
name,
I'm.
Keeping
the
same
there's
other
parameters
are
the
same:
I
am
passing
the
QA
project
name
and
the
development
project.
A
I
have
created
a
deployment
pipeline
by
using
those
two
Jenkins
projects
or
Jenkins
steps,
so
there
is
a
deploy
to
dev
and
deploy
to
queue
in
this
pipeline.
Let's
start
this
pipeline
now
I'll
I'm,
going
to
issue
a
run.
This
starts
the
deploy
to
dev
part
of
step
in
the
pipeline.
Let's
see
what
the
output,
the
console
output
is
this,
isn't
it
nothing
existed
in
the
development
project?
It
created
a
new
application.
Now
it
is
waiting
for
the
bill
to
start
the
build
has
started.
A
You
the
build,
is
now
complete
and
also
it
created
the
docker
image
for
the
application
in
that,
and
it
has
pushed
that
into
the
docker
registry
and
deployed
it
Jenkins.
Job
that
we
have
created
will
make
sure
that
the
application
is
deployed,
and
it
is
you
are
able
to
connect
to
that
and
after
that,
it
it
comes
out
with
the
finished
success
status.
Now,
let's
go
back
to
the
web
console
and
check.
There
is
nothing
in
the
testing
project
yet,
and
there
is
this:
is
the
application
running
in
the
development
project
earlier
it
was
empty.
A
Let
me
open
this
in
the
new
tab.
To
make
sure
it
is
running
here
is
the
application
that
is
deployed
now.
Let's
say
we
are
happy
with
this
version
of
application,
and
we
want
to
promote
this
to
QA.
All
the
steps
that
we
discussed
in
the
previous
video
are
now
automated
go
back
to
the
pipeline
right
and
it
is
waiting
for
the
next
step
to
start
and
I
can
run
this
deploy
to
QA
step.
Looking
at
the
logs
of
this
deployed
queue
a
project
in
Jenkins.
The
application
was
not
there,
so
it
ended
up.
A
Tagging
the
image
creating
a
new
app
on
that
from
that
newly
tagged,
docker
image,
the
application
got
deployed
and
it's
it
waited
till.
The
applications
has
skaila
and
then
it
is
successful.
Now,
let's
go
back
to
the
web
console
move
into
the
testing
project.
You
can
see
that
it
was
empty
before
and
this
testing
project
is
now.
It
now
has
a
application
running.
So
let's
try.
This
here
is
the
app
now
this
is
the
same
version
1
as
the
develop
now
just
like.
A
In
the
previous
example,
I
made,
I
went
back
to
the
source
control
repository
I
made
a
bad
change
and
as
I
tagged
it
as
version
2,
let
just
for
us
to
know
and
then
I
committed
this
genius
now
I
come
back
to
the
deployment
pipeline
and
I
start
a
new
build
again
for
the
development.
This
will
take
a
minute.
I
will
pause,
the
build
is
now
complete
and
let's
check
the
application,
dev
environment,
and
this
is
a
bad
change
right
now.
A
This
there
is
a
spelling
mistake
now:
I,
don't
have
any
test
cases,
otherwise
the
build
itself
would
have
failed,
but
you
don't
like
this
change,
so
you
don't
want
to
promote
this
into
into
the
QA
anyway
again,
just
like
my
previous
video
I
will
go
back
and
fix
the
I
fixed.
The
mistake-
and
this
is
version
three
no
back
to
deployment
pipeline
I'll
rerun
this
again.
The
new
build
has
now
started
now,
this
time
again
the
application
is
already
existing,
so
it
will
just
start
a
new
build
based
on
the
core
changes
we
made.
A
The
build
is
complete,
so
let's
go
back
and
check.
So
here
is
the
version
3
of
the
application.
Now,
since
we're
happy
with
this
build
we're
back
on
the
pipeline,
I'll
start
the
deployment
of
QA.
Now
it
will
take
the
latest
version
of
the
image
development
and
it
will
tag
it
as
promote
the
queue
and
it
will
deploy
into
QA.
So
we
currently,
we
don't
have.
We
are
still
running
version.
1
version
2
was
bad.
We
didn't
promote
that
into
QA
version.
3
is
good.
We
are
trying
to
promote
that
into
QA
and
applied.
A
That
know
the
deployment
of
QA
is
complete.
It's
it's
turned
green
and
let's
go
back
and
check
the
image
in
QA,
and
this
is
also
version
3.
The
intent
of
this
video
is
just
to
show
that
you
can
deploy
applications
into
OpenShift
using
an
external
CI
CD
tool
such
as
jenkins
in
the
future
for
jenkins.
Specifically,
you
can
expect
additional
improvements.
For
example,
you
may
have
a
plugin
that
that
would
apply
applications
into
openshift.
This
is
not
a
prescribed
approach
or
anything.
I
made
the
code
available
as
part
of
the
kit
repository.