We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug It is possible to shadow the available vars by changing the casing of the vars: variable.
vars:
To reproduce
--- kind: pipeline type: docker name: default steps: - name: gke image: nytimes/drone-gke pull: always environment: TOKEN: from_secret: GOOGLE_CREDENTIALS settings: dry_run: true verbose: true zone: us-east1-b cluster: test namespace: test vars: NAMESPACE: "override"
Proceeds successfully:
---START VARIABLES AVAILABLE FOR ALL TEMPLATES--- { "BRANCH": "test", "BUILD_NUMBER": "78", "COMMIT": "xxx", "NAMESPACE": "override", "TAG": "", "cluster": "test", "namespace": "test", "project": "my-project-x", "zone": "us-east1-b" } ---END VARIABLES AVAILABLE FOR ALL TEMPLATES---
Expected behavior Should error out with Error: var "namespace" shadows existing var.
Error: var "namespace" shadows existing var
Version (please complete the following information):
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.9", GitCommit:"2e808b7cb054ee242b68e62455323aa783991f03", GitTreeState:"clean", BuildDate:"2020-01-18T23:33:14Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.12-gke.16", GitCommit:"013d168bdbdca7bc365fae800272aede20848d7e", GitTreeState:"clean", BuildDate:"2020-07-29T03:47:52Z", GoVersion:"go1.12.17b4", Compiler:"gc", Platform:"linux/amd64"}
Additional context
Potential fix: lowercase all variables when comparing for shadowing.
https://github.com/nytimes/drone-gke/blob/master/main.go#L430 https://github.com/nytimes/drone-gke/blob/master/main.go#L514 https://github.com/nytimes/drone-gke/blob/master/main.go#L532
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
It is possible to shadow the available vars by changing the casing of the
vars:
variable.To reproduce
Proceeds successfully:
Expected behavior
Should error out with
Error: var "namespace" shadows existing var
.Version (please complete the following information):
Additional context
Potential fix: lowercase all variables when comparing for shadowing.
https://github.com/nytimes/drone-gke/blob/master/main.go#L430
https://github.com/nytimes/drone-gke/blob/master/main.go#L514
https://github.com/nytimes/drone-gke/blob/master/main.go#L532
The text was updated successfully, but these errors were encountered: