{ "info": { "author": "Praekelt.org SRE team", "author_email": "sre@praekelt.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "docker-ci-deploy\n================\n\n`|PyPI| `_ `|Build\nStatus| `_\n`|codecov| `_\n\n NOTE: The ``-l``/``--login`` parameter (and associated\n ``-d``/``--debug`` parameter) has been removed in version 0.3.0. Use\n a manual ``docker login`` command in the ``before_deploy`` section\n of your Travis file (or equivalent) to log in.\n\nA command-line tool to help generate tags and push Docker images to a\nregistry. Simplifies deployment of Docker images from CI services such\nas Travis CI.\n\nIn a single command, ``docker-ci-deploy`` can: \\* Change the tags on\nimages \\* Add version information to image tags \\* Add registry\naddresses to image tags \\* Push tags to a registry\n\nThe best way to try out ``docker-ci-deploy`` is to give it a spin with\nthe ``--dry-run`` flag and observe all the ``docker`` commands that it\n*would* invoke: \\`\\`\\` > $ docker-ci-deploy --version 2.7.13\n--version-semver --version-latest\n --registry registry:5000 --dry-run\n praekeltorg/alpine-python\n praekeltorg/alpine-python:onbuild\n\ndocker tag praekeltorg/alpine-python\nregistry:5000/praekeltorg/alpine-python:2.7.13 docker tag\npraekeltorg/alpine-python registry:5000/praekeltorg/alpine-python:2.7\ndocker tag praekeltorg/alpine-python\nregistry:5000/praekeltorg/alpine-python:2 docker tag\npraekeltorg/alpine-python registry:5000/praekeltorg/alpine-python:latest\ndocker tag praekeltorg/alpine-python:onbuild\nregistry:5000/praekeltorg/alpine-python:2.7.13-onbuild docker tag\npraekeltorg/alpine-python:onbuild\nregistry:5000/praekeltorg/alpine-python:2.7-onbuild docker tag\npraekeltorg/alpine-python:onbuild\nregistry:5000/praekeltorg/alpine-python:2-onbuild docker tag\npraekeltorg/alpine-python:onbuild\nregistry:5000/praekeltorg/alpine-python:onbuild docker push\nregistry:5000/praekeltorg/alpine-python:2.7.13 docker push\nregistry:5000/praekeltorg/alpine-python:2.7 docker push\nregistry:5000/praekeltorg/alpine-python:2 docker push\nregistry:5000/praekeltorg/alpine-python:latest docker push\nregistry:5000/praekeltorg/alpine-python:2.7.13-onbuild docker push\nregistry:5000/praekeltorg/alpine-python:2.7-onbuild docker push\nregistry:5000/praekeltorg/alpine-python:2-onbuild docker push\nregistry:5000/praekeltorg/alpine-python:onbuild \\`\\`\\`\n\nIf you want to make your commands even shorter, the ``docker-ci-deploy``\ncommand is also available as just ``dcd``, and most options have a short\nform: \\`\\`\\` > $ dcd -V 3.6.0 -S -L -r registry:5000 --dry-run\nalpine-python\n\ndocker tag alpine-python registry:5000/alpine-python:3.6.0 docker tag\nalpine-python registry:5000/alpine-python:3.6 docker tag alpine-python\nregistry:5000/alpine-python:3 docker tag alpine-python\nregistry:5000/alpine-python:latest docker push\nregistry:5000/alpine-python:3.6.0 docker push\nregistry:5000/alpine-python:3.6 docker push\nregistry:5000/alpine-python:3 docker push\nregistry:5000/alpine-python:latest \\`\\`\\`\n\nUse the ``-h``/``--help`` option to see all available options.\n\nInstallation\n------------\n\n::\n\n pip install docker-ci-deploy==0.2.0\n\nThe script is self-contained and has no dependencies. It can be run by\nsimply executing the `main file `_.\n\nUsage\n-----\n\nThe script can tag an existing image and push the new tags to a\nregistry.\n\nThere is one required argument: the image to push.\n\nPushing an image\n^^^^^^^^^^^^^^^^\n\n::\n\n docker-ci-deploy my-image:latest\n\nThis will simply push the image ``my-image:latest`` to the default\nregistry (https://hub.docker.com).\n\nTagging\n^^^^^^^\n\n\\`\\`\\` docker-ci-deploy --tag alpine --tag $(git rev-parse --short HEAD)\nmy-image:latest\n\n\\`\\```This will result in the tags``my-image:alpine``and``my-image:eea981f``(for example) being created and pushed (**Note:** the original tag``my-image:latest\\`\nis *not* pushed).\n\nVersion tags\n^^^^^^^^^^^^\n\n``docker-ci-deploy --tag alpine --version 1.2.3 my-image`` This will\nresult in the tag ``my-image:1.2.3-alpine`` being created and pushed. If\na version is already present in the start of a tag, it will not be\nadded. For example, in the above example if ``--tag 1.2.3-alpine`` were\nprovided, the image would still be tagged with ``1.2.3-alpine``, not\n``1.2.3-1.2.3-alpine``.\n\nYou can also push the tags without the version information so that they\nare considered the \"latest\" tag:\n``docker-ci-deploy --version 1.2.3 --version-latest my-image`` This will\nresult in the tags ``my-image:1.2.3`` and ``my-image:latest`` being\npushed.\n\n NOTE: The ``--version`` and ``--version-latest`` options used to be\n known as ``--tag-version`` and ``--tag-latest``, respectively. These\n old option names will continue working for the current release but\n will be removed soon.\n\nSemantic version tags\n^^^^^^^^^^^^^^^^^^^^^\n\n``docker-ci-deploy --tag alpine --version 1.2.3 --version-semver my-image``\nThis will result in the tags ``my-image:1.2.3-alpine``,\n``my-image:1.2-alpine``, and ``my-image:1-alpine`` being created and\npushed. If part of the version is already present in the start of a tag,\nit will not be added. For example, in the above example if\n``--tag 1.2-alpine`` were provided, the image would still be tagged with\n``1.2.3-alpine``, not ``1.2.3-1.2-alpine``.\n\nThis works by stripping pieces from the front of the version string\nusing the regex ``[.-]?\\w+$``. This means that version strings with some\ntext in them are also supported. For example, a tag such as\n``8.7.1-jessie`` will produce the tags/tag prefixes ``8.7.1-jessie``,\n``8.7.1``, ``8.7``, and ``8``.\n\nAn optional \"precision\" value can be set using the\n``--semver-precision`` option. This sets the minimum precision of the\ngenerated versions. For example, by passing\n``--version 1.2.3 --version-semver --semver-precision 2``, the versions\n``1.2.3`` and ``1.2`` are generated but *not* ``1``.\n\nNote that this will **not** tag a version ``0`` unless the\n``--semver-zero`` option is also used.\n\nThis can be used in combination with ``--version-latest``.\n\n NOTE: The ``--version-semver`` option used to be known as\n ``--tag-version``. This old option name will continue working for\n the current release but will be removed soon.\n\nCustom registry\n^^^^^^^^^^^^^^^\n\n``docker-ci-deploy \\ --tag alpine --tag $(git rev-parse --short HEAD) \\ --registry my-registry.example.com:5000 \\ my-image:latest``\nThis will result in the tags\n``my-registry.example.com:5000/my-image:alpine`` and\n``my-registry.example.com:5000/my-image:eea981f`` being created and\npushed.\n\n**NOTE:** The reference grammar for Docker image tags (as of Docker\n1.13.0) is not strict enough to distinguish between a registry address\nand an image name component in all cases. For example, the tag\n``praekeltorg/alpine-python`` could refer to the image with name\n``alpine-python`` stored in the registry with hostname ``praekeltorg``\n*or* it could be an image called ``praekeltorg/alpine-python`` stored in\nthe default registry. ``docker-ci-deploy`` will first just prepend the\nregistry address to the tag and only attempt to remove an existing\nregistry address from the tag if the new tag is invalid.\n\nMultiple images\n^^^^^^^^^^^^^^^\n\nYou can provide multiple images to ``docker-ci-deploy`` and it will tag\nand push all of them:\n``docker-ci-deploy --tag $(git rev-parse --short HEAD) my-image my-other-image``\nThis will result in the tags ``my-image:eea981f`` and\n``my-other-image:eea981f`` being created and pushed.\n\nDebugging\n^^^^^^^^^\n\nUse the ``--dry-run`` and ``--verbose`` parameters to see what the\nscript will do before you use it. For more help try\n``docker-ci-deploy --help``.\n\nTravis CI\n---------\n\nThe script could be used in any CI service that provides access to the\nstandard Docker CLI but was developed with Travis in mind.\n\nFor Travis CI this config should get you started pushing images to\nDocker Hub: \\`\\`\\`yaml sudo: required services: - docker language:\npython env: global: - DOCKER\\_USER=janedoe - secret: #\nDOCKER\\_PASS=pa$$word\n\nbefore\\_install: - sudo apt-get update - sudo apt-get install -o\nDpkg::Options::=\"--force-confold\" -y docker-engine - pip install\ndocker-ci-deploy\n\nscript: - docker build -t janedoe/my-image .\n\nbefore\\_deploy: - docker login -u \":math:`DOCKER_USER\" -p \"`\\ DOCKER\\_PASS\"\ndeploy: provider: script script: docker-ci-deploy --tag $(git rev-parse\n--short HEAD) --tag latest janedoe/my-image \\`\\`\\`\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/docker-ci-deploy.svg\n.. |Build\nStatus| image:: https://travis-ci.org/praekeltfoundation/docker-ci-deploy.svg?branch=develop\n.. |codecov| image:: https://codecov.io/gh/praekeltfoundation/docker-ci-deploy/branch/develop/graph/badge.svg", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/praekeltfoundation/docker-ci-deploy", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "docker-ci-deploy", "package_url": "https://pypi.org/project/docker-ci-deploy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/docker-ci-deploy/", "project_urls": { "Homepage": "https://github.com/praekeltfoundation/docker-ci-deploy" }, "release_url": "https://pypi.org/project/docker-ci-deploy/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Python script to help push Docker images to a registry using CI services", "version": "0.3.0" }, "last_serial": 2851521, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "e70fb0520828fd9461c27826cf0e57a8", "sha256": "11b6230248d27eb2881827eb841c2089e8a901cbb5bdd905f2b92fd7108d7b32" }, "downloads": -1, "filename": "docker_ci_deploy-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e70fb0520828fd9461c27826cf0e57a8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4873, "upload_time": "2016-05-19T14:11:36", "url": "https://files.pythonhosted.org/packages/bd/97/cb1e357b0941f8ce5db21e4c2b36a8f08680caf8de168685b9e00d591636/docker_ci_deploy-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9c14b6093e6ec110cee5eb7cfb4b6b18", "sha256": "a8e4b0df90043f96bd69855abeea8052ad94d0b897c98417b7c6964ad9e35777" }, "downloads": -1, "filename": "docker-ci-deploy-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9c14b6093e6ec110cee5eb7cfb4b6b18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3140, "upload_time": "2016-05-19T14:11:54", "url": "https://files.pythonhosted.org/packages/ab/48/70e211fc8d531be2bbf1946007c6e10fb9feeec84febcc8a6a9be463acbc/docker-ci-deploy-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f61577fd3570162c8ba922db181e6baf", "sha256": "1759ac72ad6c1ff367418fed2f96bbb8fd3a54d80742637affe8bf54ee679181" }, "downloads": -1, "filename": "docker_ci_deploy-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f61577fd3570162c8ba922db181e6baf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7027, "upload_time": "2016-05-20T11:07:37", "url": "https://files.pythonhosted.org/packages/c1/f0/521710e2c4004d1d6b501a0e269ba758f25dd325a2deaa9eb69c81d257ef/docker_ci_deploy-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "863297d6a5184a7ebdf56b61e3b9f26e", "sha256": "d526d5bc803e3f491aff501c34bf1c3e70c5a82cb8b3d4cb04c6ed92df304f66" }, "downloads": -1, "filename": "docker-ci-deploy-0.1.2.tar.gz", "has_sig": false, "md5_digest": "863297d6a5184a7ebdf56b61e3b9f26e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5266, "upload_time": "2016-05-20T11:07:46", "url": "https://files.pythonhosted.org/packages/04/61/894e7a5f7148692fbcb82e3c136e23a9bad6382ac815d0737e266f6ad69a/docker-ci-deploy-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "4f7c87eb3e2fb2c5bf9e15cde13325cf", "sha256": "f32cc3af00adfa35dc0b7b3e8cdc837a14087ee0718a00b7a67632d6125c52ba" }, "downloads": -1, "filename": "docker_ci_deploy-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4f7c87eb3e2fb2c5bf9e15cde13325cf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7364, "upload_time": "2016-05-20T15:11:27", "url": "https://files.pythonhosted.org/packages/30/69/5db19cf7b3814894863d58cfc99b2ab30e9026b36a34bb75a767fa6c9dc0/docker_ci_deploy-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d96a2c2c7bcc18667fea2e1e6e11ca21", "sha256": "bafa74b03e853edbcdcd48e96b34a1ad13be5cda09aa98ab4e5141609f1ee734" }, "downloads": -1, "filename": "docker-ci-deploy-0.1.3.tar.gz", "has_sig": false, "md5_digest": "d96a2c2c7bcc18667fea2e1e6e11ca21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5587, "upload_time": "2016-05-20T15:11:43", "url": "https://files.pythonhosted.org/packages/6e/1f/4926f9be4b20a9663a94b2237cda6a7d1a81f21c7bd1a1437ec29bd1fd04/docker-ci-deploy-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2ca3144847a445337e8878b26c6dd906", "sha256": "045220b2b0c2a0c1065ea4cc56e8134c347a1793d5c2ddf7efd346dca018b114" }, "downloads": -1, "filename": "docker-ci-deploy-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2ca3144847a445337e8878b26c6dd906", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11368, "upload_time": "2017-02-14T13:21:41", "url": "https://files.pythonhosted.org/packages/76/03/4ea8e8b14f262e2594c880e57dfd3fa6a82d4d39219b9d40a76e003c91df/docker-ci-deploy-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "a3fc27df3a5bf996e74ceb9b1ed38333", "sha256": "b64801f5aab39057e3582eef6935689d2bc232620b22efbd6a9b99f92956688d" }, "downloads": -1, "filename": "docker_ci_deploy-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a3fc27df3a5bf996e74ceb9b1ed38333", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13283, "upload_time": "2017-05-04T14:48:58", "url": "https://files.pythonhosted.org/packages/f0/a2/e36cbb2cbfb4dd2eb6fb662ca699db383267d1f14762c39993e011ff2674/docker_ci_deploy-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2fbc8f94422fa403801f17b620fab61", "sha256": "6ed2f8ac276d82f0b8f4b2ffc0b4c5d66bd1cdbd6c6a40422fa3965a6e1267f2" }, "downloads": -1, "filename": "docker-ci-deploy-0.3.0.tar.gz", "has_sig": false, "md5_digest": "e2fbc8f94422fa403801f17b620fab61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11709, "upload_time": "2017-05-04T14:49:00", "url": "https://files.pythonhosted.org/packages/fd/f4/a8e96c9c7c9080529f8d4d003d942f65a561254c7c4d34dd99c68de93ec1/docker-ci-deploy-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a3fc27df3a5bf996e74ceb9b1ed38333", "sha256": "b64801f5aab39057e3582eef6935689d2bc232620b22efbd6a9b99f92956688d" }, "downloads": -1, "filename": "docker_ci_deploy-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a3fc27df3a5bf996e74ceb9b1ed38333", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13283, "upload_time": "2017-05-04T14:48:58", "url": "https://files.pythonhosted.org/packages/f0/a2/e36cbb2cbfb4dd2eb6fb662ca699db383267d1f14762c39993e011ff2674/docker_ci_deploy-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2fbc8f94422fa403801f17b620fab61", "sha256": "6ed2f8ac276d82f0b8f4b2ffc0b4c5d66bd1cdbd6c6a40422fa3965a6e1267f2" }, "downloads": -1, "filename": "docker-ci-deploy-0.3.0.tar.gz", "has_sig": false, "md5_digest": "e2fbc8f94422fa403801f17b620fab61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11709, "upload_time": "2017-05-04T14:49:00", "url": "https://files.pythonhosted.org/packages/fd/f4/a8e96c9c7c9080529f8d4d003d942f65a561254c7c4d34dd99c68de93ec1/docker-ci-deploy-0.3.0.tar.gz" } ] }