Socket
Book a DemoInstallSign in
Socket

google-cloud-build-trigger

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

google-cloud-build-trigger

Custom client for triggering cloud build

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

Node.js Client for triggering Cloud build

//Path to your service account file
const config = { keyFilename: "./path/to/service-account.json" };
const builder = require("./index")(config);

//You can get the triggerId by navigating to cloud build from the google cloud platform console
//click on the triggers list and click on the trigger that you want to run,
//the url of the page should look something like that:
//https://console.cloud.google.com/cloud-build/triggers/<trigger_id>?project=<project_id>
//You can grab the triggerId from there
const options = {
  requestBody: { branchName: "master" },
  triggerId: "your-trigger-id"
};

builder.runTrigger(options, function(err, resp) {
  if (err) {
    console.log(err)
  }

  console.log(resp)
});

FAQs

Package last updated on 22 Jul 2019

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