support

package
v0.0.0-...-66cc039 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvReleasesSnapshotFile = "SNAPSHOT"
	EnvAnsibleImagesFile    = "ANSIBLE"
	EnvRepositoriesFile     = "REPOSITORIES"
	EnvTestGithubToken      = "TEST_GITHUB_TOKEN" // #nosec G101
	EnvVersion              = "VERSION"

	OperatorImageKey       = "rhtas-operator-image"
	OperatorBundleImageKey = "rhtas-operator-bundle-image"
	AnsibleCollectionKey   = "artifact-signer-ansible.collection.url"

	AnsibleCollectionSnapshotFile           = "roles/tas_single_node/defaults/main.yml"
	AnsibleArtifactsURL                     = "https://api.github.com/repos/securesign/artifact-signer-ansible/actions/artifacts"
	OperatorBundleClusterServiceVersionFile = "rhtas-operator.clusterserviceversion.yaml"
	OperatorBundleClusterServiceVersionPath = "manifests/" + OperatorBundleClusterServiceVersionFile

	TasImageDefinitionRegexp      = `^registry.redhat.io/rhtas/[\w/-]+@sha256:\w{64}$`
	OtherImageDefinitionRegexp    = `^(registry.redhat.io|registry.access.redhat.com)`
	SnapshotImageDefinitionRegexp = `^[\.\w/-]+@sha256:\w{64}$`

	DefaultRepositoriesFile = "testdata/repositories.json"
)

Variables

This section is empty.

Functions

func AnsibleOtherImageKeys

func AnsibleOtherImageKeys() []string

func AnsibleTasImageKeys

func AnsibleTasImageKeys() []string

func ConvertAnsibleImageKey

func ConvertAnsibleImageKey(ansibleImageKey string) string

func DecompressGzipFile

func DecompressGzipFile(gzipPath string, outputPath string) error

DecompressGzipFile decompresses a Gzip file and writes the decompressed content to a specified output file.

func ExtractHash

func ExtractHash(image string) string

func ExtractHashes

func ExtractHashes(images []string) []string

func FileFromImage

func FileFromImage(ctx context.Context, imageName, filePath, outputPath string) error

func GetEnv

func GetEnv(key string) string

func GetEnvAsSecret

func GetEnvAsSecret(key string) string

func GetFileContent

func GetFileContent(filePath string) ([]byte, error)

func GetMapKeys

func GetMapKeys(m map[string]string) []string

func GetMapValues

func GetMapValues(m map[string]string) []string

func LoadAnsibleCollectionSnapshotFile

func LoadAnsibleCollectionSnapshotFile(zipFileURL, ansibleImagesFile string) ([]byte, error)

func LogArray

func LogArray(message string, data []string)

func LogAvailableAnsibleArtifacts

func LogAvailableAnsibleArtifacts()

func LogMap

func LogMap(message string, data map[string]string)

func MandatoryTasOperatorImageKeys

func MandatoryTasOperatorImageKeys() []string

func MapAnsibleZipFileURL

func MapAnsibleZipFileURL(originalPath string) (string, error)

func OtherOperatorImageKeys

func OtherOperatorImageKeys() []string

func ParseOperatorImages

func ParseOperatorImages(helpContent string) (OperatorMap, OperatorMap)

func RunImage

func RunImage(imageDefinition string, commands []string) (string, error)

func SplitMap

func SplitMap(original map[string]string, keysToKeep []string) (map[string]string, map[string]string)

Types

type AnsibleMap

type AnsibleMap map[string]string

func MapAnsibleImages

func MapAnsibleImages(ansibleDefinitionFileContent []byte) (AnsibleMap, error)

func (*AnsibleMap) UnmarshalYAML

func (data *AnsibleMap) UnmarshalYAML(value *yaml.Node) error

type OSArchMatrix

type OSArchMatrix map[string][]string

func GetOSArchMatrix

func GetOSArchMatrix() OSArchMatrix

type OperatorMap

type OperatorMap map[string]string

type Repository

type Repository struct {
	Name      string `json:"repository"`
	ID        string `json:"_id"` //nolint:tagliatelle
	Published bool   `json:"published"`
}

type RepositoryList

type RepositoryList struct {
	Data []Repository `json:"data"`
}

func LoadRepositoryList

func LoadRepositoryList() (*RepositoryList, error)

func (*RepositoryList) FindByImage

func (r *RepositoryList) FindByImage(image string) *Repository

type SnapshotData

type SnapshotData struct {
	Images map[string]string
	Others map[string]string
}

func ParseSnapshotData

func ParseSnapshotData() (SnapshotData, error)

func (*SnapshotData) UnmarshalJSON

func (data *SnapshotData) UnmarshalJSON(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL