jx: github.com/jenkins-x/jx/pkg/cmd/importcmd Index | Files

package importcmd

import "github.com/jenkins-x/jx/pkg/cmd/importcmd"


Package Files



const (
    // DeployKindKnative for knative serve based deployments
    DeployKindKnative = "knative"

    // DeployKindDefault for default kubernetes Deployment + Service deployment kinds
    DeployKindDefault = "default"

func NewCmdImport Uses

func NewCmdImport(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdImport the cobra command for jx import

type CallbackFn Uses

type CallbackFn func() error

CallbackFn callback function

type ImportOptions Uses

type ImportOptions struct {

    RepoURL string

    Dir                     string
    Organisation            string
    Repository              string
    Credentials             string
    AppName                 string
    GitHub                  bool
    DryRun                  bool
    SelectAll               bool
    DisableDraft            bool
    DisableJenkinsfileCheck bool
    DisableWebhooks         bool
    SelectFilter            string
    Jenkinsfile             string
    BranchPattern           string
    GitRepositoryOptions    gits.GitRepositoryOptions
    ImportGitCommitMessage  string
    ListDraftPacks          bool
    DraftPack               string
    DockerRegistryOrg       string
    GitDetails              gits.CreateRepoData
    DeployKind              string
    SchedulerName           string

    DisableDotGitSearch   bool
    InitialisedGit        bool
    Jenkins               gojenkins.JenkinsClient
    GitConfDir            string
    GitServer             *auth.AuthServer
    GitUserAuth           *auth.UserAuth
    GitProvider           gits.GitProvider
    PostDraftPackCallback CallbackFn
    DisableMaven          bool
    PipelineUserName      string
    PipelineServer        string
    ImportMode            string
    UseDefaultGit         bool

ImportOptions options struct for jx import

func (*ImportOptions) AddImportFlags Uses

func (options *ImportOptions) AddImportFlags(cmd *cobra.Command, createProject bool)

func (*ImportOptions) CloneRepository Uses

func (options *ImportOptions) CloneRepository() error

CloneRepository clones a repository

func (*ImportOptions) ConfigureImportOptions Uses

func (options *ImportOptions) ConfigureImportOptions(repoData *gits.CreateRepoData)

ConfigureImportOptions updates the import options struct based on values from the create repo struct

func (*ImportOptions) CreateNewRemoteRepository Uses

func (options *ImportOptions) CreateNewRemoteRepository() error

CreateNewRemoteRepository creates a new remote repository

func (*ImportOptions) CreateProwOwnersAliasesFile Uses

func (options *ImportOptions) CreateProwOwnersAliasesFile() error

CreateProwOwnersAliasesFile creates an OWNERS_ALIASES file in the root of the project assigning the current Git user as an approver and a reviewer.

func (*ImportOptions) CreateProwOwnersFile Uses

func (options *ImportOptions) CreateProwOwnersFile() error

CreateProwOwnersFile creates an OWNERS file in the root of the project assigning the current Git user as an approver and a reviewer. If the file already exists, does nothing.

func (*ImportOptions) DefaultGitIgnore Uses

func (options *ImportOptions) DefaultGitIgnore() error

DefaultGitIgnore creates a default .gitignore

func (*ImportOptions) DefaultsFromTeamSettings Uses

func (options *ImportOptions) DefaultsFromTeamSettings() error

func (*ImportOptions) DiscoverGit Uses

func (options *ImportOptions) DiscoverGit() error

DiscoverGit checks if there is a git clone or prompts the user to import it

func (*ImportOptions) DiscoverRemoteGitURL Uses

func (options *ImportOptions) DiscoverRemoteGitURL() error

DiscoverRemoteGitURL finds the git url by looking in the directory and looking for a .git/config file

func (*ImportOptions) DraftCreate Uses

func (options *ImportOptions) DraftCreate() error

DraftCreate creates a draft

func (*ImportOptions) GetGitRepositoryDetails Uses

func (options *ImportOptions) GetGitRepositoryDetails() (*gits.CreateRepoData, error)

GetGitRepositoryDetails determines the git repository details to use during the import command

func (*ImportOptions) GetOrganisation Uses

func (options *ImportOptions) GetOrganisation() string

GetOrganisation gets the organisation from the RepoURL (if in the github format of github.com/org/repo). It will do this in preference to the Organisation field (if set). If the repo URL does not implicitly specify an organisation then the Organisation specified in the options is used.

func (*ImportOptions) ImportProjectsFromGitHub Uses

func (options *ImportOptions) ImportProjectsFromGitHub() error

ImportProjectsFromGitHub import projects from github

func (*ImportOptions) ReplacePlaceholders Uses

func (options *ImportOptions) ReplacePlaceholders(gitServerName, dockerRegistryOrg string) error

ReplacePlaceholders replaces app name, git server name, git org, and docker registry org placeholders

func (*ImportOptions) Run Uses

func (options *ImportOptions) Run() error

Run executes the command

Package importcmd imports 35 packages (graph) and is imported by 3 packages. Updated 2019-11-15. Refresh now. Tools for package owners.