Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

( is not a valid word #1590

Closed
dmitry-mightydevops opened this issue Apr 11, 2024 · 2 comments
Closed

( is not a valid word #1590

dmitry-mightydevops opened this issue Apr 11, 2024 · 2 comments
Labels
state: duplicate Duplicates another issue.

Comments

@dmitry-mightydevops
Copy link

Issue

➜ export ENV=prod
➜ task -l       
1:12: ( is not a valid word

however I can easily run both targets:

  • task helm:render -- apps backend
  • task helm:encrypt secret=hello

At the same time if install task via DNF sudo dnf install go-task then I get proper output:

go-task --version
Task version: unknown

➜ go-task -l               
task: Available tasks for this project:
* helm:encrypt:       Encrypt secret with AWS KMS keys to be used in gitops, ex: task helm:encrypt secret=value
* helm:render:        Render argocd app manifest

Taskfile.yml

version: '3'

dotenv: ['.env', '.env.{{.ENV}}']

includes:
  helm: taskfiles/helm.tasks.yaml

taskfiles/helm.tasks.yaml

version: '3'

tasks:
  encrypt:
    desc: 'Encrypt secret with AWS KMS keys to be used in gitops, ex: task helm:encrypt secret=value'
    cmds:
      - |
        encrypted=$(
          AWS_PROFILE={{.aws_profile}} aws kms encrypt \
          --region {{.aws_region}} \
          --key-id alias/{{.helm_kms_key}} \
          --plaintext $(echo -n {{.secret}} | base64 -w 0) \
          --output text --query CiphertextBlob \
          | tr '/+' '_-'
        )

        echo "ref+awskms://$encrypted?key=alias%2F{{.helm_kms_key}}"
    silent: true

  render:
    desc: 'Render argocd app manifest'
    dir: '{{.folder}}/{{.ENV}}'
    vars:
      folder: '{{ index ($x:=splitArgs .CLI_ARGS) 0 }}'
      app: '{{ index ($x:=splitArgs .CLI_ARGS) 1 }}'
    cmds:
      - |
        helm dependency build --skip-refresh \
        && helm template . -f values.yaml -f values.ci.yaml \
          | yq 'select(.metadata.name=="{{.app}}")'
    silent: true

.env

client=client
aws_region=us-west-2

.env.prod

environment=prod
aws_profile=client/prod/administrators
helm_kms_key=client-prod-eks-helm-secrets-kms-key

  • Task version:
✗  task --version
Task version: v3.36.0 (h1:XVJ5hQ5hdzTAulHpAGzbUMUuYr9MUOEQFOFazI3hUsY=)
  • Operating system:
➜ uname -a 
Linux dmitry-desktop 6.7.5-100.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Feb 17 17:21:49 UTC 2024 x86_64 GNU/Linux
  • Experiments enabled:
    N/A
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Apr 11, 2024
@vergenzt
Copy link
Contributor

Duplicate of #1551 and fixed by #1584 😄

@andreynering andreynering added state: duplicate Duplicates another issue. and removed state: needs triage Waiting to be triaged by a maintainer. labels Apr 18, 2024
@andreynering andreynering closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2024
@dmitry-mightydevops
Copy link
Author

has it been released @vergenzt ?

➜ task --version                                                  
Task version: v3.36.0 (h1:XVJ5hQ5hdzTAulHpAGzbUMUuYr9MUOEQFOFazI3hUsY=)

fails with the given Taskfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: duplicate Duplicates another issue.
Projects
None yet
Development

No branches or pull requests

4 participants