Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitlab-ci-client

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlab-ci-client

GitLab CI API client

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

gitlab-ci-client

Easy access to GitLab CI for node

Install

$ npm install --save gitlab-ci-client

Tests

$ npm test

Coverage

$ npm run cover

Usage

var gitlab = require('gitlab-ci-client')({
  apiUrl: 'https://ci.gitlab.com'
, token: '<your token>'
, gitlabUrl: 'https://gitlab.com'
, strictSSL: true
, runnerToken: '<your runner token>'
})

API

Projects

var projects = gitlab.projects
Projects.list()

List all projects, all owned projects, or a single project with the given id

Params
NameTypeDesc
idString, Numberowned or project id (optional)
cbFunctionfunction(err, projects, res)
Projects.create()

Create a new project with the given data

Params
NameTypeDesc
dataObjectThe params to create
cbFunctionfunction(err, body)

Where data requires:

  • name The project name
  • gitlab_id The GitLab Project ID
  • gitlab_url The web url of the project on GitLab
  • ssh_url_to_repo The ssh url of the project on GitLab

And can also have:

  • scripts (Array or string)
  • default_ref (Defaults to master)
Projects.update()

Updates the project with the given id

Params
NameTypeDesc
idString, NumberThe project id
dataObjectThe params to create
cbFunctionfunction(err, body)

Where data requires:

  • name The project name
  • gitlab_id The GitLab Project ID
  • gitlab_url The web url of the project on GitLab
  • ssh_url_to_repo The ssh url of the project on GitLab

And can also have:

  • scripts (Array or string)
  • default_ref (Defaults to master)
Projects.del()

Deletes the project with the given id

Params
NameTypeDesc
idString, NumberThe project id
cbFunctionfunction(err, body)

Adds a runner to the given project id

Params
NameTypeDesc
idString, NumberThe project id
runnerIdString, NumberThe runner id
cbFunctionfunction(err, body)

Remove a runner from the given project id

Params
NameTypeDesc
idString, NumberThe project id
runnerIdString, NumberThe runner id
cbFunctionfunction(err, body)

Runners

var runners = gitlab.runners
Runners.list()

List all of the registered runners

Params
NameTypeDesc
cbFunctionfunction(err, body)
Runners.register()

Registers the runner with the given data

Params
NameTypeDesc
dataObjectThe runner info
cbFunctionfunction(err, body)

Builds

var builds = gitlab.builds
Builds.run()

Tells the coordinator to run this next build

Params
NameTypeDesc
tokenStringThe runner token
cbFunctionfunction(err, body)
Builds.update()

Updates the coordinator with the info for the given build id

Params
NameTypeDesc
idNumberThe build id
tokenStringThe runner token
dataObjectThe build info
cbFunctionfunction(err, body)

Where data can have:

  • state (String)
  • trace (String)

Author

Evan Lucas

License

MIT

Keywords

FAQs

Package last updated on 20 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc