gitclient
A Dagger module providing authenticated Git-over-HTTPS clone operations.
Installation
dagger install github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974cEntrypoint
Return Type
Gitclient ! Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
func (m *MyModule) Example() *dagger.Gitclient {
return dag.
Gitclient()
}@function
def example() -> dagger.Gitclient:
return (
dag.gitclient()
)@func()
example(): Gitclient {
return dag
.gitclient()
}Types
Repo 🔗
directory() 🔗
A directory.
Return Type
Directory ! Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
clone --repo string --username string --password env:MYSECRET --ref string \
directoryfunc (m *MyModule) Example(repo string, username string, password *dagger.Secret, ref string) *dagger.Directory {
return dag.
Gitclient().
Clone(repo, username, password, ref).
Directory()
}@function
def example(repo: str, username: str, password: dagger.Secret, ref: str) -> dagger.Directory:
return (
dag.gitclient()
.clone(repo, username, password, ref)
.directory()
)@func()
example(repo: string, username: string, password: Secret, ref: string): Directory {
return dag
.gitclient()
.clone(repo, username, password, ref)
.directory()
}repo() 🔗
Return Type
String ! Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
clone --repo string --username string --password env:MYSECRET --ref string \
repofunc (m *MyModule) Example(ctx context.Context, repo string, username string, password *dagger.Secret, ref string) string {
return dag.
Gitclient().
Clone(repo, username, password, ref).
Repo(ctx)
}@function
async def example(repo: str, username: str, password: dagger.Secret, ref: str) -> str:
return await (
dag.gitclient()
.clone(repo, username, password, ref)
.repo()
)@func()
async example(repo: string, username: string, password: Secret, ref: string): Promise<string> {
return dag
.gitclient()
.clone(repo, username, password, ref)
.repo()
}username() 🔗
Return Type
String ! Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
clone --repo string --username string --password env:MYSECRET --ref string \
usernamefunc (m *MyModule) Example(ctx context.Context, repo string, username string, password *dagger.Secret, ref string) string {
return dag.
Gitclient().
Clone(repo, username, password, ref).
Username(ctx)
}@function
async def example(repo: str, username: str, password: dagger.Secret, ref: str) -> str:
return await (
dag.gitclient()
.clone(repo, username, password, ref)
.username()
)@func()
async example(repo: string, username: string, password: Secret, ref: string): Promise<string> {
return dag
.gitclient()
.clone(repo, username, password, ref)
.username()
}password() 🔗
A reference to a secret value, which can be handled more safely than the value itself.
Return Type
Secret ! Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
clone --repo string --username string --password env:MYSECRET --ref string \
passwordfunc (m *MyModule) Example(repo string, username string, password *dagger.Secret, ref string) *dagger.Secret {
return dag.
Gitclient().
Clone(repo, username, password, ref).
Password()
}@function
def example(repo: str, username: str, password: dagger.Secret, ref: str) -> dagger.Secret:
return (
dag.gitclient()
.clone(repo, username, password, ref)
.password()
)@func()
example(repo: string, username: string, password: Secret, ref: string): Secret {
return dag
.gitclient()
.clone(repo, username, password, ref)
.password()
}addAll() 🔗
Stage all repository changes (git add -A).
Return Type
Repo ! Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
clone --repo string --username string --password env:MYSECRET --ref string \
add-allfunc (m *MyModule) Example(repo string, username string, password *dagger.Secret, ref string) *dagger.GitclientRepo {
return dag.
Gitclient().
Clone(repo, username, password, ref).
AddAll()
}@function
def example(repo: str, username: str, password: dagger.Secret, ref: str) -> dagger.GitclientRepo:
return (
dag.gitclient()
.clone(repo, username, password, ref)
.add_all()
)@func()
example(repo: string, username: string, password: Secret, ref: string): GitclientRepo {
return dag
.gitclient()
.clone(repo, username, password, ref)
.addAll()
}commit() 🔗
Create a commit for staged changes.
Return Type
Repo !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| message | String ! | - | No description provided |
| username | String ! | - | No description provided |
| String ! | - | No description provided |
Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
clone --repo string --username string --password env:MYSECRET --ref string \
commit --message string --username string --email stringfunc (m *MyModule) Example(repo string, username string, password *dagger.Secret, ref string, message string, username1 string, email string) *dagger.GitclientRepo {
return dag.
Gitclient().
Clone(repo, username, password, ref).
Commit(message, username1, email)
}@function
def example(repo: str, username: str, password: dagger.Secret, ref: str, message: str, username1: str, email: str) -> dagger.GitclientRepo:
return (
dag.gitclient()
.clone(repo, username, password, ref)
.commit(message, username1, email)
)@func()
example(repo: string, username: string, password: Secret, ref: string, message: string, username1: string, email: string): GitclientRepo {
return dag
.gitclient()
.clone(repo, username, password, ref)
.commit(message, username1, email)
}push() 🔗
Push the current repository state and return the pushed commit SHA.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| remote | String ! | "origin" | No description provided |
| branch | String ! | "" | No description provided |
Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
clone --repo string --username string --password env:MYSECRET --ref string \
push --remote string --branch stringfunc (m *MyModule) Example(ctx context.Context, repo string, username string, password *dagger.Secret, ref string, remote string, branch string) string {
return dag.
Gitclient().
Clone(repo, username, password, ref).
Push(ctx, remote, branch)
}@function
async def example(repo: str, username: str, password: dagger.Secret, ref: str, remote: str, branch: str) -> str:
return await (
dag.gitclient()
.clone(repo, username, password, ref)
.push(remote, branch)
)@func()
async example(repo: string, username: string, password: Secret, ref: string, remote: string, branch: string): Promise<string> {
return dag
.gitclient()
.clone(repo, username, password, ref)
.push(remote, branch)
}updateWorktree() 🔗
Replace non-.git content while preserving existing .git metadata.
Return Type
Repo !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| worktree | Directory ! | - | A directory. |
Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
clone --repo string --username string --password env:MYSECRET --ref string \
update-worktree --worktree DIR_PATHfunc (m *MyModule) Example(repo string, username string, password *dagger.Secret, ref string, worktree *dagger.Directory) *dagger.GitclientRepo {
return dag.
Gitclient().
Clone(repo, username, password, ref).
UpdateWorktree(worktree)
}@function
def example(repo: str, username: str, password: dagger.Secret, ref: str, worktree: dagger.Directory) -> dagger.GitclientRepo:
return (
dag.gitclient()
.clone(repo, username, password, ref)
.update_worktree(worktree)
)@func()
example(repo: string, username: string, password: Secret, ref: string, worktree: Directory): GitclientRepo {
return dag
.gitclient()
.clone(repo, username, password, ref)
.updateWorktree(worktree)
}worktree() 🔗
Return the repository contents without the .git directory.
Return Type
Directory ! Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
clone --repo string --username string --password env:MYSECRET --ref string \
worktreefunc (m *MyModule) Example(repo string, username string, password *dagger.Secret, ref string) *dagger.Directory {
return dag.
Gitclient().
Clone(repo, username, password, ref).
Worktree()
}@function
def example(repo: str, username: str, password: dagger.Secret, ref: str) -> dagger.Directory:
return (
dag.gitclient()
.clone(repo, username, password, ref)
.worktree()
)@func()
example(repo: string, username: string, password: Secret, ref: string): Directory {
return dag
.gitclient()
.clone(repo, username, password, ref)
.worktree()
}writeFile() 🔗
Create or overwrite a file in the repository worktree.
Return Type
Repo !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | No description provided |
| content | String ! | - | No description provided |
Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
clone --repo string --username string --password env:MYSECRET --ref string \
write-file --path string --content stringfunc (m *MyModule) Example(repo string, username string, password *dagger.Secret, ref string, path string, content string) *dagger.GitclientRepo {
return dag.
Gitclient().
Clone(repo, username, password, ref).
WriteFile(path, content)
}@function
def example(repo: str, username: str, password: dagger.Secret, ref: str, path: str, content: str) -> dagger.GitclientRepo:
return (
dag.gitclient()
.clone(repo, username, password, ref)
.write_file(path, content)
)@func()
example(repo: string, username: string, password: Secret, ref: string, path: string, content: string): GitclientRepo {
return dag
.gitclient()
.clone(repo, username, password, ref)
.writeFile(path, content)
}Gitclient 🔗
clone() 🔗
Clone an HTTPS repository using username + PAT/password auth.
Return Type
Repo !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| repo | String ! | - | No description provided |
| username | String ! | - | No description provided |
| password | Secret ! | - | A reference to a secret value, which can be handled more safely than the value itself. |
| ref | String ! | "main" | No description provided |
Example
dagger -m github.com/ajaegle/daggerverse/gitclient@e5837a01801532d8d3f814cf5c867b609530974c call \
clone --repo string --username string --password env:MYSECRET --ref stringfunc (m *MyModule) Example(repo string, username string, password *dagger.Secret, ref string) *dagger.GitclientRepo {
return dag.
Gitclient().
Clone(repo, username, password, ref)
}@function
def example(repo: str, username: str, password: dagger.Secret, ref: str) -> dagger.GitclientRepo:
return (
dag.gitclient()
.clone(repo, username, password, ref)
)@func()
example(repo: string, username: string, password: Secret, ref: string): GitclientRepo {
return dag
.gitclient()
.clone(repo, username, password, ref)
}