Skip to content

Commit 41ebac5

Browse files
Update README.md
1 parent 3667fe5 commit 41ebac5

File tree

1 file changed

+24
-27
lines changed

1 file changed

+24
-27
lines changed

stable/relese-to-NPM/README.md

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,35 @@
1-
README
1+
# Codefresh Helm Plugin
22

3-
The release-tonpm can be used to publish images to npm.
4-
The below pipeline configuration demonstrates simple usage:
3+
Use Codefresh [Helm](https://helm.sh) plugin to deploy a Helm chart into specified (by context) Kubernetes cluster.
54

6-
deploy_to_npm:
7-
8-
title: Publishing To Npm
9-
image: codefresh/npm-publish:master
10-
commands:
11-
- NPM_TOKEN=${{NPM_TOKEN}} npm run ci-publish
12-
when:
13-
branch:
14-
only: [ master ]
5+
## Usage
156

7+
Set required and optional environment variable and add the following step to your Codefresh pipeline:
168

17-
Parameter Reference
9+
```yaml
10+
---
11+
version: '1.0'
1812

19-
-NPM_TOKEN
13+
steps:
2014

21-
-npm access key
15+
...
2216

23-
24-
25-
Login into your project's NPM registry
17+
release_to_env:
18+
image: codefresh/plugin-helm:2.7.2
2619

27-
npm login --registry <registry url>
28-
npm login --registry http://registry.npmjs.org
20+
...
2921

30-
Copy the token
31-
The login step added a line to your ~/.npmrc file looking something like this
22+
```
3223

33-
//registry.npmjs.org/:_authToken=00000000-0000-0000-0000-000000000000
24+
## Environment Variables
3425

35-
Grab the auth token value 00000000-0000-0000-0000-000000000000 (older NPM proxies or registries like sinopia might have an older different token string format)
36-
37-
Set the token as CI environment variable
38-
Go to your CI project settings and add a new variable NPM_TOKEN with the value you have just copied
26+
- **required** `CHART_NAME` - Helm chart name
27+
- **required** `RELEASE_NAME` - Helm release name
28+
- **required** `KUBE_CONTEXT` - Kubernetes context to use (cluster name from Codefresh-Kubernetes integration)
29+
- `NAMESPACE` - target Kubernetes namespace
30+
- `CHART_VERSION` - application chart version to install
31+
- `CHART_REPO_URL` - Helm chart repository URL
32+
- `DRY_RUN` - do a "dry run" installation (do not install anything, useful for Debug)
33+
- `DEBUG` - print verbose install output
34+
- `WAIT` - block step execution till installation completed and all Kubernetes resources are ready
35+
- `TIMEOUT` - wait timeout (5min by default)

0 commit comments

Comments
 (0)