From 752040d10ff09b83fb0a316dc10eb5fc080df94d Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 16 Aug 2023 18:00:33 +0200 Subject: [PATCH] target: add pulp ostree target and options --- internal/target/pulp_target.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 internal/target/pulp_target.go diff --git a/internal/target/pulp_target.go b/internal/target/pulp_target.go new file mode 100644 index 000000000..ae3cdeb5c --- /dev/null +++ b/internal/target/pulp_target.go @@ -0,0 +1,33 @@ +package target + +const TargetNamePulpOSTree TargetName = "org.osbuild.pulp.ostree" + +type PulpOSTreeTargetOptions struct { + // ServerAddress for the pulp instance + ServerAddress string `json:"server_address,omitempty"` + + // Repository to import the ostree commit to + Repository string `json:"repository"` + + // BasePath for distributing the repository (if new) + BasePath string `json:"basepath,omitempty"` + + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` +} + +func (PulpOSTreeTargetOptions) isTargetOptions() {} + +func NewPulpOSTreeTarget(options *PulpOSTreeTargetOptions) *Target { + return newTarget(TargetNamePulpOSTree, options) +} + +type PulpOSTreeTargetResultOptions struct { + RepoURL string `json:"repository_url"` +} + +func (PulpOSTreeTargetResultOptions) isTargetResultOptions() {} + +func NewPulpOSTreeTargetResult(options *PulpOSTreeTargetResultOptions, artifact *OsbuildArtifact) *TargetResult { + return newTargetResult(TargetNamePulpOSTree, options, artifact) +}