Coder Social home page Coder Social logo

Build Status

Hive Scheduler

The scheduler component behind the hive, and the main web view. For a full list of release notes, see the change log

Installing

Pre-requisites

  • git - Some of the gems are only currently available via Github
  • MySQL client libraries - sudo apt-get install libmysqlclient-dev on Ubuntu
  • A javascript runtime - For example, NodeJS - sudo apt-get install nodejs on Ubuntu

Configuration

Hive-Scheduler is configured using the Chamber gem. You can add configuration directly into the config/settings.yml file, or by setting the following environment variables (in the following lines to ~/.bashrc (or equivalent):

export RAILS_ENV=production
export DATABASE_ADAPTER=mysql2
export DATABASE_ENCODING=utf8
export DATABASE_HOST=your_database_host
export DATABASE_PORT=3306
export DATABASE_POOL=5
export DATABASE_USERNAME=database_username
export DATABASE_PASSWORD=database_password
export DATABASE_DATABASE=database_name
export ATTACHMENT_STORAGE=filesystem
export ATTACHMENT_STORAGE_PATH_BASE=public
export HIVE_QUEUES=true

Set up database

./bin/rake db:migrate
./bin/rake db:seed
./bin/rake assets:precompile

Example data

Some example execution scripts and projects can be created by editing the db/seeds.rb file before executing the rake tasks above.

Start the server

./bin/rails s

Examples

Hello world

Go into the 'Scripts' section and create a new script. Select 'Shell Script' as the target platform. Set the name to 'Hello <name>' and in the template box enter:

# This will use the execution variable 'word'
echo Hello $HIVE_WORD

Add a new execution variable called word and set the field type to 'String'. Save the script.

Go into the 'Projects' section and create a new project. Set the name to 'Hello world' and select the 'Hello <name>' script. Select the 'Manual' population mechanism and enter 'world' in the Word field and 'bash' in the Queues field. Leave all other fields as the defaults. Save the project.

Go into the 'Batches' section and create a new batch. Set the name to 'First test batch'. Select 'Hello world' as the project and set the version to '1.0'. Leave all other fields as the defaults. Save the batch.

In the 'Batches' section you will now see the batch you have just created and by clicking on the name you can see a single job belonging to this batch for the queue 'bash'. If you have a hive set up to run shell tests on a queue named 'bash' then this test will be executed and by clicking on the job number you can view the output.

Android test

The Android Calabash script is set up by default. In the 'Projects' section create a new project and select 'Android Calabash' as the execution type. Set the name to 'X Platform Example' and enter the following in the repository field:

[email protected]:calabash/x-platform-example.git

Select 'Manual' as the population mechanism and enter 'android-5.1.1' in the queue field. Click on the 'Add queue' link and enter 'android-4.4.4' in the new queue field.

Note; the hive runner is configured to run tests listed in queues specified by name. The values entered in these fields should be changed as appropriate for the configuration of your hives.

Save the project.

In the 'Batches' section create a new batch and select the project 'X Platform Example'. Set the name to 'Testing X platform example' and set the version. Upload the apk, which can be found at

Leave all other fields unchanged (the list of queues may be amended as required) and save the batch. As with the 'Hello world' example, the jobs will run if hives are set up with devices for the given queues and output can be viewed.

License

Hive Scheduler is available to everyone under the terms of the MIT open source licence. Take a look at the LICENSE file in the code.

Copyright (c) 2015 BBC

Hive CI's Projects

app_info icon app_info

Teardown tool for mobile app(ipa/app/apk), analysis metedata like version, name, icon etc.

pprof icon pprof

Ruby Gem to list, filter, search and print Provisioning Profiles files

res icon res

Intermediate Representation for test results

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.