Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kit-image-deployer

Package Overview
Dependencies
Maintainers
12
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kit-image-deployer

A service that can be used to update given yaml files within a git repository with a new docker image path.

  • 3.3.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
12
Weekly downloads
 
Created
Source

kit-image-deployer

[DEPRECATED] Thanks for using this package, but we will no longer support it.

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 quay.io/invision/kit-image-deployer --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: "my-registry.com",
		repo: "example/my-service"
	},
	github: {
		token: "my-github-token-here"
		user: "chesleybrown",
		repo: "my-kube-repo"
	}
});

// Deploy by commit ID
imageDeployer.deployCommitId(
	"70c30b1b3a1fce1e6826700c31830f47521292ad",
	branch,
	{
		name: committerName,
		email: committerEmail
	},
	commitMessage,
	save)
	.then(console.log)
	.catch(console.error);

// OR deploy a full image name
imageDeployer.deployImage(
	"node:5.5.0",
	branch,
	{
		name: committerName,
		email: committerEmail
	},
	commitMessage,
	save)
	.then(console.log)
	.catch(console.error);

Configuration

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

images:
  path: images
  property: image
  • images.path is for specifying the directory path to where all your image yaml files will be stored
  • images.property 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.

VariableDescriptionRequiredDefault
GITHUB_AUTH_TOKENYour github token to access the repoyesempty
GITHUB_USERThe github user that the repo belongs toyesempty
GITHUB_REPOThe github repo nameyesempty
DOCKER_REGISTRYThe url for the docker registryyesempty
DOCKER_REPOThe repo to use within the docker registryyesempty
CI_COMMITTER_NAMEThe name of the person who committed the changeyesempty
CI_COMMITTER_EMAILThe email of the person who committed the changeyesempty
CI_COMMITTER_MESSAGEThe commit messageyesempty
CI_BRANCHThe name of the branchyesempty
CI_COMMIT_IDThe commit hash or ID (must provide this or IMAGE)noempty
IMAGEThe full path and tag to the docker image (must provide this or CI_COMMIT_ID)noempty
RETRIESSpecify the number of times you want to automatically retry the commit if it failsyes10

Contributing

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

Todo:

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

FAQs

Package last updated on 02 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc