Skip to content

How to use environment variables in plugin? #5693

Answered by smeeklai
smeeklai asked this question in Q&A
Discussion options

You must be logged in to vote

@alexmt I'm getting below error from your answer

Unable to create application: error converting YAML to JSON: yaml: line 20: found character that cannot start any token

But I finally managed to get it work by doing so

configManagementPlugins: |
    - name: helm-secrets
    init:
        command: ["sh", "-c"]
        args:
        - helm repo add "$HELM_REPO_NAME" "$HELM_REPO_URL" && helm repo update
    generate:
        command: ["sh", "-c"]
        args:
        - helm secrets template -f values.yaml -f envs.yaml -f secrets-encrypted.yaml "$APP_NAME" "$HELM_REPO_NAME"/"$CHART_NAME"

Thank you

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by smeeklai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants