Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

carctl is a tool to help you control your CODING Artifact Registry / WePack.

NotificationsYou must be signed in to change notification settings

coding-wepack/carctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

carctl

carctl is a tool to help you control your CODING Artifact Registry.

The full name ofcarctl isCODING Artifacts Repository Control.

Such asmigrate, you can migrate artifacts from a local directory or a remote urlto a CODING Artifact Repository easily.

migrate now supports:

  • JFrog Artifactory:genericdockermaven andnpm.
  • Nexus:mavenpypi andcomposer.
  • Local Repository:maven
  • Repository settings like proxy source list.

Installation

cURL & wget

# Format: 'https://coding-public-generic.pkg.coding.net/registry/disk/carctl/(linux|darwin|windows)/(amd64|arm64)/carctl?version=latest'# e.g.,$ curl -fL'https://coding-public-generic.pkg.coding.net/registry/disk/carctl/linux/amd64/carctl?version=latest' -o carctl# or wget$ wget'https://coding-public-generic.pkg.coding.net/registry/disk/carctl/linux/amd64/carctl?version=latest' -O carctl# for MacOS$ wget'https://coding-public-generic.pkg.coding.net/registry/disk/carctl/darwin/amd64/carctl?version=latest' -O carctl# MacOS ARM64$ wget'https://coding-public-generic.pkg.coding.net/registry/disk/carctl/darwin/arm64/carctl?version=latest' -O carctl$ chmod +x carctl$ sudo mv carctl /usr/local/bin# validate$ carctl

Help

$ carctlThe CODING Artifact Registry ManagerCommon actionsfor carctl:- carctl login:      login to a CODING Artifact Registry- carctl logout:logout from a CODING Artifact Registry- carctl repo:       handle and control artifact repository- carctl migrate:    migrate artifacts fromlocal or remote to a CODING Artifact RepositoryUsage:  carctl [command]Available Commands:help        Help about anycommand  repo        The repocommand can handle and control artifact repository.logout      Logout from a registry  migrate     Migrate artifacts from anywhere to a CODING Artifact Repository.  repo        The repocommand can handle and control artifact repository.  version     print the CLI versionFlags:  -h, --helphelpfor carctl  -v, --verbose   Make the operation more talkativeUse"carctl [command] --help"for more information about a command.

Commands

Login

# input by interactive mode$ carctl login<registry>Username:Password:

e.g.,

$ carctl login team-maven.pkg.coding.netWARNING: Using --password via the CLI is insecure. Use --password-stdin.Username: usernamePassword: Login Succeeded# or$ carctl login -u username -p password team-maven.pkg.coding.netWARNING: Using --password via the CLI is insecure. Use --password-stdin.Login Succeeded# or$ carctl login -u username team-maven.pkg.coding.netWARNING: Using --password via the CLI is insecure. Use --password-stdin.Password: Login Succeeded# or$echo$PASSWORD| carctl login -u username --password-stdinLogin Succeeded

Logout

$ carctllogout<registry>

e.g.,

$ carctllogout team-maven.pkg.coding.netRemoving login credentialsfor team-maven.pkg.coding.net

Migrate

Maven

Migrate your maven repository to a remote maven repository:

$ carctl migrate maven --src=/home/juan/.m2/swagger-repository --dst=http://codingcorp-maven.pkg.coding.com/repository/registry/overridable-maven-migrate/   2021-12-13 16:35:30.067INFOStatsource repository ...2021-12-13 16:35:30.067INFOCheck authorization of the registry2021-12-13 16:35:30.067INFOScanning repository ...2021-12-13 16:35:30.067INFOSuccessfully to scan the repository{"groups": 3,"artifacts": 16,"versions": 16,"files": 56}2021-12-13 16:35:30.067INFOBegin to migrate ...Pushing: Done! [==============================================================================] 56 / 56  100 %2021-12-13 16:35:39.742INFOEnd to migrate.{"duration":"9.674504559s","succeededCount": 56,"skippedCount": 0,"failedCount": 0}

You can use-v or--verbose flag to see more info:

$ carctl migrate maven --src=/home/juan/.m2/swagger-repository --dst=http://codingcorp-maven.pkg.coding.com/repository/registry/overridable-maven-migrate/ -v2021-12-13 16:33:58.526INFOStatsource repository ...2021-12-13 16:33:58.529INFOCheck authorization of the registry2021-12-13 16:33:58.531DEBUGAuth config{"host":"codingcorp-maven.pkg.coding.com","username":"username","password":"password"}2021-12-13 16:33:58.532INFOScanning repository ...2021-12-13 16:33:58.532INFOSuccessfully to scan the repository{"groups": 3,"artifacts": 16,"versions": 16,"files": 56}2021-12-13 16:33:58.532INFORepository Info:+----------------------+-----------------------------+--------------------+---------------------------------------------+|       GROUP ID|         ARTIFACT ID|      VERSION|                    FILE|+----------------------+-----------------------------+--------------------+---------------------------------------------+| io.swagger.core.v3| swagger-annotations| 2.1.2| swagger-annotations-2.1.2.jar|+                      +                             +                    +---------------------------------------------+# --- snip ---

Migrate your nexus maven repository to a remote maven repository:

$ carctl migrate maven --src-type=jfrog --src=http://localhost:8081/repository/maven-test/ --src-username=admin --src-password=admin123 --dst=http://codingcorp-maven.pkg.coding.com/repository/registry/overridable-maven-migrate/

Migrated artifacts are skipped by default, and you can use --force or -f to force overwriting:

$ carctl migrate maven -f --src-type=jfrog --src=http://localhost:8081/repository/maven-test/ --src-username=admin --src-password=admin123 --dst=http://codingcorp-maven.pkg.coding.com/repository/registry/overridable-maven-migrate/

The current version already supports parallel migrate, and you can specify the amount of parallelism using --concurrency or -c

$ carctl migrate maven -c 4 --src-type=jfrog --src=http://localhost:8081/repository/maven-test/ --src-username=admin --src-password=admin123 --dst=http://codingcorp-maven.pkg.coding.com/repository/registry/overridable-maven-migrate/

Docker and generic artifacts support prefix filtering, using --prefix to specify prefixes

$ carctl migrate generic --prefix dir/ --src-type=jfrog --src=http://localhost:8081/repository/generic-test/ --src-username=admin --src-password=admin123 --dst=http://codingcorp-maven.pkg.coding.com/repository/registry/overridable-maven-migrate/

About

carctl is a tool to help you control your CODING Artifact Registry / WePack.

Topics

Resources

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp