sourcerepos

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindSourceRepository

func FindSourceRepository(ctx context.Context, jxClient versioned.Interface, ns, owner, name, providerName string) (*v1.SourceRepository, error)

FindSourceRepository returns a SourceRepository for the given namespace, owner, repo name, and (optional) provider name. If no SourceRepository is found, return nil.

func FindSourceRepositoryWithoutProvider

func FindSourceRepositoryWithoutProvider(ctx context.Context, jxClient versioned.Interface, ns, owner, name string) (*v1.SourceRepository, error)

FindSourceRepositoryWithoutProvider returns a SourceRepository for the given namespace, owner and repo name. If no SourceRepository is found, return nil.

func GetOrCreateSourceRepository

func GetOrCreateSourceRepository(ctx context.Context, jxClient versioned.Interface, ns, name, organisation, providerURL string) (*v1.SourceRepository, error)

GetOrCreateSourceRepository gets or creates the SourceRepository for the given repository name and organisation

func GetOrCreateSourceRepositoryCallback

func GetOrCreateSourceRepositoryCallback(ctx context.Context, jxClient versioned.Interface, ns, name, organisation, providerURL string, callback func(*v1.SourceRepository)) (*v1.SourceRepository, error)

GetOrCreateSourceRepositoryCallback gets or creates the SourceRepository for the given repository name and organisation invoking the given callback to modify the resource before create/udpate

func GetRepositoryGitURL

func GetRepositoryGitURL(s *v1.SourceRepository) (string, error)

GetRepositoryGitURL returns the git repository clone URL

func IsIncludedInTheGivenEnvs

func IsIncludedInTheGivenEnvs(environments map[string]*v1.Environment, repository *v1.SourceRepository) bool

IsIncludedInTheGivenEnvs returns true if the given repository is an environment repository

func IsRemoteEnvironmentRepository

func IsRemoteEnvironmentRepository(environments map[string]*v1.Environment, repository *v1.SourceRepository) bool

IsRemoteEnvironmentRepository returns true if the given repository is a remote environment

func ToProviderName

func ToProviderName(gitURL string) string

ToProviderName takes the git URL and converts it to a provider name which can be used as a label selector

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL