All Projects → koudaiii → qucli

koudaiii / qucli

Licence: MIT license
Manage repositories in Quay.io

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to qucli

yrs
Yarn registry switch tool
Stars: ✭ 12 (-58.62%)
Mutual labels:  registry
ISOKIT
Windows 10 Professional - Full Strip & Lockdown Edition
Stars: ✭ 35 (+20.69%)
Mutual labels:  registry
sregistry
server for storage and management of singularity images
Stars: ✭ 96 (+231.03%)
Mutual labels:  registry
AUCR
Analyst Unknown Cyber Range - a micro web service framework
Stars: ✭ 24 (-17.24%)
Mutual labels:  quay
Matthew-Lancaster
A Collect of Script For AutohotKey, DOS Command, VBScript, VB6, VB2008, Grub4Dos, Reg Keys, Win Powershell, SMTP, ARDUNIO, GITHUB Begin OCT 2018
Stars: ✭ 21 (-27.59%)
Mutual labels:  registry
oras
ORAS CLI
Stars: ✭ 672 (+2217.24%)
Mutual labels:  registry
Reg2CI
Create System Center Configuration manager ConfigItem (CI's) from a .reg (Registry) or a .pol (Policy) file.
Stars: ✭ 74 (+155.17%)
Mutual labels:  registry
Windows10Tools
Tools for Windows 10
Stars: ✭ 45 (+55.17%)
Mutual labels:  registry
protocol-registry
This module allows you to set custom protocol handler for your nodejs app.
Stars: ✭ 45 (+55.17%)
Mutual labels:  registry
DNSSuffix
A set of PowerShell tools for managing the computer's primary DNS suffix.
Stars: ✭ 19 (-34.48%)
Mutual labels:  registry
wcpctl
Kubectl system interaction with the vSphere 7 Supervisor cluster
Stars: ✭ 19 (-34.48%)
Mutual labels:  registry
winregistry
Tiny Python library aimed at working with Windows Registry
Stars: ✭ 16 (-44.83%)
Mutual labels:  registry
registry
TLD Management Software
Stars: ✭ 32 (+10.34%)
Mutual labels:  registry
npm-updates
Emits update events from the npm repository.
Stars: ✭ 16 (-44.83%)
Mutual labels:  registry
crux.land
crux.land is a free registry service meant for hosting small (≤ 20kB) single deno scripts.
Stars: ✭ 50 (+72.41%)
Mutual labels:  registry
Windows-10-tweaks
This repo contains multiple scripts to optimize windows 10
Stars: ✭ 37 (+27.59%)
Mutual labels:  registry
iscn-specs
International Standard Content Number - decentralized content registry
Stars: ✭ 16 (-44.83%)
Mutual labels:  registry
openshift-disconnected-operators
No description or website provided.
Stars: ✭ 52 (+79.31%)
Mutual labels:  registry
schema-registry
📙 json & avro http schema registry backed by Kafka
Stars: ✭ 23 (-20.69%)
Mutual labels:  registry
cli
Autocode CLI and standard library tooling
Stars: ✭ 3,791 (+12972.41%)
Mutual labels:  registry

qucli

Build Status Docker Repository on Quay GitHub release

Description

Manage repositories in Quay.io

Table of Contents

Requirements

$ export QUAY_API_TOKEN=foobar

if Quay Enterprise user, add Enviroment QUAY_HOSTNAME or --hostname

$ export QUAY_HOSTNAME=quay.example.com
or
$ qucli xxx --hostname=quay.example.com

Installation

Using Homebrew (OS X only)

Formula is available at koudaiii/homebrew-tools.

$ brew tap koudaiii/tools
$ brew install qucli

Precompiled binary

Precompiled binaries for Windows, OS X, Linux are available at Releases.

From source

To install, use go get:

$ go get -d github.com/koudaiii/qucli
$ cd $GOPATH/src/github.com/koudaiii/qucli
$ make deps
$ make install

Run in a Docker container

docker image is available at quay.io/koudaiii/qucli.

# -t is required to colorize logs
$ docker run \
    --rm \
    -t \
    -e QUAY_API_TOKEN=foobar \
    -e QUAY_HOSTNAME=quay.io \
    quay.io/koudaiii/qucli:latest

Usage

$ qucli
usage: qucli [--version] [--help] <command> [<args>]

Available commands are:
    add-notification       Add notification in repository
    add-team               Add team in repository
    add-user               Add user in repository
    create                 Create repository in Quay
    delete                 Delete repository in Quay
    delete-notification    Delete notification in repository
    delete-team            Delete team in repository
    delete-user            Delete user in repository
    get                    Get Repository and Permissions and Notifications in Quay
    list                   List repository and Permissions in Quay
    test-notification      Test notification in repository
    version                Print qucli version and quit

list

List repository in namespace

With --is-public option, you can true or false

$ qucli list koudaiii
NAME				isPublic	DESCRIPTION
quay.io/koudaiii/apig-sample	true
quay.io/koudaiii/qucli	true
quay.io/koudaiii/kubeps		true
quay.io/koudaiii/test		true

get

Get repository and Permissions in Quay

$ qucli get koudaiii/test
Repository:
	quay.io/koudaiii/test
Visibility:
	private
Permissions:
	koudaiii(admin)
Notifications:
	b0736be9-f0eb-4c3c-8d33-2e331b1e5b0f	Some title	repo_push	map[]	slack	map[url:https://hooks.slack.com/service/some/token/here]

create

Create repository in Quay

With --visibility option, you can public or private

$ qucli create koudaiii/test --visibility private
Created! quay.io/koudaiii/test

delete

Delete repository in Quay

$ qucli delete koudaiii/test
Deleted! quay.io/koudaiii/test
$ qucli get koudaiii/test
err: HTTP error!
URL: https://quay.io/api/v1/repository/koudaiii/test
status code: 404
body:
{"status": 404, "error_message": "Not Found", "title": "not_found", "error_type": "not_found", "detail": "Not Found", "type": "https://quay.io/api/v1/error/not_found"}

add-user

Add user in repository

With --role option, you can read or write or admin

$ qucli add-user koudaiii/test dtan4 --role write
Added! dtan4(write) in quay.io/koudaiii/test
$ qucli get koudaiii/test
Repository:
	quay.io/koudaiii/test
Visibility:
	private
Permissions:
	koudaiii(admin)
	dtan4(write)

add-team

Add team in repository

With --role option, you can read or write or admin

$ qucli add-team koudaiii/test infrastructure --role write
Added! infrastructure(write) in quay.io/koudaiii/test
$ qucli get koudaiii/test
Repository:
	quay.io/koudaiii/test
Visibility:
	private
Permissions:
	koudaiii(admin)
	dtan4(write)
	infrastructure(write)

delete-user

Delete user from repository

$ qucli delete-user koudaiii/test dtan4
Deleted! dtan4 in quay.io/koudaiii/test
$ qucli get koudaiii/test
Repository:
	quay.io/koudaiii/test
Visibility:
	private
Permissions:
	koudaiii(admin)
	infrastructure(write)

delete-team

Delete team from repository

$ qucli delete-team koudaiii/test infrastructure
Deleted! infrastructure in quay.io/koudaiii/test
$ qucli get koudaiii/test
Repository:
	quay.io/koudaiii/test
Visibility:
	private
Permissions:
	koudaiii(admin)

add-notification

Add notification in repository with some options.

  • webhook method
$ qucli add-notification koudaiii/test --event="repo_push" --method="webhook" --url="http://url/goes/here"
Added! 	3c3c142c-2161-42ae-9414-39c787386b5c		repo_push	map[]	webhook	map[url:http://url/goes/here]	in quay.io/koudaiii/test
  • slack method
$ qucli add-notification koudaiii/test --event="repo_push" --method="slack" --url="https://hooks.slack.com/service/{some}/{token}/{here}"
Added! 	61ae254f-89f0-4a36-a439-9b78004f2ab0		repo_push	map[]	slack	map[url:https://hooks.slack.com/service/{some}/{token}/{here}]	in quay.io/koudaiii/test
  • options
$ qucli add-notification
qucli supported only Quay.io
Usage: add-notification
  qucli add-notification koudaiii/qucli --event="repo_push" --method="webhook" --url="http://url/goes/here"

Option:
  --event string        set 'evnet'.  ['repo_push', 'build_queued', 'build_start', 'build_success', 'build_failure', 'build_cancelled', 'vulnerability_found'].
  --level string        if you use 'vulnerability_found' evnet, A vulnerability must have a severity of the chosen level (highest level is 0).[0-6]
  --ref string          if you use event excluding 'repo_push' event, an optional regular expression for matching the git branch or tag git ref. If left blank, the notification will fire for all builds.(refs/heads/somebranch)|(refs/tags/sometag)
  --method string       set 'method'.  ['webhook', 'slack', 'email'].
  --email string        if you use 'email' method, set E-mail address. '[email protected]'.
  --url string          if you use 'webhook' or 'slack' method, set url. 'http://url/goes/here' or 'https://hooks.slack.com/service/{some}/{token}/{here}'.
  --title string        The title for a notification is an optional field for a human-readable title for the notification.

test-notification

Test notification from repository.

$ qucli test-notification koudaiii/qucli 0c91e746-9d9e-4845-8dff-3c0995976dfa
Test Notification! 0c91e746-9d9e-4845-8dff-3c0995976dfa notification in quay.io/koudaiii/qucli

delete-notification

Delete notification from repository.

$ ./bin/qucli delete-notification koudaiii/test 3c3c142c-2161-42ae-9414-39c787386b5c
Deleted! 3c3c142c-2161-42ae-9414-39c787386b5c notification in quay.io/koudaiii/test

Options

Option Description Required Default
--visibility=VISIBILITY "visibility set to 'public' or 'private' public
--role=ROLE role to use for the user or team ROLE='read' or 'write' or 'admin' read
--is-public=bool repository type is public. true or false true
--hostname=HOSTNAME if Quay Enterprise user, set hostname. quay.io
--event=EVENT set 'evnet'. EVENT='repo_push' or 'build_queued' or 'build_start' or 'build_success' or 'build_failure' or 'build_cancelled' or 'vulnerability_found'. true
--level=LEVEL if you use 'vulnerability_found' evnet, A vulnerability must have a severity of the chosen level (highest level is 0).LEVEL=0-6
--ref=REF if you use event excluding 'repo_push' event, an optional regular expression for matching the git branch or tag git ref. If left blank, the notification will fire for all builds.(refs/heads/somebranch) or (refs/tags/sometag)
--method=METHOD set 'method'. METHOD='webhook' or 'slack' or 'email'. true
--email=EMAIL if you use 'email' method, set E-mail address. EMAIL='[email protected]'.
--url=URL if you use 'webhook' or 'slack' method, set url. 'http://url/goes/here' or 'https://hooks.slack.com/service/{some}/{token}/{here}'.
--title=TITLE The title for a notification is an optional field for a human-readable title for the notification.
--help Print command line usage
-v, --version Print version

Development

Clone this repository and build using make.

$ go get -d github.com/koudaiii/qucli
$ cd $GOPATH/src/github.com/koudaiii/qucli
$ make

Contribution

  1. Fork (https://github.com/koudaiii/qucli/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Author

koudaiii

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].