jupyterhub/chartpress

Name: chartpress

Owner: JupyterHub

Description: automate building and publishing images for helm charts

Created: 2018-02-15 14:45:51.0

Updated: 2018-05-24 11:25:24.0

Pushed: 2018-05-24 11:25:23.0

Homepage: null

Size: 44

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

chartpress

Automate building and publishing helm charts and associated images.

This is used as part of the JupyterHub and Binder projects.

Chartpress will:

A chartpress.yaml file contains a specification of charts and images to build.

For example:

ts:
list of charts by name
each name should be a directory containing a helm chart
name: binderhub
# the prefix to use for built images
imagePrefix: jupyterhub/k8s-
# the git repo whose gh-pages contains the charts
repo:
  git: jupyterhub/helm-chart
  published: https://jupyterhub.github.io/helm-chart
# additional paths (if any) relevant to the chart version
# outside the chart directory itself
paths:
  - ../setup.py
  - ../binderhub
# images to build for this chart (optional)
images:
  binderhub:
    # Context to send to docker build for use by the Dockerfile
    # (if different from the current directory)
    contextPath: ..
    # Dockerfile path, if different from the default
    # (may be needed if contextPath is set)
    dockerfilePath: images/binderhub/Dockerfile
    # path in values.yaml to be updated with image name and tag
    valuesPath: image
    # additional paths (if any) relevant to the image
    # outside the image directory itself
    paths:
      - ../setup.py
      - ../binderhub
Usage

In a directory containing a chartpress.yaml, run:

chartpress

to build your chart(s) and image(s). Add --push to publish images to docker hub and --publish-chart to publish the chart and index to gh-pages.

e: chartpress [-h] [--commit-range COMMIT_RANGE] [--push]
              [--publish-chart] [--tag TAG]
              [--extra-message EXTRA_MESSAGE]

mate building and publishing helm charts and associated images. This is
 as part of the JupyterHub and Binder projects.

onal arguments:
, --help            show this help message and exit
commit-range COMMIT_RANGE
                    Range of commits to consider when building images
push                push built images to docker hub
publish-chart       publish updated chart to gh-pages
tag TAG             Use this tag for images & charts
extra-message EXTRA_MESSAGE
                    extra message to add to the commit message when
                    publishing charts
Caveats
Shallow clones

Chartpress detects the latest commit which changed a directory or file when determining the tag to use for charts and images. This means that shallow clones should not be used because if the last commit that changed a relevant file is outside the shallow commit range, the wrong tag will be assigned.

Travis uses a clone depth of 50 by default, which can result in incorrect image tagging. You can disable this shallow clone behavior in your .travis.yml:


pth: false

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.