0.3.6 • Published 9 years ago
hp4t v0.3.6
HP4T
Usage
Usage:
hp4t <command> [options]Commands:
help- display helpinit <language>- initialize projectexport <application>- Export Heroku application configurationexport-pipeline <pipeline>- Export Heroku pipeline configurationprovision-pipeline- Configure Heroku pipelinesprovision <environment>- Configure Heroku applicationdeploy <environment>- Deploy applicationpromote <environment>- Promote application to next environmentrun-remote <environment> <command>- Run command on Herokurun-local <environment> <command>- Run command locallynotify-rollbar- Notify Rollbar about deployment
Options:
--branch <branch_name>- deploy only from a specific branch--tags- deploy only from tags--slug <slug_name>- deploy only from specific repository slug
Example .travis.yml flow
Trunk base development:
language: node_js
node_js: 6
env:
global:
# ROLLBAR_DEPLOY_KEY
- secure: ""
# HEROKU_API_KEY
- secure: ""
cache:
apt: true
directories:
- node_modules
install:
- npm install
- alias hp4t="$(npm bin)/hp4t"
before_script:
- npm test
- hp4t provision-pipeline
- hp4t provision stage
- hp4t run stage "migrate database"
- hp4t deploy stage
- hp4t provision production
- hp4t promote stage # to production
- hp4t run production "migrate database"
script:
- /bin/true
after_success:
- hp4t notify-rollbarWith feature branch:
language: node_js
node_js:
- 6.0
env:
global:
# ROLLBAR_DEPLOY_KEY
- secure: ""
# HEROKU_API_KEY
- secure: ""
cache:
apt: true
directories:
- node_modules
install:
- npm install
- alias hp4t="$(npm bin)/hp4t"
before_script:
- npm test
- hp4t provision-pipeline
- hp4t provision stage
- hp4t run stage "migrate database"
- hp4t deploy stage
- hp4t provision production
- hp4t promote stage # to production
- hp4t run production "migrate database"
- hp4t deploy featureX --branch featureX
script:
- /bin/true
after_success:
- hp4t notify-rollbarContinuous delivery (deploy on tag):
language: node_js
node_js:
- 6.0
env:
global:
# ROLLBAR_DEPLOY_KEY
- secure: ""
# HEROKU_API_KEY
- secure: ""
cache:
apt: true
directories:
- node_modules
install:
- npm install
- alias hp4t="$(npm bin)/hp4t"
before_script:
- npm test
- hp4t provision stage --branch develop
- hp4t run stage "migrate database" --branch develop
- hp4t deploy stage --branch develop
- hp4t provision production --tags --branch master
- hp4t deploy production --tags --branch master # to production
- hp4t run production "migrate database" --tags --branch master
- hp4t deploy featureX --branch featureX
script:
- /bin/true
after_success:
- hp4t notify-rollbarConfiguration
File: .hp4t.yaml, format YAML.
Example:
infrastructure:
- dir: infrastructure/
environments:
default:
- slug: wojtekk/hp4t
- branch: master
stage:
- app: app_name-stage
- branch: develop
- tags: false
production:
- app: app_name
- branch: master
- tags: true