►
From YouTube: Heard of JCasC and Not Sure Where to Start? Let me Help You! - Ewelina Wilkosz, Eficode
Description
Heard of JCasC and Not Sure Where to Start? Let me Help You! - Ewelina Wilkosz, Eficode
One of the goals of Jenkins Configuration as Code plugin is that it should make it easier to maintain your Jenkins setup. But before it gets easier some initial effort is required.
During this presentation I'll show you a very basic setup I use to quickly spin up new Jenkins instances, whenever I need one. I will also share some tips and tricks you'll be happy to know. We'll use docker, jenkins and utilize GitHub Actions as a quick way to build... Jenkins!
A
Hey
welcome
to
heard
of
j
casker,
not
sure
what,
where
to
start.
Let
me
help
you
presentation.
My
name
is
evelina
vilcos
and
I
work
as
a
knight
consultant
in
deficot
and
in
the
right
bottom
corner
of
that
slide.
You
can
see
my
github
and
twitter
handle
if
you
ever
want
to
reach
out.
A
I
specialize
in
continuous
integration,
continuous
delivery
or
whatever
recording
it
these
days
and
the
tools
I
I
work
mostly
with
are
jenkins,
git
and
docker,
and
that's
why
I
believe
I
actually
have
something
interesting
to
show
you
today.
So,
let's
start
a
bit
more
details
about
my
my
experience.
My
journey
with
jenkins
is
what
we're
going
to
start
with,
so
the
first
customer
I
have
ever
worked
with
as
a
consultant
had
a
pretty
old
jenkins
installation.
A
I
think
things
were
starting
to
fail
and
they
were
not
able
to
proceed
with
their
release
process.
So
my
first
task
was
to
fix
it
for
them
to
to
update
what
what
we
could
update
and
to
make
it
work
all
together,
and
that
was
very
challenging.
A
It
was
fun
at
times
because,
obviously,
if
you
have
a
complicated
task
and
and
and
you
fix
it
after,
I
don't
know
hours
of
detective
work,
it's
it's
rewarding,
but
but
it
was
scary
at
the
same
time
because
well
I
was,
I
was
pretty
new
when
it
comes
to
jenkins
and
I
didn't
want
to
break
anything
because
I
was
also
new
at
the
company,
so
I
was
producing
insane
amount
of
screenshots
every
change
I
was
making
and
it
doesn't
matter
if
it's
it
was
job
configuration
or
if
it
was
jenkins
or
plugins
configuration.
A
I
was
creating
screenshots
because
there
is
no
undo
button
in
jenkins.
If
you
make
a
change,
you
have
to
remember
what
was
before.
If
you
ever
want
to
go
back
or
just
well
hope
for
the
best.
So
it
worked
the
screenshot
solution,
but
the
seo,
as
you
may
imagine,
it's
not
the
most
effective
one.
A
We
moved
to
the
to
the
to
the
next
phase,
which
was
my
first
as
code
solution
I
have
ever
heard
about,
and
that
was
post
initialization
scripts.
It's
groovy
scripts
that
you
put
in
a
ini,
dot
d,
folder
aft
under
jenkins
home.
I
don't
really
remember
the
full
name
of
the
folder,
so
it
might
be
a
bit
different,
but
it's
something
about
that
and
every
time
you
restart
your
jenkins.
A
But
the
fact
that
I
did
have
to
restart
jenkins
was
bothering
me
a
bit
because
it
was
always
taking
taking
some
time
and
the
other
issue
I
had
with
this
solution
and
no
matter
how
much
I
love
the
the
outcome
was
the
fact
that
you,
you
do
have
to
write
this
piece
of
groovy
code
to
to
actually
configure
anything
and
for
each
new
thing
you
want
to
configure.
You
have
to
write
a
new
piece
of
groovy
code
and
some
may
say
that
you
know
it's
not
a
rocket
science.
A
It's
it's
a
simple
groovy
and
you
can
learn
how
to
do
it.
And,
yes,
probably
you
do,
but
we
have
to
remember
that
not
every
jenkins,
maintainer
administrator
is
a
software
developer
and
no
matter
how
how
easy
some
of
us
consider
writing
a
script
like
that.
It's
not
the
case
for
everyone.
So
so
it
wasn't
the
solution
that
you
know
anyone
could
apply.
A
Just
like
that.
So
I
started
thinking
about
how
to
how
to
improve
it,
and
obviously
I
wasn't
the
only
person
that
was
dreaming
about
being
able
to
configure
jenkins
scout.
There
were
other
people,
my
colleagues
in
my
company
and
the
people.
A
I
have
never
heard
about
the
members
of
jenkins
community,
for
example,
and
somehow
I
actually
don't
remember
how
it
was
initiated,
but
me
and
my
colleagues
from
pragma,
which
was
the
name
of
the
company
at
that
time,
ended
up
having
a
meeting
with
people
from
cloudbees
and
koska,
maybe
oleg
ninashiv
and
nicola
de
louvre,
I'm
not
sure
at
which
point
they
have
joined,
but
some
subset
of
those
people
were
were
present
at
this
first
meeting
and
and
it
was,
it
was
really
fun
for
me,
because
koski
started
talking
about
his
vision
for
ascot
solution
and
motivation
behind
it
and
well.
A
I
had
a.
I
had
a
piece
of
paper
in
front
of
me
prepared
with
with
some
points
about
the
the
configuration
is
code
approach
that
I
wanted
to
talk
about
and
and
whatever
he
was
saying,
I
was
like
check
check
check.
He
was
actually
having
his
vision
was
pretty
much
in
line
with
our
vision,
and
you
know
it
was.
A
It
was
nice
to
to
to
see
that
we
seem
to
be
going
in
the
right
direction,
so
we've
decided
to
join
the
forces,
people
from
pragma
people
from
cloudbeast
and,
of
course,
amazing
jenkins
community,
and
that's
how
jenkins
configuration
is
called
plugin
came
to
life.
A
So
let
me
very
briefly
tell
you
how
it
actually
works.
First
of
all,
you
have
to
install
configuration
as
code
plugin
on
your
jenkins
instance
in
order
to
use
the
solution,
and
it
really
doesn't
matter
how
you
how
you
start
up
your
jenkins.
I
will
use
docker,
but
you
can
have
you
know.
You
can
have
jenkins
that
you
installed
by
clicking
on
your
windows,
for
example,
and
it
can
also
handle
changes.
Configuration
is
called
plugin.
A
You
need
to
prepare
your
configuration
file
and
I'll
show
you
examples
and
information
how
to
actually
find
some
help
with
producing
the
file
and
the
file
has
to
be
in
yaml
form,
yaml
format.
A
A
There
are
other
ways,
but
the
solution
I'll
be
showing.
You
will
be
using
that
and
we'll
get
to
details
later
so
yeah.
Now,
it's
time
for
later,
where
I'll
show
you
how
I
do
it
so
jenkins,
of
course,
will
be
used,
but
also
github
and
docker,
as
I
mentioned
before,
and
you
don't
have
to
use
github
and
you
don't
have
to
use
docker,
but
those
are
the
tools
that
I'm
comfortable
with
and
worked
basically
out
of
the
box
for
me,
but
any
other
git
repository,
any
other
docker
registry
will
do.
A
You'll
just
have
to
you
know,
do
a
bit
of
work
on
your
own
yeah.
So
here
we
have
it.
Let's
start
with
the
configuration
is
called
plugin
and
the
official
github
repository
for
that
under
jenkins
ca
organization.
A
Plenty
of
information
here
that
I
find
very
helpful
and
come
back
to
quite
often
information
for
people
who
want
to
configure
jenkins
with
configuration
as
code
plugin
and
information
for
people
who
would
like
to
contribute
and
the
the
folder
that
I
recommend
you
to
look
into
demos
contains
and
examples
of
configuration
of
a
subset
of
popular
plugins.
A
So
you
get
a
piece
of
yaml
code
that
you
can
basically
reuse
in
your
in
your
configuration
file
and
yeah.
There
is
plenty
still
not
all
the
plugins,
since
we
have
1700
of
hundreds
of
them
or
more
now.
I
can't
really
keep
up,
but
plenty
of
those
I
use
at
work
are
here
so
a
very
good,
very
good
place
to
look
for
some
inspiration
and
all
the
links.
A
A
First,
repository
jcask
core
contains
docker
files
and
helper
files
for
images.
I
want
to
build
and
yeah
the
solution.
I'm
I
have
in
mind
that
I'm
going
to
talk
about
is
dividing
handling
docker
images
into
one
repository
and
jenkins
configuration
in
a
another
repository,
and
the
reason
for
that
is
that,
well
those
those
things
don't
exactly
have
to
happen
together
in
order
to
make
it
more
reliable
and
faster
for
you
to
to
to
switch,
for
example,
to
a
new
version
of
of
of
jenkins.
A
We
want
to
make
sure
that,
like
in
our
setups
that
that
it
it's
all
going
fast,
so
we
wanna
have
images
pre-built
published
somewhere
and
stored
somewhere
for
a
long
time.
So
it's
always
possible
to
go
to
the
previous
version
and
a
real
life
example.
A
I
I
have
decided
to
upgrade
jenkins
switch
to
a
newer
version
of
jenkins
at
one
of
my
customers
and
they
use
this
solution.
So
what
I
need
to
do
is
to
go
to
their
jenkins
and
check
which
version
of
the
image
they
are
using
right
now
and
well
just
write
it
down
somewhere
and
then
I
I
go
to
the
jks
core
repository
in
their
setup
and
I
changed
the
version
of
jenkins
in
the
docker
file
that
would
be
somewhere
here.
A
I
change
the
version
and
I
wait
for
the
image
to
build
and
be
published
in
docker
registry.
They
are
using
and
then
on
the
machine
where
I
actually
have
this
jenkins
up
and
running.
I
pre-pull
the
image
using
docker
pull
command,
and
then
I
just
restart
the
setup
using
the
script.
That
I'll
show
you
in
the
second
repository
in
a
moment,
and
I
can
check
if
everything
is
okay,
the
image
is
built
and
and
pre-pooled.
A
So
the
whole
action
takes
seconds
and
if
I
notice
a
weird
behavior,
I
can
very
very
quickly
go
back
restart
the
the
jenkins
with
coming
back
to
the
previous
version
they
used,
because
I
wrote
down
this
this,
this
version
number
or
or
remembered
it
in
some
way.
So
so
that's
the
motivation
between
the
the
decoupling
it
into
two
repositories,
handling
images
and
handling
configuration.
A
The
images
are
simple.
I
rely
on
install
plugins
sh
script,
which
is
a
part
of
official
jenkins
image
to
install
plugins
that
I
defined
in
a
text
file
that
has
a
format
like
that
idea
of
the
plugin
and
the
version.
I
don't
think
it's
very
wise
to
just
put
latest
there.
So
in
the
real
life
setup,
I
would
actually
have
version
numbers
here,
but
in
order
to
just
download
the
latest
the
latest
versions
of
the
plugins
for
the
purpose
of
a
demo.
A
I
I
just
put
latest
and
another
important
thing
in
the
docker
file.
Oh,
let's
go
back
to
plugins
for
a
second.
We
have
to
copy
the
plugins
somewhere
to
the
container
in
order
to
be
able
to
to
use
it
as
an
input
for
the
plugin
as
a
subset
of
environment
variables
being
configured
among
others,
jenkins
home.
So
I
actually
know
where
the
jenkins
home
will
be
stored
in
the
container
and
disabling
the
setup
wizard
using
java
opts.
A
A
It's
absolutely
not
needed
for
for
this
setup
to
work,
but
it's
just
an
example:
how
to
how
to
use
docker
to
start
up
a
container
and
with
the
help
of
swarm,
plug-in,
actually
automatically
connect
this
a
container
to
jenkins
as
a
build
agent
or
a
number
of
them,
and
then
I
I
used
I've
decided
to
use
github
to
build
my
jenkins.
So
I
rely
on
github
actions
and
my
experience
with
github
actions
is
basically
non-existing
and
it's
still
with
a
bit
of
googling,
took
me
a
few
minutes
to
have
it
up
and
running.
A
So
sorry,
if
I,
if
I
stick
to
the
old
version
old
name,
I'm
getting
used
to
the
new
one
and
jks
agent
are
published
and
they
are
versioned
with
a
short
shop.
So
this
is
this:
is
the
version
number
we'll
use
to
start
it
up
and
the
second
repository,
the
one
where
the
actual
configuration
is
being
stored
is
jks
conf.
We
have
a
config
configs
folder,
where
a
very
simple
configuration
file
is
is
kept
and
we
have
docker
compose
and
yeah.
A
I
told
you
we
need
to
know
where
the
location
of
the
jenkins
home
on
the
container
is
that's
why
we
set
it
up
in
the
during
the
build
in
the
docker
file
and
in
my
docker
compose
file.
I
map
the
location
of
this
location
from
the
container
to
something
that
is.
A
The
location
of
the
folder
with
the
configuration
file
is
file
or
files
is
also
mapped
to
a
location
in
a
container
and
that
location
on
a
container
and
is
then
being
set
as
a
as
a
content
of
the
environment
variable
and
some
some
settings
related
the
the
agent
container
too.
But
since
this
is
not
the
main
focus
of
this
presentation,
I'm
not
gonna
talk
much
more
about
this.
A
So
we
have
our
our
docker
compose,
and
here
we
also
use
environment
variable
to
define
which
version
are
we
gonna
use,
which
version
of
the
image
for
j,
cascade
and
jcask
agent?
We
want
to
use-
and
that's
made
that
way,
so
we
can
actually
have
a
have
a
script
and
that's
the
jay
cascasa
script,
where
we,
where
we
set
the
version
and
the
jaycask
home,
and
in
my
case
it's
actually
going
to
be
that
folder.
A
You
just
have
to
make
sure
that
this
folder
exists
before
starting
up
the
container,
because
if
you
set
up
a
mapping
of
the
location
on
the
container
to
location
on
your
on
your
disk
on
your
machine
and
the
folder
on
your
machine
doesn't
actually
exist,
it
will
be
created
as
belonging
to
a
root
user
and
then
it
will.
There
will
be
a
problem
with
actually
accessing
it.
A
So
you
can,
you
can
set
jks
home
to
point
to
another
folder
or
you
can
just
create
that
folder,
but
whatever
folder
it's
pointing
to
it
has
to
exist,
and
then
we
yeah
we
just
set
the
version
of
jkusk
as
the
version
you
you
you
give
to
to
the
script
as
a
parameter
when
you
run
it
so,
let's,
let's
actually
try
to
run
it.
A
A
So
I
call
the
jay
caskasage
script
with
the
argument
up
and
the
version
number
I
want
to
use-
and
that
comes
from
the
docker
hub
and
the
scale
argument
is
about
the
number
of
agent
containers
I
want
to
have
so
maybe
let's
change
it
to
two,
and
I
did
run
it
a
second
ago
before
I
I
started
preparing
this
presentation,
so
I
don't
need
to
the
pool
of
the
image
is
not
required,
but.
A
A
It
usually
takes
seconds.
I
don't
know
20
30
seconds,
to
have
your
jenkins
up
and
running.
It's
super
slow
on
my
computer
when
I
do
this
recording,
but
but
it's
up
and
running,
I
think
I
mean
I
know
because
I
can
see
the
top
here.
That
says
dashboard
jenkins,
if
you're
not
sure
what's
happening,
you
can
always
just
check
the
id
of
your
jenkins
container
and
use
docker
locks
command
to
print
the
locks
and
somewhere
here
I
have
jenkins,
is
fully
up
and
running.
A
A
A
So
the
the
first
important
one
is
about
the
configuration
file
unless
you're
like
100
sure
it's
going
to
work
start
simple,
because
until
your
configuration
file
is
correct
and
and
a
suitable
for
configuration
is
called
plugin
with
the
subset
of
plugins,
you
have
installed
to
be
used.
Your
jenkins
will
not
start
so
you
have
to
start
simple
and
and
when
I,
when
I'm
in
trouble,
I
just
remove
everything
for
the
compute
from
the
configuration
file
put
it
in
another
file
and
just
leave
system
message.
Once
your
jenkins
is
up
and
running.
A
A
A
And
I'm
in
trouble,
it
tells
me
that
something
went
wrong
and
I'm
not
actually
sure
what's
the
problem,
so
I
can
always
do
the
same
thing
I
did
before
I
just
print
the
logs
and-
and
I
have
a
stack
trace.
That
is
complaining
that
it's
a
valid
configuration
element
for
jenkins
system
message.
A
So
that's
a
typo
I
made
and
and
the
the
most
important
thing
is
that
nothing
has
changed.
The
system
message
is
as
it
was
before
it.
If
you
use
my
example,
it's
gonna
display
the
the
version
of
the
image
you
had
built
to
start
it
up,
and
you
can
just
go
back
to
the
configuration
file
and
well
fix
the
change
and
that's
a
very
simple
example.
It
would
be
exactly
the
same
if
you
actually
made
a.
A
A
And
I
will
not
follow
those
in
an
exact
order.
How
to
avoid
using
documentation
is.
Is
another
nice,
nice
tip?
So
if,
if
you
go
under
manage
jenkins
configurations
code,
you
have
a
number
of
things
you
can
see
here.
I
was
using
reload
existing
configuration.
If
I
hit
it
now
again
after
I
fix
the
configuration,
it's
not
going
to
throw
an
error,
but
you
can
also
view
the
configuration.
A
A
There
might
be
some
stack
traces
here
if
the
plugin
is
not
compatible
with
configuration
as
code
yet
and
there's
plenty
of
things
that
are
that
are
like
related
to
agents
that,
in
case
of
a
swarm
agent,
doesn't
have
to
be
kept
in
the
configuration
filed
and
plenty
of
default
settings
that
are
printed
here,
that
you
also
don't
need
to
keep
in
the
configuration
file.
A
But
you
can
just
go
one
by
one
and
and
put
in
your
configuration
file
and
that's
helpful
also
when
you,
when
you
try
to
move
or
have
old
instance,
working
somewhere
and
you're,
creating
a
new
one
in
a
different
place
and
maybe
want
to
reuse
some
pieces
of
the
configuration
you
can
always
use
use
this
as
an
inspiration
and
two
other
things.
A
The
documentation
is
also
available
on
that
page,
so
you
can
when,
whenever
I
I
need,
I
don't
know
how
to
configure
something
I
never
configured
it
before,
or
maybe
the
new
version
of
plugins
moved
or
renamed
some
fields
this.
A
So
we
know
that
credentials
is
a
root
element,
so
it
doesn't
have
any
indentation
in
in
the
yaml
file
and
then,
when
you
wanna
change
change,
something
you
just
try
to
figure
out,
which
name
from
the
which
field
from
the
ui
would
would
fit
the
the
name
here
and
well,
usually
they
are
very
similar.
So
I
want
to
create
system
credentials.
So
I
I
search
for
system
credentials,
provider
and
then
I
see
it
has
domain
credentials
and
domain
credentials
has
to
to
attributes,
etc,
etc.
A
So
you
can
kind
of
follow
that
using
sometimes
there
is
a
link
and
if
there
is
no
link
you
you
have
to,
you
have
to
use
the
search,
and
the
last
thing
I
I
have
on
my
on
my
list
of
of
how
to
make
it
easier
is
keep
your
jenkins
home
safe.
So
I
told
you
I
I
have.
I
have
jenkins
home
folder.
A
I
created
I
called
it
jks
home
on
my
machine
and
and
here
all
the
all
the
things
including
jobs,
configuration
and
history
is
being
stored.
And
if
I
want
to
make,
for
example,
a
significant
upgrade
switch
to
a
new
version
that
that
seems
to
introduce
a
lot
of
changes.
What
I
would
do
is
I
would
copy
this
folder
somewhere
safe
to
have
to
have
it
on
the
side
untouched.
And
then
I
would
try
to
run
a
run
jenkins
with
that
home,
folder
and
and
the
new
version
of
jenkins.
A
And
if
that
doesn't
work,
and
somehow
the
new
version
of
jenkins
corrupted
some
of
the
files,
I
can
always
switch
switch.
Put
it
down,
move
back
the
content
of
the
original
jaycast
home
and
start
it
up
again
with
the
old
version.
So
I
I
can
have
my
my
jenkins
up
and
running
and
then
maybe
use
some
staging
environments
to
experiment
a
bit
with,
with
the
newer
version,
a
combination
on
the
newer
version
and,
for
example,
the
content
of
this
folder.
A
So
my
time
is
running
up
or
or
it
maybe
have
had
run
up
already.
Sorry
about
that.
But
I
really
really
wanted
to
make
sure
that
you
get
all
the
information
that
I
wanted
to
share
with
you.
If
there
is
still
some
time
for
answering
questions,
I'm
going
to
stay
and
answer
them
for
you.
Thank
you
for
joining.