►
Description
Learn how to trigger GitLab CI/CD from GitHub Actions, so you can leverage GitLab Auto DevOps to create CI/CD pipelines based on DevOps lessons that GitLab has learned from its thousands of customers.
A security note: for the sake of simplicity, in this video we expose the GitLab pipeline token in the repository. In production, this may give malicious users access to your pipeline; so when in production, avoid persisting secrets like this token in the repository, and keep them in a secret management system.
Much more from Learn@GitLab: https://about.gitlab.com/learn/
Get in touch with Sales: http://bit.ly/2IygR7z
A
A
B
B
Great,
so
to
create
the
action
that
will
trigger
gitlab
cicd
pipeline.
We
will
go
to
actions
and
we'll
create
a
new
workflow,
and
we
will
use
this
link
set
up
a
workflow
yourself,
so
it
creates
for
me
a
basic,
a
template
code.
You
call
it
the
cd,
and
here
is
the
rules
when
it
will
trigger
this
workflow.
It
will
trigger
on
the
push
and
pull
request
on
this
branch,
and
here
are
the
jobs
we
have.
One
job
called
build
that
will
run
on
ubuntu
latest
and
here
are
the
steps,
the
job
steps.
B
B
B
B
B
It
will
and
it
will
work,
but
so
let's
see
another
example
how
to
make
it.
So
I
will
just
delete
those
lines
and
we'll
on
the
right
side.
We
have
the
marketplace
for
action,
so
I'll
search
for
gitlab-
and
I
see
I
have
a
few
here
for
gitlab.
So
I
will
select
the
second
one
and
this
is
the
actual
code.
B
B
And
I
will
explain
you
what
is
called
first.
It
uses
the
this
action
and
this
is
actually
the
repository
and
the
version
of
that
repository-
and
here
are
the
parameters
that
this
action
needs.
First
of
all,
is
the
host.
The
default
is
a
gitlab.com,
so
I
can
remove
those
lines
because
I'm
using
gitlab.com,
you
need
a
token
in
order
to
have
permissions
to
trigger
a
gitlab
cicd
pipeline.
So
I
will
open
my
project
and
I
will
go
to
the
ci
cd
settings
and
go
to
pipeline
triggers,
expand
it
and
create
trigger
call
it.
B
B
And
I
will
go
back
to
gitlab
to
configure
the
ci
cd
settings,
it's
very
simple
check
this
checkbox
and
then
select
deployment
strategy
and
save
changes.
This
is
all
of
the
cicd
settings
that
I
needed
to
do.
Of
course,
we
have
a
more
advanced
setting
with
the
yammer
configuration
that
you
can
customize
your
settings
and
add
or
remove
jobs,
but
for
starting
we
really
recommend
to
use
the
autodevops
because
autodevops
it's
not
only
that
it
sets
for
you
all
of
the
ci
cd.
B
B
B
Indeed,
new
pipeline
just
started,
and
this
is
a
visualization
of
my
pipeline.
We
call
it
the
pipeline
graph.
It
shows
me
all
of
the
jobs
and
the
stages
in
gitlab,
so
we
have
here
a
few
stages.
Build
test,
review,
dust
performance
and
cleanup
that
will
run
sequentially
in
each
stage
is
made
of
one
or
more
jobs
in
it.
So
first
it
will
take
my
code,
build
it
and
create
a
docker
image
from
it
and
we'll
publish
it
in
the
built-in
container
registry
here
so
in
gitlab
web
building
container
registry.
B
B
Then
it
will
run
a
few
tests
for
code
quality
security,
license
compliance
great
all
test
job
just
completed.
The
next
stage
is
to
deploy
a
review
application.
The
job
will
take
the
docker
image
of
the
developer's
branch
and
deploy
it
to
kubernetes,
so
the
developer
will
have
a
live
instance
of
his
personalized
range.
B
This
is
very
useful
for
the
review
process
and
now
because
we
have
a
live
instance,
we
can
run
performance
and
dynamic
application
security
testing
on
that
instance,
and
when
the
developer
will
be
ready
to
merge
this
code,
the
cleanup
jobs
will
stop
those
review
environments.
So,
just
to
recap
about
what
we
see
here,
this
pipeline
represents
github
best
practices
for
continuous
integration.
It
empowers
developers
with
the
feedbacks
they
need
and
all
of
this
configuration
doesn't
require
any
efforts
from
the
developer
great.