mirror of
https://github.com/harness-community/drone-helm-chart-container-registry.git
synced 2026-06-14 05:12:50 +08:00
2.0 KiB
2.0 KiB
drone-push-helm-chart-docker-registry
Drone plugin to package and push a helm chart to a docker registry.
Build
Run the script directly using the command:
python3 main.py
Docker
Build the Docker image with the following commands:
docker buildx build -t DOCKER_ORG/drone-helm-chart-docker-registry --platform linux/amd64 .
Build the image for the Linux AMD64 platform
Usage
docker run --rm \
-e PLUGIN_CHART_NAME=${CHART_NAME} \
-e PLUGIN_CHART_VERSION=${CHART_VERSION} \
-e PLUGIN_DOCKER_REGISTRY=${DOCKER_REGISTRY} \
-e PLUGIN_CHART_PATH=${CHART_PATH} \
-e PLUGIN_DOCKER_USERNAME=${DOCKER_USERNAME} \
-e PLUGIN_DOCKER_PASSWORD=${DOCKER_PAT} \
-v $(pwd):$(pwd) \
-w $(pwd) \
harnesscommunity/drone-helm-chart-docker-registry
In Harness CI,
- step:
type: Plugin
name: helm to docker
identifier: helm_to_docker
spec:
connectorRef: docker-registry-connector
image: harnesscommunity/drone-helm-chart-docker-registry
settings:
chart_name: mywebapp
docker_username: <+variable.docker_username>
docker_password: <+secrets.getValue("pat-token")>
chart_path: test
chart_version: 1.0.0
docker_registry: registry.hub.docker.com
GLOBAL OPTIONS:
--chart_name value required Helm Chart Name [$PLUGIN_CHART_NAME]
--chart_version value optional Helm Chart Version (Default: 1.0.0) [$PLUGIN_CHART_VERSION]
--docker_registry value optional Docker Registry for pushing Helm Chart (Default: registry.hub.docker.com) [$PLUGIN_DOCKER_REGISTRY]
--chart_path value optional Path to Helm Chart's Directory (Default: Root Directory) [$PLUGIN_CHART_PATH]
--docker_username value required Docker Login Username [$PLUGIN_DOCKER_USERNAME]
--docker_password value required Docker Login Password [$PLUGIN_DOCKER_PASSWORD]
Please make sure the Chart name and version match the Chart.yaml, otherwise chart packaging will fail.