Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
omesser committed Jan 29, 2021
0 parents commit a350015
Show file tree
Hide file tree
Showing 34 changed files with 1,621 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[flake8]

# no lines over 120 allowed
max-line-length = 120

# exclude these dirs
exclude = .git,venv

# ignore the following rules
ignore =

# whitespace before ':'
E203

# line break before binary operator
W503

# F401 unused imports (TODO: unignore and use flake8-putty to allow this for 'models' when it supports flake8 v3)
F401

# bare except
E722
28 changes: 28 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches:
- development
- master
pull_request:
branches:
- development

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install dependencies
run: make install-ci

- name: Run lint
run: make lint
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# virtualenv
.venv
venv/
ENV/

# pycharm proj
.idea
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/dockerregistrypusher.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Adam Raźniewski

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
52 changes: 52 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
VENV_PYTHON = ./venv/bin/python

.PHONY: all
all: venv lint
@echo Done.

.PHONY: lint
lint: flake8 fmt-check

.PHONY: flake8
flake8:
@echo "Running flake8 lint..."
$(VENV_PYTHON) -m flake8 .

.PHONY: fmt
fmt:
@echo "Running black fmt..."
$(VENV_PYTHON) -m black --skip-string-normalization .

.PHONY: fmt-check
fmt-check:
@echo "Running black fmt check..."
$(VENV_PYTHON) -m black --skip-string-normalization --check --diff .

#.PHONY: test
#test: test-unit test-integ
# @echo Finished running Tests
#
#.PHONY: test-unit
#test-unit: venv
# $(VENV_PYTHON) -m nose tests/unit
#
#.PHONY: test-integ
#test-integ: venv
# $(VENV_PYTHON) -m nose tests/integration/cases/

.PHONY: install
install: venv
@echo Installed

.PHONY: install-ci
install-ci: install-venv install

.PHONY: venv
venv:
python ./install --dev
$(VENV_PYTHON) -m pip install -e ./tools/flake8_plugin

.PHONY: install-venv
install-venv:
python -m pip install --upgrade pip
python -m pip install virtualenv
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# What is this?
This package contains dockerregistrypusher CLI that allows to push image packed as tar (usually from docker save command) to a docker registry
This project was forked from [Adam Raźniewski's dockerregistrypusher](https://github.com/Razikus/dockerregistrypusher) but with changes and adjustments to iguazio's needs as a CLI<br>
All rights reserved to the original author [Adam](https://github.com/Razikus)

# Why?
To push tar-packed image archives (created by `docker save`) to registries without going through (and taxing) docker-daemon

Usage of CLI:

# installation

Install and create a symlink at `/usr/local/bin/dockerregistrypusher` (requires sudo)
```shell
./install
```

Or, install without symlink creation (no elevated permissions needed)
```shell
./install --no-link
```

# Running the CLI

CLI structure
```shell
dockerregistrypusher [options] {TAR_PATH} {REGISTRY_URL}
```

For further help (duh)
```shell
dockerregistrypusher --help
```


# Development
To be able to run linting / formatting and other `make` goodness, install with dev requirements
```shell
make install
```

# License
Free to use (MIT)
Loading

0 comments on commit a350015

Please sign in to comment.