Skip to content

Commit

Permalink
Do CI using Codeship
Browse files Browse the repository at this point in the history
  • Loading branch information
j16r committed Jun 30, 2018
1 parent 21ddbe9 commit d537338
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 96 deletions.
19 changes: 8 additions & 11 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
**/.git
.git
!.git/HEAD
!.git/refs/heads
**/*_test.go

.git-together
.DS_Store
.envrc
tmp/

internal/bin/
internal/ci/
internal/clroot/
internal/gethnet/
*.log

node_modules/
**/node_modules/
Expand All @@ -25,3 +15,10 @@ sgx/target/

Dockerfile
chainlink

# codeship
codeship-*.yml
*.aes
dockercfg
credentials.env
gcr_creds.env
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ build/

# misc
.envrc

# codeship
*.aes
dockercfg
env
credentials.env
gcr_creds.env
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build Chainlink with SGX
FROM smartcontract/builder:1.0.0 as builder
FROM smartcontract/builder:1.0.1 as builder

# Have to reintroduce ENV vars from Baidu's SGX SDK image
ENV PATH /root/.cargo/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/sgxsdk/bin:/opt/sgxsdk/bin/x64
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Chainlink [![Travis-CI](https://travis-ci.org/smartcontractkit/chainlink.svg?branch=master)](https://travis-ci.org/smartcontractkit/chainlink) [![Maintainability](https://api.codeclimate.com/v1/badges/273722bb9f6f22d799bd/maintainability)](https://codeclimate.com/github/smartcontractkit/chainlink/maintainability) [![Go Report Card](https://goreportcard.com/badge/github.com/smartcontractkit/chainlink)](https://goreportcard.com/report/github.com/smartcontractkit/chainlink) [![Join the chat at https://gitter.im/smartcontractkit-chainlink/Lobby](https://badges.gitter.im/smartcontractkit-chainlink/Lobby.svg)](https://gitter.im/smartcontractkit-chainlink/Lobby) [![codecov](https://codecov.io/gh/smartcontractkit/chainlink/branch/master/graph/badge.svg)](https://codecov.io/gh/smartcontractkit/chainlink) [![GoDoc](https://godoc.org/github.com/smartcontractkit/chainlink?status.svg)](https://godoc.org/github.com/smartcontractkit/chainlink)
# Chainlink [![Travis-CI](https://travis-ci.org/smartcontractkit/chainlink.svg?branch=master)](https://travis-ci.org/smartcontractkit/chainlink) [![Maintainability](https://api.codeclimate.com/v1/badges/273722bb9f6f22d799bd/maintainability)](https://codeclimate.com/github/smartcontractkit/chainlink/maintainability) [![Go Report Card](https://goreportcard.com/badge/github.com/smartcontractkit/chainlink)](https://goreportcard.com/report/github.com/smartcontractkit/chainlink) [![Join the chat at https://gitter.im/smartcontractkit-chainlink/Lobby](https://badges.gitter.im/smartcontractkit-chainlink/Lobby.svg)](https://gitter.im/smartcontractkit-chainlink/Lobby) [![codecov](https://codecov.io/gh/smartcontractkit/chainlink/branch/master/graph/badge.svg)](https://codecov.io/gh/smartcontractkit/chainlink) [![GoDoc](https://godoc.org/github.com/smartcontractkit/chainlink?status.svg)](https://godoc.org/github.com/smartcontractkit/chainlink) [![Codeship Status for smartcontractkit/chainlink](https://app.codeship.com/projects/34072fa0-5e3b-0136-f3f4-6e975dd0f2b8/status?branch=master)](https://app.codeship.com/projects/296045)

Chainlink is middleware to simplify communication with blockchains.
Here you'll find the Chainlink Golang node, currently in alpha.
Expand Down
65 changes: 0 additions & 65 deletions builder/Dockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions builder/GNUmakefile

This file was deleted.

11 changes: 0 additions & 11 deletions builder/README.md

This file was deleted.

7 changes: 7 additions & 0 deletions codeship-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ci:
build:
image: ci
dockerfile: ./internal/ci/Dockerfile
context: ./
encrypted_env_file: env.encrypted
cached: true
14 changes: 14 additions & 0 deletions codeship-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- type: parallel
steps:
- service: ci
command: ./internal/ci/go_test
- service: ci
command: ./internal/ci/truffle_test
- service: ci
command: ./internal/ci/ethereum_test
- service: ci
command: ./internal/ci/gui_test

- name: codecov
service: ci
command: bash -c "curl -s https://codecov.io/bash"
2 changes: 2 additions & 0 deletions env.encrypted
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
codeship:v2
zWABCm0ENhhOqj3121T67KHYc5NaCyAnBLMKBo4JWKVymiF1FCqYryLhysy7tN1zZDkBtams89tgmMNFmA71RnrG4m/poLTHZSTaAU4tXtkE9vyvi4w5pm4TregehIVJjfqZ
22 changes: 22 additions & 0 deletions internal/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM smartcontract/builder:1.0.1

RUN apt-get update && apt-get install -y jq

# Have to reintroduce ENV vars from Baidu's SGX SDK image
ENV PATH /root/.cargo/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/sgxsdk/bin:/opt/sgxsdk/bin/x64
ENV LD_LIBRARY_PATH /opt/sgxsdk/sdk_libs
ENV SGX_SDK /opt/sgxsdk

ARG COMMIT_SHA
ARG ENVIRONMENT
ARG SGX_ENABLED
ARG SGX_SIMULATION

ADD . /go/src/github.com/smartcontractkit/chainlink
WORKDIR /go/src/github.com/smartcontractkit/chainlink

RUN dep ensure -vendor-only
RUN go get -u github.com/haya14busa/goverage
RUN yarn install

CMD ["/bin/bash"]
6 changes: 3 additions & 3 deletions internal/ci/ethereum_test
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ waitForResponse ()
{
printf -- "\033[34mWaiting for $1.\033[0m\n"
sleepCount=0
while [ "$sleepCount" -le "120" ] && ! curl -s "$1" >/dev/null; do
while [ "$sleepCount" -le "300" ] && ! curl -s "$1" >/dev/null; do
sleep 1
sleepCount=$((sleepCount+1))
done

if [ "$sleepCount" -gt "120" ]; then
printf -- "\033[31mTimed out waiting for $1 (waited 120s).\033[0m\n"
if [ "$sleepCount" -gt "300" ]; then
printf -- "\033[31mTimed out waiting for $1 (waited 300s).\033[0m\n"
exit 1
fi
printf -- "\033[34mService on $1 is ready.\033[0m\n"
Expand Down
2 changes: 1 addition & 1 deletion internal/ci/truffle_test
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ yarn solium --dir solidity/
yarn solium --dir examples/

cd solidity
./node_modules/.bin/truffle test --network test
../node_modules/.bin/truffle test --network test

cd ../examples/uptime_sla
yarn install
Expand Down

0 comments on commit d537338

Please sign in to comment.