Dagger
Search

artifactory

Artifactory is a service that provides repositories for storing and managing artifacts.
Example (PublishFile)
no available example in current language
func (e *Examples) Artifactory_PublishFile(
	ctx context.Context,
	instanceName string,
	artifactoryUser string,
	artifactoryPassword *dagger.Secret,
	// +optional
	// +default="debug"
	logLevel string,
) (string, error) {
	instanceURL := "https://artifactory." + instanceName + ".org/artifactory"

	return dag.Artifactory(instanceURL, dagger.ArtifactoryOpts{
		InstanceName: instanceName,
		Username:     artifactoryUser,
		Password:     artifactoryPassword,
	}).PublishFile(
		ctx,
		dag.CurrentModule().Source().Directory("testdata").File("main.go"),
		"some-repo/some/path/main.go",
		dagger.ArtifactoryPublishFileOpts{
			LogLevel: logLevel,
		},
	)
}
no available example in current language
no available example in current language
Example (PublishGoLib)
no available example in current language
func (e *Examples) Artifactory_PublishGoLib(
	ctx context.Context,
	instanceName string,
	artifactoryUser string,
	artifactoryPassword *dagger.Secret,
	// +optional
	// +default="v0.0.1"
	version string,
	// +optional
	// +default="debug"
	logLevel string,
) *dagger.Container {
	var (
		instanceURL = "https://artifactory." + instanceName + ".org/artifactory"
		repoName    = "go-snapshot-" + instanceName
	)

	return dag.Artifactory(instanceURL, dagger.ArtifactoryOpts{
		InstanceName: instanceName,
		Username:     artifactoryUser,
		Password:     artifactoryPassword,
	}).PublishGoLib(
		dag.CurrentModule().Source().Directory("testdata"),
		repoName,
		dagger.ArtifactoryPublishGoLibOpts{
			Version:  version,
			LogLevel: logLevel,
		},
	)
}
no available example in current language
no available example in current language

Installation

dagger install github.com/vbehar/daggerverse/artifactory@v0.10.0

Entrypoint

Return Type
Artifactory !
Arguments
NameTypeDescription
instanceUrlString !URL of the Artifactory instance.
usernameString username to use for authentication. If empty, authentication will not be configured.
passwordSecret password to use for authentication.
instanceNameString name of the Artifactory instance to configure. Defaults to "default".
jfrogCliVersionString version of the JFrog CLI to install. If empty, the latest version will be installed.
Example
dagger -m github.com/vbehar/daggerverse/artifactory@eb093e6d7e210474167957615e3f06f2bc8fd7d4 call \
 --instance-url string
func (m *myModule) example(instanceUrl string) *Artifactory  {
	return dag.
			Artifactory(instanceUrl)
}
@function
def example(instance_url: str, ) -> dag.Artifactory:
	return (
		dag.artifactory(instance_url)
	)
@func()
example(instanceUrl: string, ): Artifactory {
	return dag
		.artifactory(instanceUrl)
}

Types

Artifactory 🔗

Artifactory is a Dagger Module to interact with JFrog Artifactory.

instanceName() 🔗

name of the Artifactory instance.

Return Type
String !
Example
dagger -m github.com/vbehar/daggerverse/artifactory@eb093e6d7e210474167957615e3f06f2bc8fd7d4 call \
 --instance-url string instance-name
func (m *myModule) example(ctx context.Context, instanceUrl string) string  {
	return dag.
			Artifactory(instanceUrl).
			InstanceName(ctx)
}
@function
async def example(instance_url: str, ) -> str:
	return await (
		dag.artifactory(instance_url)
		.instance_name()
	)
@func()
async example(instanceUrl: string, ): Promise<string> {
	return dag
		.artifactory(instanceUrl)
		.instanceName()
}

instanceUrl() 🔗

URL of the Artifactory instance.

Return Type
String !
Example
dagger -m github.com/vbehar/daggerverse/artifactory@eb093e6d7e210474167957615e3f06f2bc8fd7d4 call \
 --instance-url string instance-url
func (m *myModule) example(ctx context.Context, instanceUrl string) string  {
	return dag.
			Artifactory(instanceUrl).
			InstanceUrl(ctx)
}
@function
async def example(instance_url: str, ) -> str:
	return await (
		dag.artifactory(instance_url)
		.instance_url()
	)
@func()
async example(instanceUrl: string, ): Promise<string> {
	return dag
		.artifactory(instanceUrl)
		.instanceUrl()
}

username() 🔗

username to use for authentication. If empty, authentication will not be configured.

Return Type
String !
Example
dagger -m github.com/vbehar/daggerverse/artifactory@eb093e6d7e210474167957615e3f06f2bc8fd7d4 call \
 --instance-url string username
func (m *myModule) example(ctx context.Context, instanceUrl string) string  {
	return dag.
			Artifactory(instanceUrl).
			Username(ctx)
}
@function
async def example(instance_url: str, ) -> str:
	return await (
		dag.artifactory(instance_url)
		.username()
	)
@func()
async example(instanceUrl: string, ): Promise<string> {
	return dag
		.artifactory(instanceUrl)
		.username()
}

password() 🔗

password to use for authentication.

Return Type
Secret !
Example
dagger -m github.com/vbehar/daggerverse/artifactory@eb093e6d7e210474167957615e3f06f2bc8fd7d4 call \
 --instance-url string password
func (m *myModule) example(instanceUrl string) *Secret  {
	return dag.
			Artifactory(instanceUrl).
			Password()
}
@function
def example(instance_url: str, ) -> dagger.Secret:
	return (
		dag.artifactory(instance_url)
		.password()
	)
@func()
example(instanceUrl: string, ): Secret {
	return dag
		.artifactory(instanceUrl)
		.password()
}

jfrogCliVersion() 🔗

version of the JFrog CLI.

Return Type
String !
Example
dagger -m github.com/vbehar/daggerverse/artifactory@eb093e6d7e210474167957615e3f06f2bc8fd7d4 call \
 --instance-url string jfrog-cli-version
func (m *myModule) example(ctx context.Context, instanceUrl string) string  {
	return dag.
			Artifactory(instanceUrl).
			JfrogCliVersion(ctx)
}
@function
async def example(instance_url: str, ) -> str:
	return await (
		dag.artifactory(instance_url)
		.jfrog_cli_version()
	)
@func()
async example(instanceUrl: string, ): Promise<string> {
	return dag
		.artifactory(instanceUrl)
		.jfrogCliVersion()
}

configure() 🔗

Configure configures the given container to use the Artifactory instance.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
ctrContainer -container to configure. If empty, a new container will be created.
Example
dagger -m github.com/vbehar/daggerverse/artifactory@eb093e6d7e210474167957615e3f06f2bc8fd7d4 call \
 --instance-url string configure
func (m *myModule) example(instanceUrl string) *Container  {
	return dag.
			Artifactory(instanceUrl).
			Configure()
}
@function
def example(instance_url: str, ) -> dagger.Container:
	return (
		dag.artifactory(instance_url)
		.configure()
	)
@func()
example(instanceUrl: string, ): Container {
	return dag
		.artifactory(instanceUrl)
		.configure()
}

command() 🔗

Command runs the given artifactory (jf) command in the given container.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
cmd[String ! ] !-jf command to run. the "jf" prefix will be added automatically.
ctrContainer -container to run the command in. If empty, a new container will be created.
logLevelString -log level to use for the command. If empty, the default log level will be used.
Example
dagger -m github.com/vbehar/daggerverse/artifactory@eb093e6d7e210474167957615e3f06f2bc8fd7d4 call \
 --instance-url string command --cmd string1 --cmd string2
func (m *myModule) example(instanceUrl string, cmd []string) *Container  {
	return dag.
			Artifactory(instanceUrl).
			Command(cmd)
}
@function
def example(instance_url: str, cmd: List[str]) -> dagger.Container:
	return (
		dag.artifactory(instance_url)
		.command(cmd)
	)
@func()
example(instanceUrl: string, cmd: string[]): Container {
	return dag
		.artifactory(instanceUrl)
		.command(cmd)
}

publishFile() 🔗

PublishFile publishes a single file to artifactory.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
fileFile !-file to publish.
destinationString !-target path in artifactory.
logLevelString -log level to use for the command. If empty, the default log level will be used.
Example
dagger -m github.com/vbehar/daggerverse/artifactory@eb093e6d7e210474167957615e3f06f2bc8fd7d4 call \
 --instance-url string publish-file --file file:path --destination string
func (m *myModule) example(ctx context.Context, instanceUrl string, file *File, destination string) string  {
	return dag.
			Artifactory(instanceUrl).
			PublishFile(ctx, file, destination)
}
@function
async def example(instance_url: str, file: dagger.File, destination: str) -> str:
	return await (
		dag.artifactory(instance_url)
		.publish_file(file, destination)
	)
@func()
async example(instanceUrl: string, file: File, destination: string): Promise<string> {
	return dag
		.artifactory(instanceUrl)
		.publishFile(file, destination)
}

publishGoLib() 🔗

PublishGoLib publishes a Go library to the given repository.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-directory containing the Go library to publish.
versionString -version of the library to publish. Default to the "git" version (from the `git describe` cmd).
repoString !-name of the repository to publish to.
logLevelString -log level to use for the command. If empty, the default log level will be used.
Example
dagger -m github.com/vbehar/daggerverse/artifactory@eb093e6d7e210474167957615e3f06f2bc8fd7d4 call \
 --instance-url string publish-go-lib --src DIR_PATH --repo string
func (m *myModule) example(instanceUrl string, src *Directory, repo string) *Container  {
	return dag.
			Artifactory(instanceUrl).
			PublishGoLib(src, repo)
}
@function
def example(instance_url: str, src: dagger.Directory, repo: str) -> dagger.Container:
	return (
		dag.artifactory(instance_url)
		.publish_go_lib(src, repo)
	)
@func()
example(instanceUrl: string, src: Directory, repo: string): Container {
	return dag
		.artifactory(instanceUrl)
		.publishGoLib(src, repo)
}