►
From YouTube: GitLab Speed Run: Remove docker images via CI/CD
Description
No description was provided for this meeting.
If this is YOUR meeting, an easy way to fix this is to add a description to your video, wherever mtngs.io found it (probably YouTube).
A
A
Here's
an
example
get
lab
CI
mo
file.
You
can
see
here.
I
have
two
stages:
build
and
clean.
During
the
build
phase,
I
am
logging
into
docker
using
the
environment,
variables,
CI
registry
user
and
password
I'm,
also
building
an
image
and
tagging
it
with
the
CI
commit
ref
name
or
branch
name
during
the
clean
stage.
I'm
logging
in
with
the
same
credentials
and
this
time
I'm
actually
just
going
to
remove
the
image
that
matches
the
branch
name
or
CI
commit
ref.
So
let's
see
this
in
action.
A
Ok,
I'm,
going
to
navigate
to
my
pipeline
run
pipeline
now
I
have
this
turned
off
for
master
just
because
I
don't
want
to
delete
any
release
images
or
any
images
tied
to
the
master
branch.
So
I'm
going
to
run
this
for
my
developer
edge
here
and
now
you
don't
need
any
variables
I'm
going
to
run
pipeline.
A
A
A
And
check
in
on
the
status
of
the
delete
branch
image,
job
I'm,
going
to
pause
it
for
one
second,
not
but
okay.
We
could
see
that
this
job
is
running
and
it
looks
like
it
deleted.
The
attack
and
the
job
succeeded.
Let's
go
back
over
to
my
container
registry
UI
and
we'll
refresh
this,
and
we
could
see
that
there's
no
active
tags.
So
using
my
pipelines,
we
built
an
image
and
we
deleted
that
image
using
the
predefined
environment,
variable
CI,
registry
user
and
password.
A
The
other
reason
I
bring
this
up
is
because
in
12.7
we
have
an
interesting
feature
coming
up
where,
where
you
will
be
working
on
allowing
pipeline
permissions
to
be
elevated,
so
here
you
can
see
our
existing
scopes
for
personal
access
tokens
as
of
today.
If
you
want
to
give
right
access
to
the
container
registry,
you
only
have
choice
to
give
the
full
API
access.