Skip to content

Instantly share code, notes, and snippets.

@jamieklassen
jamieklassen / instructions.md
Created June 24, 2020 20:45
adding tracepoints to worker healthcheck

Adding tracepoints to the Concourse worker's healthcheck on k8s

install go

Make sure go is installed on your worker -- this should be possible to do by running something like

kubectl -n <namespace> exec <worker pod> -- apt-get install -y golang-go
@jamieklassen
jamieklassen / idea.md
Last active July 29, 2020 21:59
tracing docker-image-resource checks

Suppose the following resource in pipeline p is slow to check:

- name: image
  type: docker-image
  source:
    repository: artifactory.internal/concourse-docker/cf-mgmt
    tag: '05.12.2020'
    insecure_registries: 
 - artifactory.internal
@jamieklassen
jamieklassen / get.sh
Created February 29, 2020 00:43
resource-types-manifest-script
#!/bin/bash
VERSION=$1
PIPELINE=release-$(echo $VERSION | sed 's/.$/x/')
set -eo pipefail
version_vid=$(fly -t ci curl /api/v1/teams/main/pipelines/$PIPELINE/resources/version/versions "filter=number:$VERSION" -- -s |
jq .[0].id)
shipit_build_id=$(fly -t ci curl /api/v1/teams/main/pipelines/$PIPELINE/resources/version/versions/$version_vid/output_of "" -- -s |
@jamieklassen
jamieklassen / patch-releases.md
Created October 29, 2019 17:29
patch releases

We're releasing! Why?

  1. We felt like it - we knew this was coming
    1. sick new features => major/minor
      • We've gotten pretty good at this 👍 usually we just hit shipit on the main pipeline and profit. But we also need to create some branches on a few repos and a patch pipeline in most cases.
      • Usually some engineer is pushing for this (I want to see my pet feature in the hands of users and bask in their admiration)
  2. fixing something embarrassing => patch latest minor
@jamieklassen
jamieklassen / setup.sh
Created October 24, 2019 20:28
concourse bootstrap script
#!/bin/bash
# NOTE: it seems to be important that your default shell is bash, otherwise
# the output of `docker-machine env default` will not be eval-able
set -e
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install go postgresql yarn docker docker-machine docker-compose
brew install --HEAD universal-ctags/universal-ctags/universal-ctags
#!/bin/bash
cwd=/usr/local/lib/node_modules/@octokit/rest
if [ ! -d "$cwd" ]; then
npm i -g @octokit/rest
fi
cd $cwd
node -e "
require('@octokit/rest')()
.search
.issuesAndPullRequests({
text/html; lynx -dump -nolist %s; copiousoutput; need sterminal; nametemplate=%s.html
@jamieklassen
jamieklassen / Example.elm
Last active April 22, 2019 20:53
results of TDDing a todo list in Elm
module Example exposing (suite)
import Expect
import Html.Attributes
import Main
import Test exposing (Test, describe, test)
import Test.Html.Event as Event
import Test.Html.Query as Query
import Test.Html.Selector exposing (attribute, tag, text)

automating some Concourse workflow stuff at the command line

Web backlog: /projects/columns/1366615 UX inflight: /projects/columns/1366616 UX done: /projects/columns/1366617

general command structure: alias proj='hub api -H accept:application/vnd.github.inertia-preview+json'

@jamieklassen
jamieklassen / tall-pipeline.yml
Created March 28, 2019 14:12
very tall pipeline
resources:
- name: resource0
type: mock
source:
mirror_self: true
force_version: version
- name: resource1
type: mock
source:
mirror_self: true