Skip to content

Commit

Permalink
Move docker registries to it's own namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mikicz committed Nov 23, 2019
1 parent 9658a10 commit 702aab1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
env:
global:
- DOCKER_HUB_USERNAME=mikicz
- secure: g80a90m7rMFm1+sYNRcu34TJ+eqD5hOeiWNTGQg5mNa46mC/XtAyAIR1JTmRR0cTiW1agcTdZ9GiFrNhxskf2kHd8T9UrKGXUGpg47SLMjQgqE4XS0QFtqftFESmEQk5FEQzPKqbm+tF7D05Bt8FcgqGfqPQwOqliooUdxkbJ0FAvd8MlbmmyCG9E3zq7pAURoAFKOJ854x5zYLF3JptOPACz4hEh3nQNFEF8xFwQFRVxdg6/zKD9ubxuqc3EDCmv/yjcWXfQExBct1+kUpFhzWa1QzYZE3vr+MGBcBEo+jw34bHDT7cQTywfsjQXDeZa0nt3/ieR1oAbNdscZp8PWRGvKjWRVWU62x6VpmETQUWIoU7S0Rlqosy9Y+oqR3yl69ByjOuvZAGeso2CKj+SR+TFvGM+YItMXQhmA9KXhvuxnddxwOvZlqZ5cLF8tTeDEvI9uIDoeEG0lFmmcvt5o3MQ7jLAXfQMP0I740TXY7CCqa1oh3Bv7bvs9UcjNXTm4RrxVsZcCHOhlD4RoUWcZ7R7fQ048yrbaT3XvuY9NPBdFJyTIkYEMNqvdpXNhzTFOgaXr6GyQsZn8GGlkqqq2Ldp0NgLTR+0FTa1v8Y7Ef6YBWMCqC5WJkoEekdI6dyOOIJUlKMd3IDyu6mfaUnF1HG/kqUNGV+PLV47l/oo1c=
- DOCKER_HUB_USERNAME=arcaoss
- secure: "exAH0tbfFX/MZLx5TO/rEPoVDLHyv1+twdtLu+imIDguH6GcVeyOe9jTZf766dEF+lql0J/jXVodMG7wYg5cvUQx8SRSCaS380xSD5lXbMmnvoou37U1/cPPuL41SOBQayEm1iKZ5uMmBpGY1vIT0xaI6dzUeLaxzAmt4bi9RB6pRSmXfM9qtopJLjp/4Vp81tqbXTXOqnc/l+ZiJjabl205PDxJG+3vzCWI2/2S6B+Q8n6ka+RyHZCrpkWZbzAgyfkO5swkum06q+c7a/EyTcV9k1z3HQGAe2gYSkFb3KMBV7x+vP7IFX4R8b15VtdxmJZcFyPvKponMyo1KoNNxsR/nQmDNTro6n9SZ72F3Bs3I4x3asQwi7a8qj7sty4fymFbifoU6pP1xUO9nj0uxSSmHd7/Wmxpf0NAlLjkPhW5TTzqMUrExDvJXe13zd+jxO89cYYd1/Kbj5aiwH8UHqQM7ATicqEkAl5QSGzNKI4sWjv8CdhwE4YVy8VWTpF2ijHUPWqAHTuzkuOoU01+BQAD0koIzWiw1OCRO1AFD570J+oApOQxxql5WsvQRhltpbgYEfocButmOiNl896BqZv4DALNa4saidRfFco/2xWJhpMKNu1aD19et6llNzRgMDLIZgkJMIymLwGt20zLoxRAppMaVJBhk9IjsF4Kd68="
language: python
dist: xenial
python:
Expand Down
2 changes: 1 addition & 1 deletion arca/backend/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def get_image_tag(self,
return prefix

def get_arca_base_name(self):
return "docker.io/mikicz/arca"
return "docker.io/arcaoss/arca"

def get_python_base_tag(self, python_version):
return f"{arca.__version__}_{python_version}"
Expand Down
2 changes: 1 addition & 1 deletion docs/backends.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ This backend runs tasks in docker containers. To use this backend the user runni
with ``docker`` (see `documentation <https://docs.docker.com/install/linux/linux-postinstall/>`_).

This backend first creates an image with requirements and dependencies installed so the installation only runs once.
By default the images are based on `custom images <https://hub.docker.com/r/mikicz/arca/tags/>`_, which have Python
By default the images are based on `custom images <https://hub.docker.com/r/arcaoss/arca/tags/>`_, which have Python
and several build tools pre-installed.
These images are based on ``debian`` (slim ``stretch`` version) and use `pyenv <https://github.com/pyenv/pyenv>`_
to install Python.
Expand Down
11 changes: 7 additions & 4 deletions tests/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
RETURN_PYTHON_VERSION_FUNCTION, RETURN_ALSAAUDIO_INSTALLED)


TEST_REGISTRY = "docker.io/arcaoss/arca-test"


def test_keep_container_running(temp_repo_func):
backend = DockerBackend(verbosity=2, keep_container_running=True)

Expand Down Expand Up @@ -136,7 +139,7 @@ def test_inherit_image(temp_repo_func):


def test_push_to_registry(temp_repo_func, mocker):
backend = DockerBackend(verbosity=2, use_registry_name="docker.io/mikicz/arca-test")
backend = DockerBackend(verbosity=2, use_registry_name=TEST_REGISTRY)
arca = Arca(backend=backend, base_dir=BASE_DIR)

temp_repo_func.file_path.write_text(RETURN_COLORAMA_VERSION_FUNCTION)
Expand Down Expand Up @@ -167,12 +170,12 @@ def test_push_to_registry(temp_repo_func, mocker):
mocker.patch.object(backend, "try_pull_image_from_registry", lambda *args: None)

# untag the image so Arca thinks the images was just built and that it needs to be pushed
for image in backend.client.images.list("docker.io/mikicz/arca-test"):
for image in backend.client.images.list(TEST_REGISTRY):
for tag in image.tags:
if tag.startswith("docker.io/mikicz/arca-test"):
if tag.startswith(TEST_REGISTRY):
backend.client.images.remove(tag)

backend = DockerBackend(verbosity=2, use_registry_name="docker.io/mikicz/arca-test",
backend = DockerBackend(verbosity=2, use_registry_name=TEST_REGISTRY,
registry_pull_only=True)
arca = Arca(backend=backend, base_dir=BASE_DIR)

Expand Down
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def run(self):
backend.check_docker_access()

response = requests.get(
"https://hub.docker.com/v2/repositories/mikicz/arca/tags/",
"https://hub.docker.com/v2/repositories/arcaoss/arca/tags/",
params={"page_size": 1000}
)
response = response.json()
Expand Down

0 comments on commit 702aab1

Please sign in to comment.