Pregunta

I have this travis config:

language: python

services:
  - postgresql

python:
  - "2.7"
  - "2.6"

env:
  - DJANGO="django==1.6.2"

branches:
  only:
    - master

# command to install requirements
install:
  - pip install $DJANGO
  - pip install -r requirements.txt --use-mirrors
  - pip install -r networking_requirements.txt --use-mirrors
  - pip install coverage coveralls --use-mirrors
  - python setup.py install

before_script:
  - psql template1 -c 'CREATE EXTENSION hstore;'
  - psql -U postgres -c 'CREATE DATABASE nodeshot_travis;'
  - psql -U postgres -d nodeshot_travis -c "CREATE EXTENSION postgis;"
  - psql -U postgres -d nodeshot_travis -c "CREATE EXTENSION postgis_topology;"
  - cd tests
  - python manage.py syncdb --noinput
  - python manage.py migrate --noinput
  - python manage.py runserver 0.0.0.0:8000 &

# command to run tests, e.g. python setup.py test
script:
  - coverage run --source=nodeshot runtests.py

after_success:
  coveralls

And after success I'd like to upgrade existing test servers (one or more).

I haven't well understood how. What is the most common way to accomplish this?

¿Fue útil?

Solución

The most common way to do this is via travis-ci deployments, but the catch is that your provider has to be supported.

after_success is another option if your provider isn't supported by travis-ci. The disadvantage to this is that after_success will run on every build of your build matrix, so you have to worry about triggering multiple deployments with one build.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top