Skip to content

Commit 789f647

Browse files
authored
Merge pull request #7 from bitovi/atomic
Atomic
2 parents 2cf9a3b + b835fb4 commit 789f647

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,20 @@ Following inputs can be used as `step.with` keys
1919
| `cluster-role-arn` | String | If you wish to assume an admin role, provide the role arn here to login as. |
2020
| `config-files` | String | Comma separated list of helm values files. |
2121
| `namespace` | String | Kubernetes namespace to use. Will create if it does not exist |
22-
| `values` | String | Comma separated list of value set for helms. e.x: key1=value1,key2=value2 |
22+
| `values` | String | Comma separated list of value set for helms. e.x:`key1=value1,key2=value2` |
2323
| `name` | String | The name of the helm release |
2424
| `chart-path` | String | The path to the chart. (defaults to `helm/`) |
2525
| `chart-repository` | String | The URL of the chart-repository (Optional) |
26-
| `plugins` | String | Comma separated list of plugins to install. e.x: https://github.com/hypnoglow/helm-s3.git, https://github.com/someuser/helm-plugin.git (defaults to none) |
26+
| `plugins` | String | Comma separated list of plugins to install. e.x:` https://github.com/hypnoglow/helm-s3.git, https://github.com/someuser/helm-plugin.git` (defaults to none) |
2727
| `timeout` | String | The value of the timeout for the helm release |
2828
| `update-deps` | String | Update chart dependencies |
29-
| `helm-wait` | String | Add the helm --wait flag to the helm Release |
29+
| `helm-wait` | String | Add the helm --wait flag to the helm Release (Optional) |
30+
| `atomic` | String | Add the helm --atomic flag if set (Optional) |
3031

3132
## Example usage
3233

3334
```yaml
34-
uses: bitovi/[email protected].2
35+
uses: bitovi/[email protected].3
3536
with:
3637
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
3738
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -47,7 +48,7 @@ with:
4748
## Example 2
4849
```yaml
4950
- name: Deploy Helm
50-
uses: bitovi/[email protected].2
51+
uses: bitovi/[email protected].3
5152
with:
5253
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
5354
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -59,6 +60,7 @@ with:
5960
namespace: logging
6061
name: fluent-bit
6162
chart-repository: https://fluent.github.io/helm-charts
63+
atomic: true
6264
```
6365
6466

action.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ inputs:
5454
helm-wait:
5555
description: 'Add the --wait flag to helm'
5656
required: false
57+
atomic:
58+
description: 'Add the --atomic flag to rollback on failure'
59+
required: false
5760
runs:
5861
using: 'docker'
59-
image: 'docker://bitovi/deploy-eks-helm:v1.0.2'
62+
image: 'docker://bitovi/deploy-eks-helm:v1.0.3'
6063
env:
6164
AWS_REGION: ${{ inputs.aws-region }}
6265
AWS_SECRET_ACCESS_KEY: ${{ inputs.aws-secret-access-key }}
@@ -73,3 +76,4 @@ runs:
7376
HELM_REPOSITORY: ${{ inputs.chart-repository }}
7477
HELM_WAIT: ${{ inputs.helm-wait }}
7578
PLUGINS_LIST: ${{ inputs.plugins }}
79+
HELM_ATOMIC: ${{ inputs.atomic }}

deploy.sh

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ if [ -n "${HELM_WAIT}" ]; then
6161
HELM_COMMAND="${HELM_COMMAND} --wait"
6262
fi
6363

64+
# Add atomic flag
65+
if [ -n "${HELM_ATOMIC}" ]; then
66+
HELM_COMMAND="${HELM_COMMAND} --atomic"
67+
fi
68+
6469
# Set paramaters
6570
for config_file in ${DEPLOY_CONFIG_FILES//,/ }
6671
do

0 commit comments

Comments
 (0)