Skip to content

itjustworksteam/codeci

Repository files navigation

CodeCI

Build Status

CodeCI is a command line tool used to test your software locally. It works with docker and requires 64-bit machines.

Requirements

  • 64-bit machine
  • docker
  • docker-compose
  • golang

Install

  • bash install.sh
  • sudo go build -o /usr/local/bin/codeci

Testing Installation

  • run codeci test and you will see a whale that say Hello CodeCI!

How to use it

  • simply in the root directory of your project run codeci
  • attention! It needs a file called codeci.yml to work

Commands

  • codeci --version show the version
  • codeci --help show an help
  • codeci -f codeci.anotherconf.yml specify another name for your codeci.yml file. The file has to be named with a prefix of codeci and suffix of .yml

codeci.yml

  • it's a simple yml file with 3 properties: os, language and script.
  • os -> is the operating system for now it is available only ubuntu14
  • language -> is the language of the project
  • image -> the image from dockerhub or local ( replace os and language )
  • script -> is the script that the build has to execute
  • os types available: ubuntu14
  • language types available: java, python, php, swiftenv, node, go, cpp, scala, ruby, àrduino```, android ornone```
  • script you can run whatever you want because you have a docker container with sudo privileges

Example of codeci.yml

  • java example
os: ubuntu14
language: java
script:
 - echo hello
 - echo java
  • swiftenv example
os:ubuntu14
language: swiftenv
script:
  - swiftenv install 3.0
  - swiftenv global 3.0
  - swift build
  - swift test
  • none example
os: ubuntu14
language: none
script:
  - apt-get update
  - apt-get install build-essential -y
  - gcc -v
  - make -v
  • image example
image: ubuntu:14.04
script:
  - apt-get update
  - apt-get install vim -y
  • cpp example: ( used for c and c++ )
os: ubuntu14
language: cpp
script:
  - make -v
  - gcc -v
  - cc -v
  - g++ -v
  • arduino example:
os: ubuntu14
language: arduino
script:
   - ino build
  • android example:
os: ubuntu14
language: android
script:
   - echo "sdk.dir=/opt/android-sdk-linux" > local.properties   ## this line is very important
   - ./gradlew clean assembleRelease