Name: hive-scheduler
Owner: BBC
Description: null
Created: 2015-07-10 14:31:16.0
Updated: 2017-01-12 08:48:57.0
Pushed: 2017-10-20 11:40:12.0
Homepage: null
Size: 1603
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The scheduler component behind the hive, and the main web view. For a full list of release notes, see the change log
git
- Some of the gems are only currently available via Githubsudo apt-get install libmysqlclient-dev
on Ubuntusudo apt-get install nodejs
on UbuntuHive-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):
rt RAILS_ENV=production
rt DATABASE_ADAPTER=mysql2
rt DATABASE_ENCODING=utf8
rt DATABASE_HOST=your_database_host
rt DATABASE_PORT=3306
rt DATABASE_POOL=5
rt DATABASE_USERNAME=database_username
rt DATABASE_PASSWORD=database_password
rt DATABASE_DATABASE=database_name
rt ATTACHMENT_STORAGE=filesystem
rt ATTACHMENT_STORAGE_PATH_BASE=public
rt HIVE_QUEUES=true
n/rake db:migrate
n/rake db:seed
n/rake assets:precompile
Some example execution scripts and projects can be created by editing the
db/seeds.rb
file before executing the rake tasks above.
n/rails s
Go into the 'Scripts' section and create a new script. Select
'Shell Script' as the target platform.
Set the name to 'Hello
is will use the execution variable 'word'
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
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.
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:
github.com: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.
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