Giter VIP home page Giter VIP logo

divio-cli's Introduction

Divio CLI - Command-line interface to the Divio Cloud

PyPI Version PyPI Downloads Wheel Support License

Installing

pip install divio-cli

โš ๏ธ For Windows users: Make sure you have added Python to PATH during installation, otherwise you must add it manually for the divio-cli commands to function properly.

Using the CLI

See Divio developer handbook: How to use the Divio command-line interface

Support for docker-compose 1 and 2

The CLI supports version 1 (docker-compose) and version 2 (docker compose) of the command invocation and is using the new version 2 by default.

You can opt-in to still use the old version 1 command by updating your CLI global settings in ~/.aldryn and add a new setting called docker-compose with the value ["docker-compose"]:

{"update_check_timestamp": 1234567890, "docker-compose": ["docker-compose"]}

Testing

The test suite is split into two categories: unit tests and integration tests. Unit tests run completely locally, so no previous setup is required. Integration tests run against the actual Divio infrastructure, so setup of a Divio project is required. In order to run the test suite, you have to have GNU Make and GNU Bash on your system. The integration tests also require Docker Compose.

Both test categories take optional arguments like TOX_ARGS and PYTEST_ARGS:

make test TOX_ARGS="-e python.11" PYTEST_ARGS="-s"

To clear all local state run:

make clean

Unit tests

These do not require external communication and can be run with the following command:

make test

Integration tests

These do require a more involved setup and will trigger actions on a real project. It is recommended to use a project on control.dev.aldryn.net because it requires no control panel running locally, and is what the CI pipeline does.

The CI uses ci-test-project-do-not-delete project. DO NOT USE THIS PROJECT FOR YOUR LOCAL TESTING! The project is reserved for CI testing. Create your own project and replicate the CI project configuration.

To run the integration test suite, run:

make test_integration

The first run will fail, but will create an empty .env file. Configure your test project there. You can take a look at the variables tab in the CI Settings as a starting point.

Linting

To run the linter, run the following command:

make lint

Creating a release

  1. Checkout a new branch for the new version - release-X.X.X
  2. Update the changelog.
  3. Merge the branch (after approval).
  4. Tag master with the release number X.X.X and git push origin <tagname>

The pipeline will then take care of the release.

divio-cli's People

Contributors

kinkerl avatar chive avatar derenio avatar evangeloskp avatar stefanfoulis avatar derlin avatar michjnich avatar garetjax avatar ojii avatar chescales avatar glasnt avatar christianbertschy avatar suriyan avatar bersena911 avatar evildmp avatar jmelett avatar digi604 avatar wilfamir avatar filwaitman avatar mikek avatar mebdivio avatar koniiiik avatar sanfranciscosunrise avatar vxsx avatar vinitkumar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.