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

[drone] import should translate invalid characters in secret IDs #116

Open
jimsheldon opened this issue Jun 15, 2023 · 1 comment
Open
Assignees
Labels
bug Something isn't working drone Drone migration target

Comments

@jimsheldon
Copy link
Contributor

Similar to what we did in drone/go-convert#108, the import command for Drone should translate invalid characters to safe characters allowed in Harness secret IDs.

For example, MY-SECRET is valid in Drone, but it is an invalid Harness secret ID. In the Harness API call, MY-SECRET should convert to MY_SECRET (the name of the secret can remain MY-SECRET).

@jimsheldon jimsheldon added bug Something isn't working drone Drone migration target labels Jun 15, 2023
@jimsheldon
Copy link
Contributor Author

It seems this work is still required.

The secret name and ID are created from just the secret name, which can have invalid characters since it comes directly from the export.

https://github.com/harness/harness-migrate/blob/master/internal/migrate/import.go#L101C23-L101C23
https://github.com/harness/harness-migrate/blob/master/internal/util/util.go#L32-L33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working drone Drone migration target
Projects
None yet
Development

No branches or pull requests

2 participants