ContinuityApp

Create a Dependency

Dependencies are compiled software you can make available to every build session. With 'compiled software' we mean everything: languages interpreters, databases, custom software or private patches to common projects. So, you can use Ruby with custom / not official patchsets, a custom version of PHP, or a specific version of Postgres, MySQL, Redis and everything can be compiled. With this api you are going to push the dependency source code to our Compile Server, and the generated artifact can then be used in every suite. Dependencies can shared among all the account projects. Some trusted accounts dependencies can be used by all the users: drop us an email to support@continuityapp.com to learn how you can share your artifacts among all our users. There is no limit to the software you can provide during a build session.

Auth&ACL

Users can access this API (collaborators cannot), via OAuth dependencies scope (or HTTP Basic Authentication for development purposes).

Definition

This is a 2 steps procedure. At first you reserve your dependency id by creating the dependency along with compile instructions, then you'll stream-upload the software archived source code. Once the upload is done, the dependency will get enqueued for compile.

POST https://v1.continuityapp.ws/dependencies
POST https://v1.continuityapp.ws/dependencies/<dependency_id>/archive

Arguments

Arguments    
name Required Name of the dependency.
command Required Compile command to be executed by our Compile Server (eg: ./compile --prefix=/srv/memcached && make && make install). Remember to set a valid –prefix option.
prefix Optional Compile Server will look in this path for the compiled artifacts (defaults to /srv/dependency). Should match the --prefix option you entered into command.
source Optional The source archive directory to join to execute compile command (in case the source code isn't in the root of the archive).
launch_command Optional If the dependency needs to be started before running the Test Suite, this command will be used. An interpreter language wont need a launch command, while a daemon will. If you are going to launch a daemon remember to always launch it in "Daemon mode", and don't remain attached to IO.
description Optional An arbitrary string which you can attach to the project.

Example request (Create the Dependecy)

$ curl https://v1.continuityapp.ws/dependencies?oauth_token=<access_token> \
    -d "name=memcached-1.4.15" \
    -d "description=memcached" \
    -d "command=.%2Fcompile%20--prefix%3D%2Ftmp%2Fmemcached%20%26%26%20make%20%26%26%20make%20install" \
    -d "prefix=%2Ftmp%2Fmemcached" \
    -d "source=memcached-1.4.15" \
    -d "launch_command": "memcached -d" \
    -X POST

Returns (Create the Dependecy)

The dependency object is returned. You will need to get the dependency ID to perform the archive upload request.

Example response (Create the Dependecy)

{
  "response": {
    "id": 123456789123456789,
    "id_ref": "123456789123456789",
    "name": "memcached-1.4.15",
    "description": "memcached",
    "command": "./compile --prefix=/srv/memcached && make && make install",
    "prefix": "/srv/memcached",
    "source": "memcached-1.4.15",
    "launch_command": "memcached -d",
    "marketplace_state": "private"
  }
}

Example request (Upload the Dependecy archive)

$ curl https://v1.continuityapp.ws/dependencies/123456789123456789/archive?oauth_token=<access_token> \
    --data-binary "@memcached-1.4.15.tar.gz" \
    -X POST

Returns (Upload the Dependecy archive)

The dependency object is returned, along with some extra information.

Example response (Upload the Dependecy archive)

{
  "response": {
    "id": 123456789123456789,
    "id_str": "123456789123456789",
    "name": "memcached-1.4.15",
    "description": "memcached",
    "command": "./compile --prefix=/srv/memcached && make && make install",
    "prefix": "/srv/memcached",
    "source": "memcached-1.4.15"
    "archive_file_size": 324451,
    "launch_command": "memcached -d",
    "marketplace_state": "enqueued_for_compile",
  }
}

Notes

After uploading the archive, the dependency will be enqueued for compile. You can see it compiling live using Dependency Firehose API. Dependency will be available to all your projects. You can make them available to all our users: drop us an email to support@continuityapp.com to learn how.

Errors

There are no specific errors for this API.

comments powered by Disqus