-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Made command dropdown optional in Kubernetes V0 and V1 task #8931
Conversation
@@ -229,6 +229,7 @@ tr.registerMock('./utilities', { | |||
StringWritable: ut.StringWritable, | |||
PackerVersion: ut.PackerVersion, | |||
isGreaterVersion: ut.isGreaterVersion, | |||
setOutputVariable: ut.setOutputVariable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why setoutputVariable?
@@ -70,7 +70,9 @@ function createConfigMap(connection: ClusterConnection, configMapName: string): | |||
command.arg("configmap"); | |||
command.arg(configMapName); | |||
command.line(getConfigMapArguments()); | |||
return connection.execCommand(command); | |||
return connection.execCommand(command).fin(function cleanup() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why function name is cleanup?
@@ -67,7 +67,9 @@ function createDockerRegistrySecret(connection: ClusterConnection, authenticatio | |||
command.arg("--docker-password="+ authenticationToken.getPassword()); | |||
command.arg("--docker-email="+ authenticationToken.getEmail()); | |||
|
|||
return connection.execCommand(command); | |||
return connection.execCommand(command).fin(function cleanup() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, cleanup?
@@ -92,7 +94,9 @@ function createGenericSecret(connection: ClusterConnection, secret: string): any | |||
command.line(secretArguments); | |||
} | |||
|
|||
return connection.execCommand(command); | |||
return connection.execCommand(command).fin(function cleanup() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
Tasks/KubernetesV0/src/utilities.ts
Outdated
export function setOutputVariable(value: string) { | ||
var ouputVariableName = tl.getInput("kubectlOutput", false); | ||
if(ouputVariableName) { | ||
tl.setVariable(ouputVariableName, value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can it cause a secret to get leaked?
@@ -70,7 +71,9 @@ function createConfigMap(connection: ClusterConnection, configMapName: string): | |||
command.arg("configmap"); | |||
command.arg(configMapName); | |||
command.line(getConfigMapArguments()); | |||
return connection.execCommand(command); | |||
return connection.execCommand(command).fin(function cleanup() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
@@ -63,7 +64,9 @@ function createDockerRegistrySecret(connection: ClusterConnection, authenticatio | |||
command.arg("--docker-password="+ authenticationToken.getPassword()); | |||
command.arg("--docker-email="+ authenticationToken.getEmail()); | |||
|
|||
return connection.execCommand(command); | |||
return connection.execCommand(command).fin(function cleanup() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
410af18
to
54b5e3b
Compare
54b5e3b
to
ccf9456
Compare
08fde7c
to
a161008
Compare
b5969c2
to
35884bf
Compare
Right now, output variables are populated only with the output of the kubectl command.
As the command dropdown will be optional now, the output variable if there is no command specified
will be populated with the name of the configmap or secret created.