Narcoleptic Programmers' Medicine
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



    Codeship Status for InVisionApp/kit-image-deployer Docker Repository on Quay npm version Dependency Status devDependency Status

    A service that can be used to update given yaml files within a git repository with a new docker image path. This can be used in colaboration with kit-deploymentizer and kit-deployer to automatically update the images used for a service across multiple clusters.

    Use as Docker Image

    docker run --help

    We recommend using kit components with Codeship's Docker Infrastructure, however you are free to run this tool however way you wish. Anything that has Docker can run this image.

    Using as CLI

    You can run the ./src/image-deployer --help to see how it works.

    Note this method requires node and was tested on version 5.5.0.

    Using as npm module

    Use npm to install kit-image-deployer:

    $ npm install kit-image-deployer --save

    Then require it and use it like so:

    var ImageDeployer = require("kit-image-deployer").ImageDeployer;
    var imageDeployer = new ImageDeployer({
        docker: {
            registry: "",
            repo: "example/my-service"
        github: {
            token: "my-github-token-here"
            user: "chesleybrown",
            repo: "my-kube-repo"
    // Deploy by commit ID
            name: committerName,
            email: committerEmail
    // OR deploy a full image name
            name: committerName,
            email: committerEmail


    The repository you are writing to should have a kit.yaml configuration file.

      path: images
      property: image
    • images.path is for specifying the directory path to where all your image yaml files will be stored
    • is the yaml property name within the given image files that will be updated with the image path

    Expected environment variables

    The following environment variables are used by this service.

    Variable Description Required Default
    GITHUB_AUTH_TOKEN Your github token to access the repo yes empty
    GITHUB_USER The github user that the repo belongs to yes empty
    GITHUB_REPO The github repo name yes empty
    DOCKER_REGISTRY The url for the docker registry yes empty
    DOCKER_REPO The repo to use within the docker registry yes empty
    CI_COMMITTER_NAME The name of the person who committed the change yes empty
    CI_COMMITTER_EMAIL The email of the person who committed the change yes empty
    CI_COMMITTER_MESSAGE The commit message yes empty
    CI_BRANCH The name of the branch yes empty
    CI_COMMIT_ID The commit hash or ID (must provide this or IMAGE) no empty
    IMAGE The full path and tag to the docker image (must provide this or CI_COMMIT_ID) no empty
    RETRIES Specify the number of times you want to automatically retry the commit if it fails yes 10


    See the Contributing guide for steps on how to contribute to this project.


    • Handle automatic retries if github request fails because of sha difference




    npm i kit-image-deployer

    Downloadsweekly downloads








    last publish


    • avatar