talos/hack/cloud-image-uploader/options.go
Andrey Smirnov ffc1c43d9f
test: drop Azure CI pipelines
They were broken for some time, and depend on Image Gallery we dropped
as well.

Update docs and CI scripts.

Fixes #10035

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-03-24 18:30:21 +04:00

40 lines
1021 B
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package main
import (
"fmt"
"path/filepath"
)
// Options for the cli.
type Options struct {
Tag string
ArtifactsPath string
NamePrefix string
Architectures []string
TargetClouds []string
// AWS options.
AWSRegions []string
}
// DefaultOptions used throughout the cli.
var DefaultOptions = Options{
ArtifactsPath: "_out/",
Architectures: []string{"amd64", "arm64"},
TargetClouds: []string{"aws"},
}
// AWSImage returns path to AWS pre-built image.
func (o *Options) AWSImage(architecture string) string {
return filepath.Join(o.ArtifactsPath, fmt.Sprintf("aws-%s.raw.zst", architecture))
}
// GCPImage returns path to GCP pre-built image.
func (o *Options) GCPImage(architecture string) string {
return filepath.Join(o.ArtifactsPath, fmt.Sprintf("gcp-%s.raw.tar.gz", architecture))
}