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

Add --ssh-public-key flag for create cluster aws command to use custo… #2610

Merged
merged 10 commits into from
Jan 14, 2019

Conversation

StephenWangasg
Copy link

Add --ssh-public-key flag to "jx create cluster aws" command to use a pub key from a location rather the default ~/.ssh/id_rsa.pub

@jenkins-x-bot
Copy link
Contributor

Hi @StephenWangasg. Thanks for your PR.

I'm waiting for a jenkins-x member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rawlingsj
Copy link
Member

/ok-to-test

@rawlingsj
Copy link
Member

/lgtm

@ccojocar
Copy link
Contributor

ccojocar commented Jan 9, 2019

/test this

@jenkins-x-bot jenkins-x-bot removed the lgtm label Jan 9, 2019
@@ -44,6 +44,7 @@ type CreateClusterAWSFlags struct {
NodeSize string
MasterSize string
State string
SshPublicKey string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

struct field SshPublicKey should be SSHPublicKey

@@ -488,14 +488,14 @@ func (options *ImportOptions) DraftCreate() error {
return err
}

provider, err := gits.CreateProvider(options.GitServer, options.GitUserAuth, options.Git())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. options.GitProvider is already created before calling DraftCreate(). No need to create provider here.
  2. In case you run import via 'jx import --org orgname --github' and call the import in 2nd pass, options.GitUserAuth is nil, this ends up a crash here.

if options.Organisation == "" {
gitUsername := options.GitUserAuth.Username
options.Organisation, err = gits.GetOwner(options.BatchMode, provider, gitUsername, options.In, options.Out, options.Err)
options.Organisation, err = gits.GetOwner(options.BatchMode, options.GitProvider, gitUsername, options.In, options.Out, options.Err)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since options.GitProvider is for sure created before you call DraftCreate(), just use it here.

@StephenWangasg
Copy link
Author

Any updates on this?

@rawlingsj
Copy link
Member

sorry, we were having some infra issues, think that's all resolved now so fingers crossed this will go through now

@rawlingsj
Copy link
Member

/test this

@@ -15,7 +15,7 @@ import (
"github.com/jenkins-x/jx/pkg/log"
"github.com/jenkins-x/jx/pkg/util"
"github.com/spf13/cobra"
"gopkg.in/AlecAivazis/survey.v1"
"gopkg.in/AlecAivazis/survey.v1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong alignment

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

@jenkins-x-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ccojocar, rawlingsj

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ccojocar
Copy link
Contributor

/test this

@jenkins-x-bot jenkins-x-bot merged commit dddaaa9 into jenkins-x:master Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants