Dagger
Search

gitlab-cli

GitLab CLI is a command-line tool that allows you to interact with the GitLab API.
See https://gitlab.com/gitlab-org/cli for more information.
This module also contains the (deprecated) GitLab Release CLI.
See https://gitlab.com/gitlab-org/release-cli for more information.

Installation

dagger install github.com/vbehar/daggerverse/gitlab-cli@v0.9.0

Entrypoint

Return Type
GitlabCli !
Arguments
NameTypeDefault ValueDescription
privateTokenSecret -private (personal) token to use for authentication with GitLab.
jobTokenSecret -(CI) job token to use for authentication with GitLab. Defined as CI_JOB_TOKEN in the GitLab CI environment.
hostString -host of the GitLab instance.
repoString -default gitlab repository for commands accepting the --repo flag.
groupString -default gitlab group for commands accepting the --group flag.
releaseCliVersionString "v0.18.0"version of the GitLab Release CLI tool to use. https://gitlab.com/gitlab-org/release-cli
Example
func (m *myModule) example() *GitlabCli  {
	return dag.
			GitlabCli()
}

Types

GitlabCli πŸ”—

GitlabCli is a Dagger Module to interact with the GitLab CLI.

privateToken() πŸ”—

Return Type
Secret !
Example
func (m *myModule) example() *Secret  {
	return dag.
			GitlabCli().
			PrivateToken()
}

jobToken() πŸ”—

Return Type
Secret !
Example
func (m *myModule) example() *Secret  {
	return dag.
			GitlabCli().
			JobToken()
}

host() πŸ”—

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			GitlabCli().
			Host(ctx)
}

repo() πŸ”—

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			GitlabCli().
			Repo(ctx)
}

group() πŸ”—

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			GitlabCli().
			Group(ctx)
}

releaseCliVersion() πŸ”—

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			GitlabCli().
			ReleaseCliVersion(ctx)
}

container() πŸ”—

Container returns a container with the GitLab CLI installed.

Return Type
Container !
Example
func (m *myModule) example() *Container  {
	return dag.
			GitlabCli().
			Container()
}

run() πŸ”—

Run runs the glab CLI with the given arguments.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
args[String ! ] -arguments to pass to the glab CLI
ctrContainer -container to use for the command, instead of the default container you can use this to customize the container
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			GitlabCli().
			Run(ctx)
}

release() πŸ”—

Release allows you to interact with GitLab Releases.

Return Type
GitlabCliRelease !
Arguments
NameTypeDefault ValueDescription
tagNameString !-name of the tag.
descriptionFileFile -a file from which to read the release description.
ctrContainer -container to use for the command, instead of the default container you can use this to customize the container
Example
func (m *myModule) example(tagName string) *GitlabCliRelease  {
	return dag.
			GitlabCli().
			Release(tagName)
}

GitlabCliRelease πŸ”—

Release allows you to interact with GitLab Releases.

tagName() πŸ”—

Return Type
String !
Example
func (m *myModule) example(ctx context.Context, tagName string) string  {
	return dag.
			GitlabCli().
			Release(tagName).
			TagName(ctx)
}

descriptionFile() πŸ”—

Return Type
File !
Example
func (m *myModule) example(tagName string) *File  {
	return dag.
			GitlabCli().
			Release(tagName).
			DescriptionFile()
}

ctr() πŸ”—

Return Type
Container !
Example
func (m *myModule) example(tagName string) *Container  {
	return dag.
			GitlabCli().
			Release(tagName).
			Ctr()
}

container() πŸ”—

Container returns a container ready to be used for managing releases.

Return Type
Container !
Example
func (m *myModule) example(tagName string) *Container  {
	return dag.
			GitlabCli().
			Release(tagName).
			Container()
}

create() πŸ”—

CreateRelease creates a new release for the given tag. If the tag doesn’t exist, it will be created - if you also provide a gitRef.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
gitRefString -if the tag should be created, it will be created from this ref. can be a commit or a branch.
Example
func (m *myModule) example(ctx context.Context, tagName string) string  {
	return dag.
			GitlabCli().
			Release(tagName).
			Create(ctx)
}

update() πŸ”—

UpdateRelease updates an existing release for the given tag.

Return Type
String !
Example
func (m *myModule) example(ctx context.Context, tagName string) string  {
	return dag.
			GitlabCli().
			Release(tagName).
			Update(ctx)
}