Skip to content
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

chore(ci): improve pipeline #97

Merged
merged 1 commit into from
Jul 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
278 changes: 94 additions & 184 deletions .ci/drone.yml
Original file line number Diff line number Diff line change
@@ -1,210 +1,120 @@
kind: pipeline
name: oraclize-krakenPriceTicker-0.5
name: provable-diesel

steps:
- name: test-url-kraken
image: node:lts-alpine
commands:
- echo "installing deps... " && apk update > /dev/null && apk add git gcc g++ make python > /dev/null
- rm -rf ./ethereum-examples/
- git clone https://github.com/oraclize/ethereum-examples.git
- cp -f ./oraclizeAPI_0.5.sol ./ethereum-examples/solidity/truffle-examples/kraken-price-ticker/contracts/oraclizeAPI.sol
- cd ./ethereum-examples/solidity/truffle-examples/kraken-price-ticker/
- npm i > /dev/null 2>&1
- npm i truffle -g --unsafe-perm > /dev/null
- npm i ganache-cli -g --unsafe-perm > /dev/null
- ganache-cli -p 9545 > /dev/null &
- sleep 10
- npx ethereum-bridge -a 9 --url 127.0.0.1:9545 --dev > /dev/null &
- sleep 50
- truffle test

---

kind: pipeline
name: provable-callerPaysForQuery-0.5
clone:
disable: true

steps:
- name: test-caller-pays-for-query
image: node:lts-alpine
commands:
- echo "installing deps... " && apk update > /dev/null && apk add git gcc g++ make python > /dev/null
- rm -rf ./ethereum-examples/
- git clone https://github.com/oraclize/ethereum-examples.git
- cp -f ./oraclizeAPI_0.5.sol ./ethereum-examples/solidity/truffle-examples/caller-pays-for-query/contracts/oraclizeAPI.sol
- cd ./ethereum-examples/solidity/truffle-examples/caller-pays-for-query/
- npm i > /dev/null 2>&1
- npm i truffle -g --unsafe-perm > /dev/null
- npm i ganache-cli -g --unsafe-perm > /dev/null
- ganache-cli -p 9545 > /dev/null &
- sleep 10
- npx ethereum-bridge -a 9 --url 127.0.0.1:9545 --dev > /dev/null &
- sleep 50
- truffle test
- name: clone
image: docker:git
commands:
- git clone https://github.com/provable-things/ethereum-api.git .
- git checkout $DRONE_COMMIT -B $DRONE_BRANCH
- git clone https://github.com/provable-things/ethereum-examples.git
- cp provableAPI.sol ethereum-examples/solidity/truffle-examples/diesel-price/

---
kind: pipeline
name: provable-delegatedMath-0.5

steps:
- name: test-computation-math
image: node:lts-alpine
commands:
- echo "installing deps... " && apk update > /dev/null && apk add git gcc g++ make python > /dev/null
- rm -rf ./ethereum-examples/
- git clone https://github.com/oraclize/ethereum-examples.git
- cp -f ./provableAPI_0.5.sol ./ethereum-examples/solidity/truffle-examples/delegated-math/contracts/provableAPI.sol
- cd ./ethereum-examples/solidity/truffle-examples/delegated-math/
- sed -i.bu 's/oraclize/provable/g' ./contracts/DelegatedMath.sol
- sed -i.bu 's/usingOraclize/usingProvable/g' ./contracts/DelegatedMath.sol
- npm i > /dev/null 2>&1
- npm i truffle -g --unsafe-perm > /dev/null
- npm i ganache-cli -g --unsafe-perm > /dev/null
- ganache-cli -p 9545 > /dev/null &
- sleep 10
- npx ethereum-bridge -a 9 --url 127.0.0.1:9545 --dev > /dev/null &
- sleep 50
- truffle test
- name: test
image: provable/eth-ci
commands:
- /var/workspace/sv-wrapper.sh
- cd ethereum-examples/solidity/truffle-examples/diesel-price/
- npm link web3
- truffle test

---
kind: pipeline
name: provable-dieselPrice-0.5
name: provable-kraken

steps:
- name: test-url-diesel
image: node:lts-alpine
commands:
- echo "installing deps... " && apk update > /dev/null && apk add git gcc g++ make python > /dev/null
- rm -rf ./ethereum-examples/
- git clone https://github.com/oraclize/ethereum-examples.git
- cp -f ./provableAPI_0.5.sol ./ethereum-examples/solidity/truffle-examples/diesel-price/contracts/provableAPI.sol
- cd ./ethereum-examples/solidity/truffle-examples/diesel-price/
- sed -i.bu 's/oraclize/provable/g' ./contracts/DieselPrice.sol
- sed -i.bu 's/usingOraclize/usingProvable/g' ./contracts/DieselPrice.sol
- npm i > /dev/null 2>&1
- npm i truffle -g --unsafe-perm > /dev/null
- npm i ganache-cli -g --unsafe-perm > /dev/null
- ganache-cli -p 9545 > /dev/null &
- sleep 10
- npx ethereum-bridge -a 9 --url 127.0.0.1:9545 --dev > /dev/null &
- sleep 50
- truffle test
---
kind: pipeline
name: provable-krakenPriceTicker-0.5
clone:
disable: true

steps:
- name: test-url-kraken
image: node:lts-alpine
commands:
- echo "installing deps... " && apk update > /dev/null && apk add git gcc g++ make python > /dev/null
- rm -rf ./ethereum-examples/
- git clone https://github.com/oraclize/ethereum-examples.git
- cp -f ./provableAPI_0.5.sol ./ethereum-examples/solidity/truffle-examples/kraken-price-ticker/contracts/provableAPI.sol
- cd ./ethereum-examples/solidity/truffle-examples/kraken-price-ticker/
- sed -i.bu 's/oraclize/provable/g' ./contracts/KrakenPriceTicker.sol
- sed -i.bu 's/usingOraclize/usingProvable/g' ./contracts/KrakenPriceTicker.sol
- npm i > /dev/null 2>&1
- npm i truffle -g --unsafe-perm > /dev/null
- npm i ganache-cli -g --unsafe-perm > /dev/null
- ganache-cli -p 9545 > /dev/null &
- sleep 10
- npx ethereum-bridge -a 9 --url 127.0.0.1:9545 --dev > /dev/null &
- sleep 50
- truffle test
- name: clone
image: docker:git
commands:
- git clone https://github.com/provable-things/ethereum-api.git .
- git checkout $DRONE_COMMIT -B $DRONE_BRANCH
- git clone https://github.com/provable-things/ethereum-examples.git
- cp provableAPI.sol ethereum-examples/solidity/truffle-examples/kraken-price-ticker/

- name: test
image: provable/eth-ci
commands:
- /var/workspace/sv-wrapper.sh
- cd ethereum-examples/solidity/truffle-examples/kraken-price-ticker/
- npm link web3
- truffle test

---
kind: pipeline
name: provable-streamr-0.5
name: provable-math

clone:
disable: true

steps:
- name: test-computation-streamr
image: node:lts-alpine
commands:
- echo "installing deps... " && apk update > /dev/null && apk add git gcc g++ make python > /dev/null
- rm -rf ./ethereum-examples/
- git clone https://github.com/oraclize/ethereum-examples.git
- cp -f ./provableAPI_0.5.sol ./ethereum-examples/solidity/truffle-examples/streamr/contracts/provableAPI.sol
- cd ./ethereum-examples/solidity/truffle-examples/streamr/
- sed -i.bu 's/oraclize/provable/g' ./contracts/StreamrTweetsCounter.sol
- sed -i.bu 's/usingOraclize/usingProvable/g' ./contracts/StreamrTweetsCounter.sol
- npm i > /dev/null 2>&1
- npm i truffle -g --unsafe-perm > /dev/null
- npm i ganache-cli -g --unsafe-perm > /dev/null
- ganache-cli -p 9545 > /dev/null &
- sleep 10
- npx ethereum-bridge -a 9 --url 127.0.0.1:9545 --dev > /dev/null &
- sleep 50
- truffle test
- name: clone
image: docker:git
commands:
- git clone https://github.com/provable-things/ethereum-api.git .
- git checkout $DRONE_COMMIT -B $DRONE_BRANCH
- git clone https://github.com/provable-things/ethereum-examples.git
- cp provableAPI.sol ethereum-examples/solidity/truffle-examples/delegated-math/

- name: test
image: provable/eth-ci
commands:
- /var/workspace/sv-wrapper.sh
- cd ethereum-examples/solidity/truffle-examples/delegated-math/
- npm link web3
- truffle test

---
#kind: pipeline
#name: provable-urlRequests-0.5
#
#steps:
#- name: test-computation-requests
# image: node:lts-alpine
# commands:
# - echo "installing deps... " && apk update > /dev/null && apk add git gcc g++ make python > /dev/null
# - rm -rf ./ethereum-examples/
# - git clone https://github.com/oraclize/ethereum-examples.git
# - cp -f ./provableAPI_0.5.sol ./ethereum-examples/solidity/truffle-examples/url-requests/contracts/provableAPI.sol
# - cd ./ethereum-examples/solidity/truffle-examples/url-requests/
# - sed -i.bu 's/oraclize/provable/g' ./contracts/UrlRequests.sol
# - sed -i.bu 's/usingOraclize/usingProvable/g' ./contracts/UrlRequests.sol
# - npm i > /dev/null 2>&1
# - npm i truffle -g --unsafe-perm > /dev/null
# - npm i ganache-cli -g --unsafe-perm > /dev/null
# - ganache-cli -p 9545 > /dev/null &
# - sleep 10
# - npx ethereum-bridge -a 9 --url 127.0.0.1:9545 --dev > /dev/null &
# - sleep 50
# - truffle test
#
#---
kind: pipeline
name: provable-wolframAlpha-0.5
name: provable-random

clone:
disable: true

steps:
- name: test-wolfram-alpha
image: node:lts-alpine
commands:
- echo "installing deps... " && apk update > /dev/null && apk add git gcc g++ make python > /dev/null
- rm -rf ./ethereum-examples/
- git clone https://github.com/oraclize/ethereum-examples.git
- cp -f ./provableAPI_0.5.sol ./ethereum-examples/solidity/truffle-examples/wolfram-alpha/contracts/provableAPI.sol
- cd ./ethereum-examples/solidity/truffle-examples/wolfram-alpha/
- sed -i.bu 's/oraclize/provable/g' ./contracts/WolframAlpha.sol
- sed -i.bu 's/usingOraclize/usingProvable/g' ./contracts/WolframAlpha.sol
- npm i > /dev/null 2>&1
- npm i truffle -g --unsafe-perm > /dev/null
- npm i ganache-cli -g --unsafe-perm > /dev/null
- ganache-cli -p 9545 > /dev/null &
- sleep 10
- npx ethereum-bridge -a 9 --url 127.0.0.1:9545 --dev > /dev/null &
- sleep 50
- truffle test
- name: clone
image: docker:git
commands:
- git clone https://github.com/provable-things/ethereum-api.git .
- git checkout $DRONE_COMMIT -B $DRONE_BRANCH
- git clone https://github.com/provable-things/ethereum-examples.git
- cp provableAPI.sol ethereum-examples/solidity/truffle-examples/random-datasource/

- name: test
image: provable/eth-ci
commands:
- cd ethereum-examples/solidity/truffle-examples/random-datasource
- npm i --no-optional -g dotenv
- npm link web3 truffle-hdwallet-provider dotenv
- echo "mnemonic = coast mind object you word swarm dinosaur cereal wash corn tape quarter" >> .env
- echo "infuraKey = dff2672a2a7e43f193a374a16c485c33" >> .env
- truffle test --network rinkeby

---
kind: pipeline
name: provable-youtubeViews-0.5
name: provable-wolfram

clone:
disable: true

steps:
- name: test-url-youtube
image: node:lts-alpine
commands:
- echo "installing deps... " && apk update > /dev/null && apk add git gcc g++ make python > /dev/null
- rm -rf ./ethereum-examples/
- git clone https://github.com/oraclize/ethereum-examples.git
- cp -f ./provableAPI_0.5.sol ./ethereum-examples/solidity/truffle-examples/youtube-views/contracts/provableAPI.sol
- cd ./ethereum-examples/solidity/truffle-examples/youtube-views/
- sed -i.bu 's/oraclize/provable/g' ./contracts/YoutubeViews.sol
- sed -i.bu 's/usingOraclize/usingProvable/g' ./contracts/YoutubeViews.sol
- npm i > /dev/null 2>&1
- npm i truffle -g --unsafe-perm > /dev/null
- npm i ganache-cli -g --unsafe-perm > /dev/null
- ganache-cli -p 9545 > /dev/null &
- sleep 10
- npx ethereum-bridge -a 9 --url 127.0.0.1:9545 --dev > /dev/null &
- sleep 50
- truffle test
- name: clone
image: docker:git
commands:
- git clone https://github.com/provable-things/ethereum-api.git .
- git checkout $DRONE_COMMIT -B $DRONE_BRANCH
- git clone https://github.com/provable-things/ethereum-examples.git
- cp provableAPI.sol ethereum-examples/solidity/truffle-examples/wolfram-alpha/

- name: test
image: provable/eth-ci
commands:
- /var/workspace/sv-wrapper.sh
- cd ethereum-examples/solidity/truffle-examples/wolfram-alpha/
- npm link web3
- truffle test