Skip to content

Instantly share code, notes, and snippets.

@elsonrodriguez
Created October 2, 2015 04:27
Show Gist options
  • Save elsonrodriguez/97c06ce736d0fd7e44a7 to your computer and use it in GitHub Desktop.
Save elsonrodriguez/97c06ce736d0fd7e44a7 to your computer and use it in GitHub Desktop.
Script to quickly test changes after committing code locally.
#!/bin/bash
REGISTRY_URL=domain.com/name/project
RC_NAME=replication-controller
GITVER=`git rev-parse -q HEAD | cut -c1-8`
DOCKER_TAG=$REGISTRY_URL:$GITVER
docker build -t $DOCKER_TAG .
docker push $DOCKER_TAG
kubectl rolling-update $RC_NAME --image=$DOCKER_TAG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment