Skip to content

Instantly share code, notes, and snippets.

@trotzig
Created August 15, 2019 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trotzig/1d005cf57e321ad845fb55f9c1b2ec12 to your computer and use it in GitHub Desktop.
Save trotzig/1d005cf57e321ad845fb55f9c1b2ec12 to your computer and use it in GitHub Desktop.
An example of a Happo CI script for Jenkins
#!/bin/bash
# Make the whole script fail on errors
set -euo pipefail
PREVIOUS_SHA=$(git merge-base origin/master "${CIRCLE_SHA1}")
export PREVIOUS_SHA
export CURRENT_SHA="$(git rev-parse ${1-HEAD})"
export CHANGE_URL="$GERRIT_CHANGE_URL"
# Delegate to the canonical happo-ci script. It will use the env variables we have
# prepared.
$(npm bin)/happo-ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment