New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
publish build artifacts to npm and migrate to rinkeby #47
Conversation
|
||
jobs: | ||
include: | ||
- stage: tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move the test section above in here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That stage is just for naming and for adding integration tests in future if we want. If we remove that the tests will run in the Deploy to Rinkeby stage when we merge to develop
.travis.yml
Outdated
- stage: Deploy to Rinkeby | ||
if: (NOT type IN (pull_request)) AND (branch = develop) | ||
script: skip | ||
- script: ./scripts/migrate.sh rinkeby |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This indentation is not correct, just remote script: skip and remove the dash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
script:skip says do not run the tests for this stage as they ran in the test stage. -script defines parallel jobs for stage. Stages are serial and if the first stage fails the rest will not run so there is no need to run the tests IMO
truffle.js
Outdated
require("babel-register")({ | ||
ignore: /node_modules\/(?!openzeppelin-solidity)/ | ||
}); | ||
require('babel-polyfill'); | ||
|
||
//TODO Use import keys and truffle-wallet-provider module to sign txs from the code and use in networks | ||
let account = process.env.MIGRATE_ADDRESS; | ||
let WalletProvider = require("truffle-wallet-provider"); | ||
let endpoint = process.env.RINKEBY_PROVIDER || "http://127.0.0.1:8545"; // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you call the ENV var ETHEREUM_PROVIDER
instead, more generic.
In addition, you can remove //
at the end
scripts/migrate.sh
Outdated
@@ -15,7 +15,7 @@ if [ "$#" -ne 1 ]; then | |||
usage | |||
fi | |||
|
|||
if [[ ! "$1" =~ ^(local|integration|rinkeby)$ ]]; then | |||
if [[ ! "$1" =~ ^(localgeth|integration|rinkeby)$ ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove integration
scripts/migrate.sh
Outdated
docker run -it --net=host --entrypoint "/geth" centrifugeio/cent-geth:v0.1.0 attach http://localhost:9545 --exec "personal.unlockAccount('${MIGRATE_ADDRESS}', '${MIGRATE_PASSWORD}', 500)" | ||
fi | ||
|
||
rm -Rf $local_dir/../build | ||
if [[ "$1" =~ ^(rinkeby)$ ]]; then | ||
npm install centrifuge-ethereum-contracts@latest --force --no-save |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way that we can override versions in npm for certain develop
tag or something? Maybe deleting it and recreating it, again only for a certain develop branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can tag a npm release. We would add another deploy stage for that branch:
deploy:
...
tag: next
No description provided.