Skip to content

Instantly share code, notes, and snippets.

View jordanebelanger's full-sized avatar
🚊

Jordane Belanger jordanebelanger

🚊
  • Montreal, Quebec
View GitHub Profile
@jordanebelanger
jordanebelanger / logger.ts
Last active June 2, 2023 21:09
Fastify GCP Stackdriver logging agent compatible pino logger
import * as P from 'pino'
import {FastifyReply, FastifyRequest} from 'fastify'
const enum PINO_LEVELS {
trace = 10,
debug = 20,
info = 30,
warn = 40,
error = 50,
fatal = 60,
@jordanebelanger
jordanebelanger / stackdriverpino.ts
Last active June 2, 2023 21:09
stackdriverlogger.ts
import * as P from 'pino'
import {FastifyReply, FastifyRequest} from 'fastify'
const enum PINO_LEVELS {
trace = 10,
debug = 20,
info = 30,
warn = 40,
error = 50,
fatal = 60,
@jordanebelanger
jordanebelanger / bitbucket-terra-fail
Created November 10, 2022 16:07
GCP Cloud build trigger fail with Bitbucket source type
│ Error: Error creating Trigger: googleapi: Error 400: Invalid value at 'trigger.git_file_source.repo_type' (type.googleapis.com/google.devtools.cloudbuild.v1.GitFileSource.RepoType), "BITBUCKET"
│ Details:
│ [
│ {
│ "@type": "type.googleapis.com/google.rpc.BadRequest",
│ "fieldViolations": [
│ {
│ "description": "Invalid value at 'trigger.git_file_source.repo_type' (type.googleapis.com/google.devtools.cloudbuild.v1.GitFileSource.RepoType), \"BITBUCKET\"",
│ "field": "trigger.git_file_source.repo_type"
│ }