This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ApplicationTest { | |
| private static final String TRAVIS_BUILD_NUMBER = "TRAVIS_BUILD_NUMBER"; | |
| private static final String TRAVIS_BRANCH = "TRAVIS_BRANCH"; | |
| private static final String TRAVIS_REPO_SLUG = "TRAVIS_REPO_SLUG"; | |
| private static final String TRAVIS_BUILD_ID = "TRAVIS_BUILD_ID"; | |
| private static FirefoxDriver driver; | |
| private static final JavaMailSenderImpl mailSender = new JavaMailSenderImpl(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| branch: staging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # sets vars to DB back up user and creates database backup | |
| AWS_ACCESS_KEY_ID=<key> \ | |
| AWS_SECRET_ACCESS_KEY=<secret> \ | |
| AWS_DEFAULT_REGION=us-east-1 \ | |
| aws rds create-db-snapshot --db-snapshot-identifier="before-deploy-$(date +%Y%m%d-%H%M%S)" --db-instance-identifier=<db-name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # create a db backup before deploying | |
| before_deploy: | |
| - pip install --user awscli | |
| - ./scripts/before-deploy.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| deploy: | |
| skip_cleanup: true | |
| provider: elasticbeanstalk | |
| access-key-id: <key> | |
| secret-access-key: <secret> | |
| region: us-east-1 | |
| app: <app-name> | |
| env: <app-env> | |
| bucket_name: <bucket-name> | |
| zip_file: './web/build/libs/app-0.0.1-SNAPSHOT.war' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jar { | |
| baseName = 'vtms-web' | |
| from("${rootDir}/config/elastic_beanstalk/production") { | |
| include 'env.config' | |
| into('.ebextensions') | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| option_settings: | |
| - option_name: SPRING_APPLICATION_JSON | |
| value: '{"site":{"domainName":"ourdomain.com"},"callback":{"url":"/foo"}, "server": {"port": 5000}}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe('Menu', () => { | |
| it('should render', () => { | |
| const fakeContext = { user: { admin: false } }; | |
| const contextTypes = { user: React.PropTypes.object }; | |
| const menuComponent = wrapWithContext(fakeContext, contextTypes, <Menu />); | |
| const renderedMenu = ReactTestUtils.renderIntoDocument(menuComponent); | |
| //some checks go here | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function wrapWithContext(context, contextTypes, children) { | |
| const wrapperWithContext = React.createClass({ | |
| childContextTypes: contextTypes, | |
| getChildContext() { | |
| return context; | |
| }, | |
| render() { | |
| return children; | |
| }, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| const UserForm = (props, context) => ( | |
| <div> | |
| <form> | |
| <input type="text" value={context.user.username}/> | |
| <input type="text" value={context.user.email}/> | |
| </form> | |
| </div> | |
| ); |