Skip to content
Jeff Douglas edited this page Oct 29, 2013 · 7 revisions

The following use cases need to be supported by the new application:

CloudSpokes Challenge

Member registers for a challenge and a new Papertrail account is created for their username (if one already doesn't exist) from this worker:

curl -v -H 'Authorization: Token token="[API-KEY]"' -X POST -d username=testabcd -d email=testabcd@email.com http://localhost:5000/api/1/accounts

After the account is created or an existing one returned, the process also creates a logger for the specific challenge:

var name = "Challenge-" + challenge_id + "-" + challenge_participant_id;
var papertrailId = membername + "-" + challenge_participant_id;

curl -v -H 'Authorization: Token token="[API-KEY]"' -X POST -d name=name -d loggerAccountId=525a75856ae1db2562000002 -d papertrailId=papertrailId http://localhost:5000/api/1/loggers    

When a member submits code, a job is created (with the logger created above) and submitted from this process_submission method:

curl -v -H 'Authorization: Token token="[API-KEY]"' -X POST -d email=me@email.com -d platform=heroku -d language=node.js -d userId=jeffdonthemic -d codeUrl=http://cs-production.s3.amazonaws.com/mycode.zip  http://localhost:5000/api/1/jobs

You can also pass the id of the logger to attach the job to and a array of option hashes.

Project

A project team with multiple people are working on an application for a customer and would like run their code through Thurgood at the end of each sprint. They would log into Thurgood and uplaod their code (this is not part of the API project) and create and submit a new job. If the do not have an account and logger, one would need to be created for them.

Ad-hoc testing

Similar to the project team, but let's say a CloudSpokes team member has a request from someone to run some code through Thurgood on a one-off basis. They would log into Thurgood and uplaod their code (this is not part of the API project) and create and submit a new job. If the do not have an account and logger, one would need to be created for them.

Clone this wiki locally