Documentation
¶
Index ¶
- func ApplicationVersionExists(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, ...) bool
- func CleanupTestApplication(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, ...)
- func CleanupTestApplicationVersion(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, ...)
- func CreateTestApplication(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, ...) (string, string)
- func CreateTestApplicationVersion(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, ...) string
- func CreateTestArtifact(t *testing.T, content string) string
- func CreateTestBuildInfo(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, ...) (string, string)
- func CreateTestPackage(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, ...) (string, string, string)
- func CreateTestReleaseBundle(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, ...) (string, string)
- func CreateTestRepository(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, ...) string
- func CreateTestRepositoryWithName(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, ...) string
- func CreateTestRepositoryWithProject(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, ...) string
- func DeleteTestBuildInfo(t *testing.T, buildName string)
- func DeleteTrustedKey(servicesManager artifactory.ArtifactoryServicesManager, keyAlias string) error
- func PromoteApplicationVersion(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, ...) error
- func UploadArtifact(servicesManager artifactory.ArtifactoryServicesManager, ...) error
- type ApplicationResponse
- type ApplicationVersionArtifact
- type ApplicationVersionResponse
- type ApplicationVersionSources
- type CreateApplicationRequest
- type CreateApplicationVersionRequest
- type PromoteApplicationVersionRequest
- type ReleaseBundleOption
- type RepositoryOption
- type TrustedKey
- type TrustedKeysResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplicationVersionExists ¶
func ApplicationVersionExists(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, applicationKey, version, projectKey string) bool
ApplicationVersionExists checks if an application version exists using AppTrust API
func CleanupTestApplication ¶
func CleanupTestApplication(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, applicationKey, projectKey string)
CleanupTestApplication deletes the application using AppTrust API Note: This also deletes all associated versions
func CleanupTestApplicationVersion ¶
func CleanupTestApplicationVersion(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, applicationKey, version string)
CleanupTestApplicationVersion deletes an application version using AppTrust API This should be called before deleting the application
func CreateTestApplication ¶
func CreateTestApplication(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, projectKey string) (string, string)
CreateTestApplication creates a test application in AppTrust using the AppTrust API If the application already exists (409 Conflict), it will delete it and retry
func CreateTestApplicationVersion ¶
func CreateTestApplicationVersion(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, lifecycleManager *lifecycle.LifecycleServicesManager, applicationKey, projectKey string) string
CreateTestApplicationVersion creates a test application version using AppTrust API
func CreateTestBuildInfo ¶
func CreateTestBuildInfo(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, project string) (string, string)
CreateTestBuildInfo creates a test build info in Artifactory with artifacts and publishes it Returns build name and build number
func CreateTestPackage ¶
func CreateTestPackage(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, packageType string) (string, string, string)
CreateTestPackage creates a test package in Artifactory Returns package name, version, and repo name
func CreateTestReleaseBundle ¶
func CreateTestReleaseBundle(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, lifecycleManager *lifecycle.LifecycleServicesManager, project string, opts ...ReleaseBundleOption) (string, string)
CreateTestReleaseBundle creates a test release bundle from a build Returns release bundle name and version
func CreateTestRepository ¶
func CreateTestRepository(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, packageType string) string
func CreateTestRepositoryWithName ¶
func CreateTestRepositoryWithName(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, packageType string, opts ...RepositoryOption) string
CreateTestRepositoryWithName is a convenience function that returns the repository name
func CreateTestRepositoryWithProject ¶
func CreateTestRepositoryWithProject(t *testing.T, servicesManager artifactory.ArtifactoryServicesManager, packageType, project string, opts ...RepositoryOption) string
func DeleteTestBuildInfo ¶
DeleteTestBuildInfo deletes a test build info from Artifactory This is used for test cleanup Note: Uses max-days=0 to delete all builds matching the build name
func DeleteTrustedKey ¶
func DeleteTrustedKey(servicesManager artifactory.ArtifactoryServicesManager, keyAlias string) error
DeleteTrustedKey deletes a trusted key from Artifactory using the REST API keyAlias: the alias of the key to delete (e.g., "e2e-shared-key-1762361018")
func PromoteApplicationVersion ¶
func PromoteApplicationVersion(t *testing.T, artifactoryManager artifactory.ArtifactoryServicesManager, applicationKey, version, projectKey, targetStage string) error
PromoteApplicationVersion promotes an application version using AppTrust API
func UploadArtifact ¶
func UploadArtifact(servicesManager artifactory.ArtifactoryServicesManager, sourcePath, targetPath string) error
UploadArtifact uploads a file to Artifactory using the services manager sourcePath: local file path targetPath: full repository path (e.g., "repo-name/path/to/file.txt")
Types ¶
type ApplicationResponse ¶
type ApplicationResponse struct {
ApplicationName string `json:"application_name"`
ApplicationKey string `json:"application_key"`
ProjectKey string `json:"project_key"`
}
ApplicationResponse represents the response when creating an application
type ApplicationVersionArtifact ¶
ApplicationVersionArtifact represents an artifact source
type ApplicationVersionResponse ¶
type ApplicationVersionResponse struct {
ApplicationKey string `json:"application_key"`
Version string `json:"version"`
}
ApplicationVersionResponse represents the response when creating an application version
type ApplicationVersionSources ¶
type ApplicationVersionSources struct {
Artifacts []ApplicationVersionArtifact `json:"artifacts,omitempty"`
}
ApplicationVersionSources represents the sources for an application version
type CreateApplicationRequest ¶
type CreateApplicationRequest struct {
ApplicationName string `json:"application_name"`
ApplicationKey string `json:"application_key"`
ProjectKey string `json:"project_key"`
Description string `json:"description,omitempty"`
}
CreateApplicationRequest represents the request to create an application
type CreateApplicationVersionRequest ¶
type CreateApplicationVersionRequest struct {
Version string `json:"version"`
Sources *ApplicationVersionSources `json:"sources"`
}
CreateApplicationVersionRequest represents the request to create an application version
type PromoteApplicationVersionRequest ¶
type PromoteApplicationVersionRequest struct {
TargetStage string `json:"target_stage"`
Comment string `json:"comment,omitempty"`
}
PromoteApplicationVersionRequest represents the request to promote an application version
type ReleaseBundleOption ¶
type ReleaseBundleOption func(*releaseBundleConfig)
ReleaseBundleOption defines options for release bundle creation
func WithReleaseBundleName ¶
func WithReleaseBundleName(name string) ReleaseBundleOption
WithReleaseBundleName sets a custom release bundle name
func WithReleaseBundleVersion ¶
func WithReleaseBundleVersion(version string) ReleaseBundleOption
WithReleaseBundleVersion sets a custom release bundle version
type RepositoryOption ¶
type RepositoryOption func(*repositoryConfig)
func WithRepoKey ¶
func WithRepoKey(key string) RepositoryOption
type TrustedKey ¶
TrustedKey represents a trusted key from Artifactory
type TrustedKeysResponse ¶
type TrustedKeysResponse struct {
Keys []TrustedKey `json:"keys"`
}
TrustedKeysResponse represents the response from listing trusted keys