►
From YouTube: Packages Importer
Description
Packages Importer CLI app from the Package Registry team.
Project: https://gitlab.com/gitlab-org/ci-cd/package-stage/pkgs_importer
A
So
the
idea
of
this
tool
is
to
you
have
a
configuration
file
where
you
describe
your
packages
that
you
want
to
import
and
this
tool
will
generate
a
pipeline
config.
So
why
a
pipeline
well,
because
then
we
can
create
as
many
jobs
as
they
are
needed
and
each
job
will
import
one
package
file
into
gitlab.
A
A
A
Please
note
that
I'm
using
the
remote
keyword
here,
which
means
that
you
can
include
this
template
from
outside
gitlab.com,
so
any
self-managed
instance
can
reference
this
file
and
and
have
this
feature
working
no
problem.
Then,
as
I
said,
we
will
need
a
config
file
here.
It
is,
and
how
are
we
going
to
organize
Imports?
Well,
we
will
have
blocks.
A
Let
me
add
one,
so
this
is
an
import.
There
is
the
type
so
npm,
that's
the
only
value
available.
At
the
moment
there
is
a
source
package
registry
and
there
is
a
destination
which
is
okitlab.com
Project.
Then
we
have
a
description
of
all
the
packages
that
we
want
to
import.
We
can
describe
them
as
a
mapping
package,
name
and
version,
or
we
can
have
a
package
name
and
a
list
of
versions.
A
Of
course
you
can
have
multiple
Imports,
and
so
this
tool
will
use
npm
the
CLI
tool,
the
CLI,
the
npm
tool
itself,
so
it
can
interact
with
any
npm
compliant
package
registry.
So
here
is
another
import.
This
time
around,
it
is
from
a
gitlam.com
project
a
different
one.
But
since
the
gitlab
npm
package
registry
is
an
npm
comply
and
package
registry,
we
can
read
packages
from
from
that
notice
that
for
the
destination
this
is
yaml,
so
we
can
use
a
yaml
anchor
so
that
I
will
not
repeat
everything.
A
So
this
is
nice
but
let's
add
another
npm
package
registry
provider.
So
again,
this
one
has
implemented
the
npm
apis
of
the
npm
package
registry,
and
so
we
can
read
packages
out
of
it,
just
fine
and
import
them.
A
And
lastly,
this
wouldn't
be
fun
if
we
can't
import
packages
from
the
official
registry,
so
npmgs.org
last
thing
notice
that
we
can
also
import
packages
from
a
CSV.
So
this
way
you
can
have
a
different
tool
that
will
create
that
CSV
and
then
feed
that
CSV
into
this
importer.
So
let's
create
that
CSV.
A
A
So
we
will
have
a
look
at
the
pipeline
side,
and
here
we
have
our
pipeline.
So
our
template
that
we
imported
is
describing
so
one
job,
that's
our
importer
tool
that
will
take
the
config
file
and
generate
the
pipeline
config
it.
Well.
It's
already
done.
You
can
see
that
the
python
config
has
been
successfully
written
nice,
so
a
pipeline
config
has
been
created
and
now,
if
we
go
back
to
the
pipeline,
there
is
a
downstream
pipeline
here.
It
is,
and
we
do
have
all
our
Imports
organized
by
the
import
block.
A
A
If
you
have
any
error
of
on
on
any
package,
of
course,
you
can
click
on
the
job
and
you
get
all
the
logs
you
can
see.
As
I
said,
we
are
just
using
the
npm
client
to
pull
and
publish
the
package
like
nothing
magical
now,
let's
have
a
look,
and
here
we
have
all
our
packages
into
gitlab.
So
we
successfully
imported
packages
from
one
two.
A
Three
four
different
sources
so
have
a
look
at
this
tool:
try
it
don't
hesitate
to
open
issues
for
ideas
bugs
or
feedback
and
I
will
leave
the
this
URL
of
the
project
in
the
video
description.