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

Accept special character in yaml key #97

Merged
merged 3 commits into from
Oct 20, 2020
Merged

Accept special character in yaml key #97

merged 3 commits into from
Oct 20, 2020

Conversation

olblak
Copy link
Member

@olblak olblak commented Oct 19, 2020

Accepts special characters in YAML key names.

Remark:
In the current state, a key like agents[0] will always be considered as a position in the array 'agents' instead of a key named 'agents[0]'.

Signed-off-by: Olivier Vernin olivier@vernin.me

Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak olblak added the enhancement New feature or request label Oct 19, 2020
@jetersen
Copy link
Member

Ha I was just about to create an issue 😅

This case is not working for me:

source:
  kind: githubRelease
  spec:
    owner: "argoproj"
    repository: "argo-cd"
    token: "{{ requiredEnv .github.token }}"
    username: "{{ .github.username }}"
    version: "latest"
targets:
  argocd:
    name: argo-cd
    kind: yaml
    prefix: 'https://github.com/argoproj/argo-cd/manifests/cluster-install?ref='
    spec:
      prefix: 'https://github.com/argoproj/argo-cd/manifests/cluster-install?ref='
      file: "apps/argocd/kustomization.yaml"
      key: "bases[0]"
    scm:
      github:
        user: "{{ .github.user }}"
        email: "{{ .github.email }}"
        owner: "{{ .github.owner }}"
        repository: "{{ .github.repository }}"
        token: "{{ requiredEnv .github.token }}"
        username: "{{ .github.username }}"
        branch: "{{ .github.branch }}"

olblak and others added 2 commits October 19, 2020 15:18
Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak
Copy link
Member Author

olblak commented Oct 19, 2020

Ha I was just about to create an issue sweat_smile

This case is not working for me:

source:
  kind: githubRelease
  spec:
    owner: "argoproj"
    repository: "argo-cd"
    token: "{{ requiredEnv .github.token }}"
    username: "{{ .github.username }}"
    version: "latest"
targets:
  argocd:
    name: argo-cd
    kind: yaml
    prefix: 'https://github.com/argoproj/argo-cd/manifests/cluster-install?ref='
    spec:
      prefix: 'https://github.com/argoproj/argo-cd/manifests/cluster-install?ref='
      file: "apps/argocd/kustomization.yaml"
      key: "bases[0]"
    scm:
      github:
        user: "{{ .github.user }}"
        email: "{{ .github.email }}"
        owner: "{{ .github.owner }}"
        repository: "{{ .github.repository }}"
        token: "{{ requiredEnv .github.token }}"
        username: "{{ .github.username }}"
        branch: "{{ .github.branch }}"

Your case is definitely a bug as it should already be working. At least I am using similar configuration.

The current PR is to automate key value that looks like this ''

@olblak olblak merged commit a7af41e into master Oct 20, 2020
@olblak olblak deleted the special_character branch November 18, 2020 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants