Skip to content

Instantly share code, notes, and snippets.

View jayco's full-sized avatar
🏠
Working from home

Jason Jacob jayco

🏠
Working from home
View GitHub Profile
mutation scheduleBuild {
pipelineScheduleCreate(
input: {
pipelineID: "UGlwZWxpbmUtLS1teS1waXBlbGluZS11dWlkLWFzLWZvdW5kLWluLXlvdXItcGlwZWxpbmUtc2V0dGluZ3M="
cronline: "0 */4 * * *"
message: "My schedule"
label: "new schedule"
}
) {
clientMutationId
@jayco
jayco / test.go
Last active July 28, 2021 00:01
test-buildkite-go
package main
import (
"encoding/json"
"fmt"
"log"
"os"
"github.com/buildkite/go-buildkite/v2/buildkite"
@jayco
jayco / build-duration.js
Created October 5, 2022 10:26
Simple GraphQL query to get total build duration from Buildkite API
var graphql = require('graphql.js');
var moment = require('moment');
moment().format();
var graph = graphql("https://graphql.buildkite.com/v1", {
method: "POST",
headers: { "Authorization": "Bearer <api-token>"},
asJSON: true,
debug: true,
});