gitlab
No long description provided.
Installation
dagger install github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8Entrypoint
Return Type
Gitlab Example
dagger -m github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8 call \
func (m *MyModule) Example() *dagger.Gitlab {
return dag.
Gitlab()
}@function
def example() -> dagger.Gitlab:
return (
dag.gitlab()
)@func()
example(): Gitlab {
return dag
.gitlab()
}Types
Gitlab 🔗
cloneWithToken() 🔗
Clone clones a git repo using a container and returns the Directory
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| repoUrl | String ! | - | No description provided |
| token | Secret ! | - | No description provided |
| branch | String ! | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8 call \
clone-with-token --repo-url string --token env:MYSECRET --branch stringfunc (m *MyModule) Example(repoUrl string, token *dagger.Secret, branch string) *dagger.Directory {
return dag.
Gitlab().
CloneWithToken(repoUrl, token, branch)
}@function
def example(repo_url: str, token: dagger.Secret, branch: str) -> dagger.Directory:
return (
dag.gitlab()
.clone_with_token(repo_url, token, branch)
)@func()
example(repoUrl: string, token: Secret, branch: string): Directory {
return dag
.gitlab()
.cloneWithToken(repoUrl, token, branch)
}getMergeRequestId() 🔗
GetMergeRequestID finds the MR ID (IID) by title
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| token | Secret ! | - | No description provided |
| server | String ! | - | No description provided |
| projectId | String ! | - | No description provided |
| mergeRequestTitle | String ! | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8 call \
get-merge-request-id --token env:MYSECRET --server string --project-id string --merge-request-title stringfunc (m *MyModule) Example(ctx context.Context, token *dagger.Secret, server string, projectId string, mergeRequestTitle string) string {
return dag.
Gitlab().
GetMergeRequestId(ctx, token, server, projectId, mergeRequestTitle)
}@function
async def example(token: dagger.Secret, server: str, project_id: str, merge_request_title: str) -> str:
return await (
dag.gitlab()
.get_merge_request_id(token, server, project_id, merge_request_title)
)@func()
async example(token: Secret, server: string, projectId: string, mergeRequestTitle: string): Promise<string> {
return dag
.gitlab()
.getMergeRequestId(token, server, projectId, mergeRequestTitle)
}getProjectId() 🔗
GetProjectID looks up a project ID by its name and group path
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| server | String ! | - | No description provided |
| token | Secret ! | - | No description provided |
| projectName | String ! | - | e.g., "resource-engines" |
| groupPath | String ! | - | e.g., "Lab/stuttgart-things/idp" |
Example
dagger -m github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8 call \
get-project-id --server string --token env:MYSECRET --project-name string --group-path stringfunc (m *MyModule) Example(ctx context.Context, server string, token *dagger.Secret, projectName string, groupPath string) string {
return dag.
Gitlab().
GetProjectId(ctx, server, token, projectName, groupPath)
}@function
async def example(server: str, token: dagger.Secret, project_name: str, group_path: str) -> str:
return await (
dag.gitlab()
.get_project_id(server, token, project_name, group_path)
)@func()
async example(server: string, token: Secret, projectName: string, groupPath: string): Promise<string> {
return dag
.gitlab()
.getProjectId(server, token, projectName, groupPath)
}listGitlabPipelines() 🔗
ListGitlabPipelines lists CI/CD pipelines for a GitLab project using the glab CLI. Returns the pipeline list as JSON.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| repository | String ! | - | GitLab project path in format "group/project" or "group/subgroup/project" |
| token | Secret ! | - | GitLab token for authentication |
| gitlabHost | String | "gitlab.com" | GitLab host (e.g., "gitlab.com" or custom instance) |
| ref | String | - | Filter by branch or ref |
| status | String | - | Filter by pipeline status (running, pending, success, failed, canceled, skipped, created, manual) |
Example
dagger -m github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8 call \
list-gitlab-pipelines --repository string --token env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, repository string, token *dagger.Secret) string {
return dag.
Gitlab().
ListGitlabPipelines(ctx, repository, token)
}@function
async def example(repository: str, token: dagger.Secret) -> str:
return await (
dag.gitlab()
.list_gitlab_pipelines(repository, token)
)@func()
async example(repository: string, token: Secret): Promise<string> {
return dag
.gitlab()
.listGitlabPipelines(repository, token)
}listMergeRequestChanges() 🔗
ListMergeRequestChanges lists changed files between MR source and target branch
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| server | String ! | - | No description provided |
| token | Secret ! | - | No description provided |
| projectId | String ! | - | No description provided |
| mergeRequestId | String ! | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8 call \
list-merge-request-changes --server string --token env:MYSECRET --project-id string --merge-request-id stringfunc (m *MyModule) Example(ctx context.Context, server string, token *dagger.Secret, projectId string, mergeRequestId string) []string {
return dag.
Gitlab().
ListMergeRequestChanges(ctx, server, token, projectId, mergeRequestId)
}@function
async def example(server: str, token: dagger.Secret, project_id: str, merge_request_id: str) -> List[str]:
return await (
dag.gitlab()
.list_merge_request_changes(server, token, project_id, merge_request_id)
)@func()
async example(server: string, token: Secret, projectId: string, mergeRequestId: string): Promise<string[]> {
return dag
.gitlab()
.listMergeRequestChanges(server, token, projectId, mergeRequestId)
}listMergeRequests() 🔗
ListMergeRequests fetches all MRs for a given project
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| server | String ! | - | No description provided |
| token | Secret ! | - | No description provided |
| projectId | String ! | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8 call \
list-merge-requests --server string --token env:MYSECRET --project-id stringfunc (m *MyModule) Example(ctx context.Context, server string, token *dagger.Secret, projectId string) string {
return dag.
Gitlab().
ListMergeRequests(ctx, server, token, projectId)
}@function
async def example(server: str, token: dagger.Secret, project_id: str) -> str:
return await (
dag.gitlab()
.list_merge_requests(server, token, project_id)
)@func()
async example(server: string, token: Secret, projectId: string): Promise<string> {
return dag
.gitlab()
.listMergeRequests(server, token, projectId)
}listProjects() 🔗
ListProjects lists all projects in a given group (with pagination)
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| server | String ! | - | No description provided |
| token | Secret ! | - | No description provided |
| groupPath | String ! | - | already escaped: "Lab%2Fstuttgart-things%2Fidp" |
Example
dagger -m github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8 call \
list-projects --server string --token env:MYSECRET --group-path stringfunc (m *MyModule) Example(ctx context.Context, server string, token *dagger.Secret, groupPath string) string {
return dag.
Gitlab().
ListProjects(ctx, server, token, groupPath)
}@function
async def example(server: str, token: dagger.Secret, group_path: str) -> str:
return await (
dag.gitlab()
.list_projects(server, token, group_path)
)@func()
async example(server: string, token: Secret, groupPath: string): Promise<string> {
return dag
.gitlab()
.listProjects(server, token, groupPath)
}printMergeRequestFileChanges() 🔗
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| repoUrl | String ! | - | No description provided |
| server | String ! | - | No description provided |
| token | Secret ! | - | No description provided |
| projectId | String ! | - | No description provided |
| mergeRequestId | String ! | - | No description provided |
| branch | String ! | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8 call \
print-merge-request-file-changes --repo-url string --server string --token env:MYSECRET --project-id string --merge-request-id string --branch stringfunc (m *MyModule) Example(ctx context.Context, repoUrl string, server string, token *dagger.Secret, projectId string, mergeRequestId string, branch string) {
return dag.
Gitlab().
PrintMergeRequestFileChanges(ctx, repoUrl, server, token, projectId, mergeRequestId, branch)
}@function
async def example(repo_url: str, server: str, token: dagger.Secret, project_id: str, merge_request_id: str, branch: str) -> None:
return await (
dag.gitlab()
.print_merge_request_file_changes(repo_url, server, token, project_id, merge_request_id, branch)
)@func()
async example(repoUrl: string, server: string, token: Secret, projectId: string, mergeRequestId: string, branch: string): Promise<void> {
return dag
.gitlab()
.printMergeRequestFileChanges(repoUrl, server, token, projectId, mergeRequestId, branch)
}updateMergeRequestState() 🔗
UpdateMergeRequestState updates the state of a Merge Request (e.g., merge, close)
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| server | String ! | - | No description provided |
| token | Secret ! | - | No description provided |
| projectId | String ! | - | No description provided |
| mergeRequestId | String ! | - | No description provided |
| action | String ! | - | "merge" or "close" |
Example
dagger -m github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8 call \
update-merge-request-state --server string --token env:MYSECRET --project-id string --merge-request-id string --action stringfunc (m *MyModule) Example(ctx context.Context, server string, token *dagger.Secret, projectId string, mergeRequestId string, action string) {
return dag.
Gitlab().
UpdateMergeRequestState(ctx, server, token, projectId, mergeRequestId, action)
}@function
async def example(server: str, token: dagger.Secret, project_id: str, merge_request_id: str, action: str) -> None:
return await (
dag.gitlab()
.update_merge_request_state(server, token, project_id, merge_request_id, action)
)@func()
async example(server: string, token: Secret, projectId: string, mergeRequestId: string, action: string): Promise<void> {
return dag
.gitlab()
.updateMergeRequestState(server, token, projectId, mergeRequestId, action)
}waitForGitlabPipeline() 🔗
WaitForGitlabPipeline waits for a GitLab pipeline to reach a terminal state (success, failed, canceled, or skipped) by polling the GitLab API. Returns the full pipeline JSON response once the pipeline completes.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| repository | String ! | - | GitLab project path in format "group/project" or "group/subgroup/project" |
| pipelineId | String ! | - | Pipeline ID to wait for |
| token | Secret ! | - | GitLab token for authentication |
| gitlabHost | String | "gitlab.com" | GitLab host (e.g., "gitlab.com" or custom instance) |
| interval | Integer | 10 | Polling interval in seconds |
| timeout | Integer | 600 | Timeout in seconds |
Example
dagger -m github.com/stuttgart-things/dagger/gitlab@71f480dc5edb656e9afa96d86f234ebd154737b8 call \
wait-for-gitlab-pipeline --repository string --pipeline-id string --token env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, repository string, pipelineId string, token *dagger.Secret) string {
return dag.
Gitlab().
WaitForGitlabPipeline(ctx, repository, pipelineId, token)
}@function
async def example(repository: str, pipeline_id: str, token: dagger.Secret) -> str:
return await (
dag.gitlab()
.wait_for_gitlab_pipeline(repository, pipeline_id, token)
)@func()
async example(repository: string, pipelineId: string, token: Secret): Promise<string> {
return dag
.gitlab()
.waitForGitlabPipeline(repository, pipelineId, token)
}