Skip to content

Instantly share code, notes, and snippets.

@maxfi
Last active August 26, 2016 22:11
Show Gist options
  • Save maxfi/3af5033c306b63b09a649377cabb511e to your computer and use it in GitHub Desktop.
Save maxfi/3af5033c306b63b09a649377cabb511e to your computer and use it in GitHub Desktop.
Build docker image only on Shippable

From: Shippable/support#2624

build:
  ci:
    - pwd 
  post_ci:
    - docker commit web eu.gcr.io/........
    - docker push eu.gcr.io/........

integrations:
  hub:
    - integrationName: gcr
      type: gcr
      branches:
        only:
          - production

OR

language: node_js

build:
  # Override the npm install command
  ci:
    - echo "Building $COMMIT"
  post_ci:
    - docker build -t {USERNAME}/{IMAGE_NAME}:$COMMIT .
    - docker push {USERNAME}/{IMAGE_NAME}:$COMMIT

# Integration name needs to match the name of an integration in the subscriptions section.
integrations:
  hub:
    - integrationName: Docker Hub
      type: docker
      branches:
        only:
          - master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment