libjenkins-0.1.0.0: Jenkins API interface

Safe HaskellNone

Jenkins.REST

Contents

Description

Jenkins REST API interface

Synopsis

Types

data Jenkins a Source

Jenkins REST API composable queries

data Settings Source

Jenkins settings

_jenkins_api_token might as well be the user's password, Jenkins does not make any distinction between these concepts

newtype Host Source

Jenkins host address

Constructors

Host 

Fields

unHost :: String
 

newtype Port Source

Jenkins port

Constructors

Port 

Fields

unPort :: Int
 

newtype User Source

Jenkins user

Constructors

User 

Fields

unUser :: ByteString
 

newtype APIToken Source

Jenkins user API token

Constructors

APIToken 

type Password = APITokenSource

Jenkins user password

data Request m

All information on how to connect to a host and what should be sent in the HTTP request.

If you simply wish to download from a URL, see parseUrl.

The constructor for this data type is not exposed. Instead, you should use either the def method to retrieve a default instance, or parseUrl to construct from a URL, and then use the records below to make modifications. This approach allows http-conduit to add configuration options without breaking backwards compatibility.

For example, to construct a POST request, you could do something like:

 initReq <- parseUrl "http://www.example.com/path"
 let req = initReq
             { method = "POST"
             }

For more information, please see http://www.yesodweb.com/book/settings-types.

Instances

Jenkins queries construction

post :: (forall f. Method Complete f) -> ByteString -> Jenkins ()Source

POST query (with payload)

post_ :: (forall f. Method Complete f) -> Jenkins ()Source

POST query (without payload)

concurrently :: Jenkins a -> Jenkins b -> Jenkins (a, b)Source

Do both queries concurrently

io :: IO a -> Jenkins aSource

Lift arbitrary IO action

disconnect :: Jenkins aSource

Disconnect from Jenkins

Following queries won't be executed

with :: (forall m. Request m -> Request m) -> Jenkins a -> Jenkins aSource

Make custom local changes to Request

Jenkins method construction

Little helpers

concurrentlys :: [Jenkins a] -> Jenkins [a]Source

Do a list of queries concurrently

concurrentlys_ :: [Jenkins a] -> Jenkins ()Source

Do a list of queries concurrently ignoring their results

postXML :: (forall f. Method Complete f) -> Document -> Jenkins ()Source

POST job's config.xml (in xml-conduit format)

reload :: Jenkins aSource

Reload jenkins configuration from disk

restart :: Jenkins aSource

Restart jenkins

Jenkins queries execution

runJenkins :: Settings -> Jenkins a -> IO (Either Disconnect a)Source

Communicate with Jenkins REST API

Catches HttpExceptions thrown by http-conduit, but does not catch exceptions thrown by embedded IO actions

runJenkinsP :: Monad m => (JenkinsF (m a) -> m a) -> Jenkins a -> m aSource

Generic Jenkins REST API queries interpreter

Particularly useful for testing (with m ≡ Identity)

Lenses and prisms

Usable http-conduit Request type API