{"id":19855398,"url":"https://github.com/gtesei/patterns_for_continuous_integration_docker_travis_ci_2_dev","last_synced_at":"2025-05-02T01:31:00.023Z","repository":{"id":57456903,"uuid":"152479837","full_name":"gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV","owner":"gtesei","description":"Patterns of Continuous Integration for Data Science Python Projects","archived":false,"fork":false,"pushed_at":"2018-10-23T17:47:12.000Z","size":1186,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T20:55:58.956Z","etag":null,"topics":["continuous-integration","coveralls","docker","pypi","pytest","python","travis-ci"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gtesei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-10T19:40:21.000Z","updated_at":"2019-09-20T12:26:46.000Z","dependencies_parsed_at":"2022-09-15T13:02:00.640Z","dependency_job_id":null,"html_url":"https://github.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2FPatterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2FPatterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2FPatterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2FPatterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gtesei","download_url":"https://codeload.github.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251969341,"owners_count":21673188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["continuous-integration","coveralls","docker","pypi","pytest","python","travis-ci"],"created_at":"2024-11-12T14:12:36.622Z","updated_at":"2025-05-02T01:30:56.728Z","avatar_url":"https://github.com/gtesei.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Patterns for Continuous Integration with Docker using Travis CI 2 - Dev. Repo\n\n__Full story:__ [Patterns of Continuous Integration for Data Science Python Projects](https://medium.com/@gtesei/the-ci-arsenal-that-any-open-source-machine-learning-python-project-should-consider-e34759dd66c4)\n\n[![Build Status](https://api.travis-ci.org/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV.svg?branch=master)](https://travis-ci.org/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV)\n[![PyPI version](https://badge.fury.io/py/python-dev-docker-project.svg)](https://badge.fury.io/py/python-dev-docker-project)\n[![Coverage Status](https://coveralls.io/repos/github/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV/badge.svg?branch=master)](https://coveralls.io/github/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/patterns-for-continuous-integration-docker-travis-ci-2-dev/badge/?version=latest)](https://patterns-for-continuous-integration-docker-travis-ci-2-dev.readthedocs.io/en/latest/?badge=latest)\n\n![Conceptual Schema](https://raw.githubusercontent.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV/master/img/end-to-end-flow.png)\n\n__The “Docker repo” pattern__: _create two separate Git repositories: one for Docker release and another for software development. This keeps the Docker-specific code isolated from the actual software. Developers can continue working on the source software as usual, while the production Docker image is developed separately_\n\nThis repository is an example of the __Git repository for software development__. For an example of Git repository for Docker release, see [Patterns for Continuous Integration with Docker using Travis CI 2 - Prod. Repo](https://github.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_PROD). \n\nTeam uses different branches for development and, a certain point, pull-requests for merge the master branch are done. For each one of them, committing the master branch:\n- modifying the version number in _setup.py_, a new release will be created on the package repository (e.g. [PyPI](https://pypi.org/)), \n- modifying [MkDocs](https://www.mkdocs.org/) ```mkdocs.yml``` and Markdown files under ```doc/``` a new documentation is build by [Read The Docs](https://readthedocs.org/) and [published on-line](https://patterns-for-continuous-integration-docker-travis-ci-2-dev.readthedocs.io/en/latest/?badge=latest) for consultation,  \n- Travis CI builds, tests and packages the software by using __py.test__ and __measuring code coverage of Python code__.\n- if such tests are successful: \n    - code coverage stats are published on [coveralls.io](https://coveralls.io/) through [coveralls](https://pypi.org/project/coveralls/),\n    - Travis CI does a release of the software by uploading the package to the package repository (e.g. [PyPI](https://pypi.org/)),\n    - Travis CI does two new docker development images, e.g. _e59cbe8-develop_ (image for last commit on master branch) and _develop_ (the official develop image of the project), on the Docker Registry, e.g. [Docker Hub](https://hub.docker.com).\n\n## Dockerfile \n \n```docker\nFROM python:3.6\n\nCOPY . /myproject\nWORKDIR /myproject\nRUN pip install -e .\n\nCMD [\"myproject\", \"run\"]\n```\n\n## mkdocs.yml \n\n```yml\nsite_name: Patterns for Continuous Integration with Docker using Travis CI 2 - Dev. Repo\ntheme: readthedocs\n#docs_dir: sources\nrepo_url: https://github.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV\nsite_description: 'Patterns for Continuous Integration with Docker using Travis CI'\n\nnav:\n- Home: index.md\n- The_Repo_Pattern: \n  - Git_repository_for_software_development: git_dev.md\n  - Git repository_for_Docker_release: git_docker.md\n```\n\n## Read The Docs \n\n![Read The Docs](https://raw.githubusercontent.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV/master/img/onl_docs.PNG)\n\n\n## .travis.yml  \n\n```yml\nsudo: required \nservices:\n- docker\nenv:\n  global:\n    - IMAGE_NAME=gtesei/hello_docker_2\n    - REGISTRY_USER=gtesei\n    - secure: H8o2BrmikY0e9Gzj1t/Ca1H+hblEv9GC6Qd9MQoN/zxXx0MtiZw3eyCuBO4rpYvX80oeS/e9QM1b4v8OUCsRqGd1nwz4QhRQIRyzh03+n+Sp84qnTqAZvDNbPl0WYDSJyRYFij7SpVP37encJX8ioPaE+YarNn1AGUAVthFOvWhEEeuDGV0lDOXw0j+LsXr1hf821dqvlFLBXPE0dVB6LZD2QEde4BaCQaM+FgBRrcz/bkLMBByviUxdCevJsHSOnhc4rZCbBZ5k5oByJsXVMX/S+SFwP5N4ljkF9rjtIA8fMOlGjk8Z8kXSk3BeLctXGSrZBZBsXG2e89AfBeXFrK91tYdLJROXWdd6MN+U9r+FSIblHqB51zE2zFUpXK9pijUeJLNC2eacdNMRTvxA+tudEIuGkIKkgA4aGw8knoroWXI8ByLtVJA2mXQvlMqiN+pVQt36rwx1Tz0mlw2QOsI713f/JhSoJQNX7flRJrcs2FroCCmDrnpXiE+FN+svjLKz7b07lzw8H78PGfj11YPV8LGDHMRqf0/fu55157QaDgoDKekBLuwXYGT+q5pOu91r+9ywIUo5V8WXel7VM1iUqu3Kjq8DLpwiTErENwEEoq8x5uATXAHsnoXEpBFSj6RsU1BdambMkoz7bbOgviVwTDTGB4jgX7iYdlEYdzA=\nlanguage: python\npython:\n    - \"3.6\"\ncache: pip\nbefore_install:\n    - sudo apt-get update\ninstall: \n    - pip install -r requirements-dev.txt\n    - pip install pytest pytest-cov\n    - pip install coveralls\nscript: py.test --doctest-modules --cov \nafter_success:\n    - coveralls\ndeploy:\n  provider: pypi\n  user: gtesei\n  distributions: sdist bdist_wheel\n  password:\n    secure: As9TKWe41QcMXIZ0lKZ7uYblvMbOrWklUjbtZo16juLvDmQDd2dqseEv+eBuI6ur6mov8P0+8MuyOcnDcmeUT0FXTYnjw2BHQC8diH4YvNfupRv6dJDspy3UfI8koQzTJqRfoz30UoCWKS4uU9RYP3uRU6VDIabmECAtKdi3eROeeb88W9LlWMXeuQPiNZlyWFQnHrekRWfzvuZtsxkj5eRtkfUsXTnChbBru0yulv9xIJPcigvvBE/I2DF6c1KFQbtXQ2h4a1FYJ9/NbbHthtvWWSvotJK0825mhiIiCjQwy+GmsiMf5ofnVs7Fe3E0bJLdX8npPBy1BGZnVN4vd+j74Vl/Dtziy5uqFe9bPgYZk3jOBcfnDWrpAdh1Qmt1D4ZBqD0afShSyyMi0N2+B+R58bMuWj3dzgc4zZp0NjCS/S8Qt6c9Q/bYF58hA9rGKGydoKcfmdC80SUPgbYa3UKnEJo+oxtuhZlNB7A+KqccQmfPHgq/Ra4BR3ImUokhW68GVqCB1378ynNAML4vdhTHWBVRnsG+gvk1slrRsH1yOqBQo5IWMkWO8SD2OGp56u7P96m9Oh1yXhPxfCFp/9K/5IWSJ3DsA+TjieUPJW7jbMamw/CQvIOpv+VEfkorh9Oxijf22qt88/dN5OZ6Az2IAxQwBZI7D9BISnibj/w=\n  on:\n    branch: master\nafter_deploy: \n  - docker pull \"${IMAGE_NAME}:develop\" || true\n  - docker build --pull --cache-from \"${IMAGE_NAME}:develop\" --tag \"$IMAGE_NAME\" .\n  - docker login -u \"$REGISTRY_USER\" -p \"$REGISTRY_PASS\"\n  - git_sha=\"$(git rev-parse --short HEAD)\"\n  - docker tag \"$IMAGE_NAME\" \"${IMAGE_NAME}:develop\"\n  - docker tag \"$IMAGE_NAME\" \"${IMAGE_NAME}:${git_sha}-develop\"\n  - docker push \"${IMAGE_NAME}:develop\" \u0026\u0026 docker push \"${IMAGE_NAME}:${git_sha}-develop\"\n```\n\n## Travis CI \n\n![Travis CI](https://raw.githubusercontent.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV/master/img/travis.PNG)\n\n## Coveralls \n\n![Coveralls](https://raw.githubusercontent.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV/master/img/Coveralls.PNG)\n\n## Package repository [PyPI]\n\n![PyPI](https://raw.githubusercontent.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV/master/img/PyPI.PNG)\n\n## Docker Registry [Docker Hub]\n\n![Docker Hub](https://raw.githubusercontent.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_2_DEV/master/img/Docker_Hub.PNG)\n\n## Useful links   \n\n[Ruby Installer for Windows](https://rubyinstaller.org/downloads/)\n\n__To install Travis__ \n```ruby \ngem install travis\n```\n## Credits \n\n[Coding Tips: Patterns for Continuous Integration with Docker on Travis CI - Part 2 of 3: The “Docker repo” pattern](https://medium.com/mobileforgood/patterns-for-continuous-integration-with-docker-on-travis-ci-71857fff14c5)\n\n[Defining encrypted variables in .travis.yml](https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml)\n\n[Google Cloud | Continuous Delivery with Travis CI](https://cloud.google.com/solutions/continuous-delivery-with-travis-ci)\n\n[Continuous Integration. CircleCI vs Travis CI vs Jenkins](https://hackernoon.com/continuous-integration-circleci-vs-travis-ci-vs-jenkins-41a1c2bd95f5)\n\n[Continuous Integration with Jenkins and Docker](https://code-maze.com/ci-jenkins-docker/) \n\n+-\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgtesei%2Fpatterns_for_continuous_integration_docker_travis_ci_2_dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgtesei%2Fpatterns_for_continuous_integration_docker_travis_ci_2_dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgtesei%2Fpatterns_for_continuous_integration_docker_travis_ci_2_dev/lists"}