def notify(): slack = Slacker(env.get_credential('FEC_SLACK_TOKEN')) slack.chat.post_message( env.get_credential('FEC_SLACK_CHANNEL', '#fec'), 'deploying branch {branch} of app {name} to space {space} by {user}'.format( name=env.name, space=env.space, user=os.getenv('DEPLOY_USER'), branch=os.getenv('DEPLOY_BRANCH'), ), username=env.get_credential('FEC_SLACK_BOT', 'fec-bot'), )
def initialize_newrelic(): license_key = env.get_credential('NEW_RELIC_LICENSE_KEY') if license_key: import newrelic.agent settings = newrelic.agent.global_settings() settings.license_key = license_key newrelic.agent.initialize()