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

Checks to see if credentialset uses ~/ as user's home directory #2869

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

troy0820
Copy link
Member

What does this change

Checks credentialset to see if the filepath list user's home directory with ~/

What issue does it fix

Closes #1131

Notes for the reviewer

Before:

porter credentials list porter-hello -oyaml
- schemaType: CredentialSet
  schemaVersion: 1.0.1
  namespace: ""
  name: porter-hello
  credentials:
    - name: kubeconfig
      source:
        path: ~/.kube/config
    - name: username
      source:
        env: FAKE_USER
  status:
    created: 2023-08-14T10:03:43.959668445-04:00
    modified: 2023-08-14T10:03:43.959668445-04:00

After:

porter credentials list porter-hello -oyaml
- schemaType: CredentialSet
  schemaVersion: 1.0.1
  namespace: ""
  name: porter-hello
  credentials:
    - name: kubeconfig
      source:
        path: /home/troy0820/.kube/config
    - name: username
      source:
        env: FAKE_USER
  status:
    created: 2023-08-14T10:04:55.919030332-04:00
    modified: 2023-08-14T10:04:55.919030332-04:00

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! πŸ™‡β€β™€οΈ

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

@troy0820
Copy link
Member Author

/azp run porter-integration

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@troy0820 troy0820 force-pushed the troy0820/fix-credset-home-dir branch from 79d02e0 to f1fc849 Compare August 14, 2023 18:04
Copy link
Member

@schristoff schristoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good ty

@ludfjig
Copy link
Contributor

ludfjig commented Aug 14, 2023

tests pass on windows, I am happy :)

@troy0820 troy0820 merged commit d524716 into getporter:main Aug 15, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

porter credentials generate doesn't resolve ~
3 participants