-
Notifications
You must be signed in to change notification settings - Fork 43
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
Allow to use local services area via optional parameter #1269
base: master
Are you sure you want to change the base?
Conversation
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.
Valentin, I have a general comment on this script which is, whenever I have to use it, I don't pass the <env>
option and I simply rely on it to be self-discovered by the script and my environment. In that scenario, we might have a mix up of parameters 3 and 4 (aka. positional arguments).
So, I think to have a clear and solid script option, we should either:
a) remove the env
option and always rely on the environment for the correct execution
b) or, make it keyword arguments, e.g. -t <tag> -e <env> -p <services_path>
etc
What do you think? @muhammadimranfarooqi and @arooshap might have a different view as well.
@muhammadimranfarooqi from line 4, we need to provide >= 2 parameters. Thus, running it only with the service name and the tag works just fine. |
@@ -2,7 +2,7 @@ | |||
# helper script to deploy given service with given tag to k8s infrastructure | |||
|
|||
if [ $# -lt 2 ]; then | |||
echo "The required parameters for service and tag are missing. Please use deploy-srv.sh <service> <tag> <env> " |
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.
@amaltaro Yes, this can cause a mixup of parameters 3 and 4. I think rather than removing the env variable entirely, we can make the script take keyword arguments because when you're doing multiple deployments at the same time, it helps to make sure that you are deploying in the correct environment.
I implemented script variables, please see updated code. For simplify here is a stand-alone script to demonstrate how it works (I name this script as t.sh):
If you'll run it you'll see something like this:
@muhammadimranfarooqi , @arooshap please review and test these changes by yourself in your own environment and report if everything is fine and you are satisfied with them (i.e. I mean try your wokrflows and test with multiple setups). @amaltaro please provide your feedback as user if you are satisfied with proposed solution. |
Hi @vkuznet, I have tested this script separately on many instances, and it works as expected. |
@arooshap , I'm in favor of merging this PR but I will let Alan to confirm if it is ready or will require further adjustments. |
No description provided.