Skip to content

Commit

Permalink
Add cloudDomain header when deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
andscoop committed Jul 18, 2018
1 parent 0b7e1ca commit fc9a989
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions airflow/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,18 @@ func Deploy(path, name, wsId string) error {
return errors.New(messages.HOUSTON_NO_DEPLOYMENTS_ERROR)
}

cloudDomain := config.CFG.CloudDomain.GetString()
fmt.Printf(messages.HOUSTON_DEPLOYMENT_HEADER, cloudDomain)
fmt.Println(messages.HOUSTON_SELECT_DEPLOYMENT_PROMPT)

deployMap := map[string]houston.Deployment{}
fmt.Println(messages.HOUSTON_SELECT_DEPLOYMENT_PROMT)
for i, deployment := range deployments {
index := i + 1
deployMap[strconv.Itoa(index)] = deployment
fmt.Printf("%d) %s (%s)\n", index, deployment.Label, deployment.ReleaseName)
}

choice := input.InputText("")
choice := input.InputText("\n> ")
selected, ok := deployMap[choice]
if !ok {
return errors.New(messages.HOUSTON_INVALID_DEPLOYMENT_KEY)
Expand Down
3 changes: 2 additions & 1 deletion messages/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ var (
EE_LINK_FLOWER = "Flower Dashboard: https://%s-flower.%s"

HOUSTON_BASIC_AUTH_DISABLED = "Basic authentication is disabled, conact administrator or defer back to oAuth"
HOUSTON_DEPLOYMENT_HEADER = "Authenticated to %s \n\n"
HOUSTON_DEPLOYING_PROMPT = "Deploying: %s\n"
HOUSTON_DEPLOYMENT_CREATE_SUCCESS = "Successfully created %s\n"
HOUSTON_DEPLOYMENT_DELETE_SUCCESS = "Successfully deleted %s\n"
HOUSTON_DEPLOYMENT_UPDATE_SUCCESS = "Successfully updated deployment %s"
HOUSTON_NO_DEPLOYMENTS_ERROR = "No airflow deployments found"
HOUSTON_SELECT_DEPLOYMENT_PROMT = "Select which airflow deployment you want to deploy to:"
HOUSTON_SELECT_DEPLOYMENT_PROMPT = "Select which airflow deployment you want to deploy to:"
HOUSTON_OAUTH_REDIRECT = "Please visit the following URL, authenticate and paste token in next prompt\n"
HOUSTON_OAUTH_DISABLED = "OAuth is disabled, contact administrator or defer to basic auth\n"
HOUSTON_INVALID_DEPLOYMENT_KEY = "Invalid deployment selection\n"
Expand Down

0 comments on commit fc9a989

Please sign in to comment.