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.5.0
Entrypoint
Return Type
GitlabCli !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
privateToken | Secret | - | private (personal) token to use for authentication with GitLab. |
jobToken | Secret | - | (CI) job token to use for authentication with GitLab. Defined as CI_JOB_TOKEN in the GitLab CI environment. |
host | String | - | host of the GitLab instance. |
repo | String | - | default gitlab repository for commands accepting the --repo flag. |
group | String | - | default gitlab group for commands accepting the --group flag. |
releaseCliVersion | String | "v0.18.0" | version of the GitLab Release CLI tool to use. https://gitlab.com/gitlab-org/release-cli |
Example
dagger -m github.com/vbehar/daggerverse/gitlab-cli@96c205a08a7381709712e89ddede7d45c017b7c8 call \
func (m *myModule) example() *GitlabCli {
return dag.
GitlabCli()
}
@function
def example() -> dag.GitlabCli:
return (
dag.gitlab_cli()
)
@func()
example(): GitlabCli {
return dag
.gitlabCli()
}
Types
GitlabCli 🔗
GitlabCli is a Dagger Module to interact with the GitLab CLI.
privateToken() 🔗
Return Type
Secret !
Example
dagger -m github.com/vbehar/daggerverse/gitlab-cli@96c205a08a7381709712e89ddede7d45c017b7c8 call \
private-token
func (m *myModule) example() *Secret {
return dag.
GitlabCli().
PrivateToken()
}
@function
def example() -> dagger.Secret:
return (
dag.gitlab_cli()
.private_token()
)
@func()
example(): Secret {
return dag
.gitlabCli()
.privateToken()
}
jobToken() 🔗
Return Type
Secret !
Example
dagger -m github.com/vbehar/daggerverse/gitlab-cli@96c205a08a7381709712e89ddede7d45c017b7c8 call \
job-token
func (m *myModule) example() *Secret {
return dag.
GitlabCli().
JobToken()
}
@function
def example() -> dagger.Secret:
return (
dag.gitlab_cli()
.job_token()
)
@func()
example(): Secret {
return dag
.gitlabCli()
.jobToken()
}
host() 🔗
Return Type
String !
Example
dagger -m github.com/vbehar/daggerverse/gitlab-cli@96c205a08a7381709712e89ddede7d45c017b7c8 call \
host
func (m *myModule) example(ctx context.Context) string {
return dag.
GitlabCli().
Host(ctx)
}
@function
async def example() -> str:
return await (
dag.gitlab_cli()
.host()
)
@func()
async example(): Promise<string> {
return dag
.gitlabCli()
.host()
}
repo() 🔗
Return Type
String !
Example
dagger -m github.com/vbehar/daggerverse/gitlab-cli@96c205a08a7381709712e89ddede7d45c017b7c8 call \
repo
func (m *myModule) example(ctx context.Context) string {
return dag.
GitlabCli().
Repo(ctx)
}
@function
async def example() -> str:
return await (
dag.gitlab_cli()
.repo()
)
@func()
async example(): Promise<string> {
return dag
.gitlabCli()
.repo()
}
group() 🔗
Return Type
String !
Example
dagger -m github.com/vbehar/daggerverse/gitlab-cli@96c205a08a7381709712e89ddede7d45c017b7c8 call \
group
func (m *myModule) example(ctx context.Context) string {
return dag.
GitlabCli().
Group(ctx)
}
@function
async def example() -> str:
return await (
dag.gitlab_cli()
.group()
)
@func()
async example(): Promise<string> {
return dag
.gitlabCli()
.group()
}
releaseCliVersion() 🔗
Return Type
String !
Example
dagger -m github.com/vbehar/daggerverse/gitlab-cli@96c205a08a7381709712e89ddede7d45c017b7c8 call \
release-cli-version
func (m *myModule) example(ctx context.Context) string {
return dag.
GitlabCli().
ReleaseCliVersion(ctx)
}
@function
async def example() -> str:
return await (
dag.gitlab_cli()
.release_cli_version()
)
@func()
async example(): Promise<string> {
return dag
.gitlabCli()
.releaseCliVersion()
}
container() 🔗
Container returns a container with the GitLab CLI installed.
Return Type
Container !
Example
dagger -m github.com/vbehar/daggerverse/gitlab-cli@96c205a08a7381709712e89ddede7d45c017b7c8 call \
container
func (m *myModule) example() *Container {
return dag.
GitlabCli().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.gitlab_cli()
.container()
)
@func()
example(): Container {
return dag
.gitlabCli()
.container()
}
run() 🔗
Run runs the glab CLI with the given arguments.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
args | [String ! ] | - | arguments to pass to the glab CLI |
ctr | Container | - | container to use for the command, instead of the default container you can use this to customize the container |
Example
dagger -m github.com/vbehar/daggerverse/gitlab-cli@96c205a08a7381709712e89ddede7d45c017b7c8 call \
run
func (m *myModule) example(ctx context.Context) string {
return dag.
GitlabCli().
Run(ctx)
}
@function
async def example() -> str:
return await (
dag.gitlab_cli()
.run()
)
@func()
async example(): Promise<string> {
return dag
.gitlabCli()
.run()
}
createRelease() 🔗
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
Name | Type | Default Value | Description |
---|---|---|---|
tagName | String ! | - | name of the tag. can be an existing tag, or a new tag to create. |
gitRef | String | - | if the tag should be created, it will be created from this ref. can be a commit or a branch. |
descriptionFile | File | - | a file from which to read the release description. |
ctr | Container | - | container to use for the command, instead of the default container you can use this to customize the container |
Example
dagger -m github.com/vbehar/daggerverse/gitlab-cli@96c205a08a7381709712e89ddede7d45c017b7c8 call \
create-release --tag-name string
func (m *myModule) example(ctx context.Context, tagName string) string {
return dag.
GitlabCli().
CreateRelease(ctx, tagName)
}
@function
async def example(tag_name: str) -> str:
return await (
dag.gitlab_cli()
.create_release(tag_name)
)
@func()
async example(tagName: string): Promise<string> {
return dag
.gitlabCli()
.createRelease(tagName)
}
updateRelease() 🔗
UpdateRelease updates an existing release for the given tag.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
tagName | String ! | - | name of the tag. |
descriptionFile | File | - | a file from which to read the release description. |
ctr | Container | - | container to use for the command, instead of the default container you can use this to customize the container |
Example
dagger -m github.com/vbehar/daggerverse/gitlab-cli@96c205a08a7381709712e89ddede7d45c017b7c8 call \
update-release --tag-name string
func (m *myModule) example(ctx context.Context, tagName string) string {
return dag.
GitlabCli().
UpdateRelease(ctx, tagName)
}
@function
async def example(tag_name: str) -> str:
return await (
dag.gitlab_cli()
.update_release(tag_name)
)
@func()
async example(tagName: string): Promise<string> {
return dag
.gitlabCli()
.updateRelease(tagName)
}