logo
0
0
Login
实现hello world打印

参数设计

main: push: - stages: - name: hello world image: docker.cnb.cool/w3c/sumu/git-deploy:latest settings: text: hello world boolean: true number: 123 array: [hello, world] map: key: value

上传参数值将会转化为以下环境变量:

PLUGIN_BOOLEAN='true' PLUGIN_NUMBER='123' PLUGIN_ARRAY='hello,world' PLUGIN_MAP='{"key":"value"}'

打包与推送镜像

  • 同名制品
docker build -t docker.cnb.cool/{repository-path}:latest . docker push docker.cnb.cool/{repository-path}:latest
  • 非同名制品
docker build -t docker.cnb.cool/{repository-path}/{image-name}:latest . docker push docker.cnb.cool/{repository-path}/{image-name}:latest

测试插件

docker run --rm -e PLUGIN_TEXT="hello world" docker.cnb.cool/w3c/sumu/git-deploy:latest