Skip to content

Instantly share code, notes, and snippets.

@danielgehr
danielgehr / Jenkinsfile
Last active October 30, 2023 02:04
Jenkins pipeline template with environment configuration using gitflow
// ***********************
//
// Build and deploy different environments with jenkins pipeline
//
// Merge to develop -> triggers development release
// Merge to master without tag -> triggers staging release
// Merge to master with tag -> triggers staging and production release
// Production release requires manual approval on the jenkins job
//
// Configure jenkins pipeline project to pull tags! By default, tags are not pulled!
@jed
jed / deploy.sh
Last active April 24, 2024 15:45
Using AWS CloudFormation to deploy an edge lambda
#!/bin/sh
aws cloudformation deploy \
--template-file stack.yaml \
--stack-name edge-lambda-test \
--capabilities CAPABILITY_IAM \
--parameter-overrides Nonce=$RANDOM
@a-h
a-h / buildspec.yml
Last active November 3, 2022 08:31
Build Go with private dependencies on AWS CodeBuild
version: 0.2
env:
parameter-store:
build_ssh_key: "build_ssh_key"
phases:
install:
commands:
- mkdir -p ~/.ssh
import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common';
import { Observable } from 'rxjs';
import { tap } from 'rxjs/operators';
import { StatisticsService } from './statistics.service';
@Injectable()
export class StatisticsInterceptor implements NestInterceptor {
constructor(
private readonly statisticsService: StatisticsService,