Sample Blockchain Projects

Sample Blockchain Projects

Truffle

Note: the following instructions require the node program to be available.

From the command line, create a new project directory:

mkdir trufflesample
cd trufflesample

Download Truffle’s MetaCoin example project:

npx truffle unbox metacoin

Create a new file named superblocks.yaml with the following contents:

version: 1
jobs:
  compile:
    image: node
    script:
      - npm install truffle
      - npx truffle compile
  test:
    image: node
    script:
      - npm install truffle
      - npx truffle test
stages:
  - pipeline:
      jobs:
        - compile
        - test

Embark

Note: the following instructions require the git program to be available.

From the command line, clone Embark template example:

git clone https://github.com/embark-framework/embark-create-react-dapp-template
cd embark-create-react-dapp-template

Create a new file named superblocks.yaml with the following contents:

version: 1
jobs:
  build:
    image: node
    script:
      - yarn add --dev ganache-cli embark
      - yarn install
      - npx embark build
  test:
    image: node
    script:
      - yarn add --dev ganache-cli embark
      - yarn install
      - npx embark test
stages:
  - pipeline:
      jobs:
        - build
        - test