►
From YouTube: GitLab Packages Importer: NuGet Packages
Description
Packages Importer CLI app from the Package Registry team.
- Project: https://gitlab.com/gitlab-org/ci-cd/package-stage/pkgs_importer
This tool uses the nuget client to pull and publish packages and can interact with any compliant package registry.
0:00 Intro
0:13 Quick refresher
1:12 Demo with a new project
1:34 config.yml import blocks
1:53 GitLab to GitLab example
3:12 The .gitlab-ci.yml file
4:27 Artifactory to GitLab example
5:11 GitHub to GitLab example
5:39 packages.csv to list packages
6:10 nuget.org to GitLab example
6:45 Commit to run the pipeline
6:58 Pipeline explained
8:04 View imported packages
8:20 Limitations
9:17 Submit feedback and questions
A
This
tool
will
use
a
configuration
file
that
defines
the
source
package
registry,
the
destination
package
of
industry
and
all
the
packages
that
need
to
be
imported
from
that
configuration
file.
This
tool
will
create
a
pipeline
configuration
file
and
so
a
gitlab
pipeline
will
get
executed
and
will
execute
the
import.
A
So
here
I
have
an
empty
project,
a
brand
new
project,
so
no
packages
in
the
package
registry
I'm
going
to
open
the
code
editor
here
and
so
so,
as
I
said,
we
will
need
a
config
file
which
will
be
a
yaml
file.
A
A
We
will
have
some
credentials
to
authenticate
against
that
registry.
We
will
need
a
username
token
for
nuget
package
Registries,
so
we
Define
that.
Obviously
we
are
not
going
to
store
credentials
directly
on
the
file,
so
we
can
use
environment
variables
for
that,
and
so
we
will
do
the
same
for
the
destination.
We
Define
the
package
registry
of
a
project
on
GitHub.
A
A
Next
we
will
need
a
gitlab,
CI,
config
file,
and
so
for
this
one
really
simple,
we
just
include
the
template
that
is
defined
by
the
by
the
the
tool
project.
So
it's
it's
a
template
that
will
actually
do
everything,
so
it
will
create
jobs
that
will
pull
the
tool
and
then
run
the
tool.
A
Using
this
configuration
file
then
generate
a
pipeline
configuration
file
and
then
execute
that
pipeline
as
a
children,
python
Okay
so
I'm
sure
that
some
of
you
are
going
to
say,
oh,
but
this
is
like
this
is
within
gitlab,
so
it
it's
it's
easy,
but
actually
the
tool
is
using
like
native
nuget
commands,
which
means
that
we
are
using
the
Nugget
CLI
to
pull
the
package
and
to
publish
the
package.
There
is
nothing
magical,
so
we
can
read
packages
out
of
any
nugget
package
registry
from
which
you
can
pull
using
the
Nugget
CLI.
A
So
we
are
going
to
do
that
and
Define
another
block,
another
import.
So
this
time
around,
we
are
going
to
import
from
artifactory
same
thing.
We
have
a
source
with
the
the
URL,
the
credentials
again
using
environment
variables
and
for
the
destination
this
is
yaml,
so
we
can
use
an
anchor
so
that
we
don't
repeat
the
whole
block
all
the
time.
So
we
just
say:
hey
it's
the
same
destination
as
this
one,
and
then
we
Define
the
packages
to
import.
A
Okay,
fine,
let's,
let's
import
some
more
packages
from
a
different
package
registry.
So
here
is
another
import
block
from
GitHub
this
time
around
same
thing
for
the
source,
URL
credentials
and
same
destination.
But
this
time
around
for
packages,
we
are
going
to
read
that
from
a
CSV
file,
because
I
guess
it's
not
always
easy
to
list
packages
in
this
format.
So
instead
we
are
going
to
define
a
GitHub
CSV
file
and
in
that
file
really
simple.
It
has
to
have
two
columns.
The
first
one
is
the
package
name.
A
The
second
one
is
the
version
string.
That's
it
no
headers,
no
titles,
just
two
columns
and
that's
what
we
have
here
package,
name
and
version,
and
that's
it
you
can
list
all
the
packages
there.
Okay,
that's
fine!
So
let's
add,
let's
add
another
one.
Last
import
this
time
around
from
the
nougat.org
registry,
which
is
the
official
registry.
So
for
that
registry
we
don't
need
credentials,
so
we
are
going
to
pull
as
a
like
Anonymous
user.
So
that's
fine
and
we
are
going
to
pull
some
packages.
A
A
A
Let
me
refresh
the
page
here
it
is.
This
is
the
downstream
Pipeline
and
you
can
see
all
each
import
block
has
been
translated
to
a
stage
of
a
pipeline
so
that
you
have
a
better
vision
of
what
is
happening
and
each
package
is
imported
by
its
own
job.
So
one
job
one
package,
you
have
a
clearer
vision
of
which
jobs
have
been
successfully
imported
and
which
ones
are
of
not
that's
it.
They
have
all
been
imported.
A
A
The
main
reason
is
that,
technically,
there
is
no
way
to
pull
them
using
only
the
Nugget
CLI,
and
so,
if
we
can't
pull
them,
we
can
publish
them.
We
can't
publish
them.
So
that's
a
limitation.