0.0.7 • Published 3 years ago

@netless/devops-scripts v0.0.7

Weekly downloads
19
License
MIT
Repository
-
Last release
3 years ago

docker-scripts

How to use

  • develop
const docker = new Docker({auth: 'https://registry.domain.com', namespace: "mynamespace"});
docker.buildAndPush("dockerfilePath", "imageName", "latest" || ["latest", "1.0.0-commit"], true);

// if you image not change, you need patch, deployK8s do patch for you
deployK8s("k8s-dev", "repo", "/app.yaml", "deployment-name","namespace");
// or just patch, because image not change
patchDeployment("k8s-cluster", "demo", "default");
  • yaml repo
import {gitDiff, applyDiff, SSHConfig} from "./src";

const config: SSHConfig = {host: "k8s-cluster"};
(async () => {
    await applyDiff(config, gitDiff());
})();

TODO:

  • delete D yaml's deployment statefulset ingress service
  • support handle all yaml kind, not just first
  • check kind support operation
  • deployK8s not need deployment and name, just need yaml.