mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-14 02:27:07 +02:00
Create Azure Community Gallery Image Version on release: - Add /hack/cloud-image-uploader/azure.go - Upload vhd file to container for all architectures - Create managed disk from vhd file for all architectures - Create image version from managed disk for all architectures - Modify /hack/cloud-image-uploader/main.go - Start Community Gallery processes concurently with AWS upload - Modify /hack/cloud-image-uploader/options.go - Add additional Options for Community Gallery processes - Modify .drone.jsonnet to use secrets for environment variables - The following secrets need to be created for this to work: - azure_subscription_id - azure_client_id - azure_client_secret - azure_tenant_id Signed-off-by: Christian Rolland <christian.rolland@siderolabs.com> chore: fix linting errors in readme Fix linting errors in readme Signed-off-by: Christian Rolland <christian.rolland@siderolabs.com> chore: fix markdown linting errors Fix markdown linting errors in readme Signed-off-by: Christian Rolland <christian.rolland@siderolabs.com> chore: fix markdown linting errors Fix markdown linting errors in readme Signed-off-by: Christian Rolland <christian.rolland@siderolabs.com> chore: change disk size to match new 10GB cloud image size Change disk size to match 10GB cloud image size Signed-off-by: Christian Rolland <christian.rolland@siderolabs.com>
46 lines
1.1 KiB
Go
46 lines
1.1 KiB
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
|
|
Architectures []string
|
|
|
|
// AWS options.
|
|
AWSRegions []string
|
|
|
|
// Azure options.
|
|
AzureRegions []Location
|
|
}
|
|
|
|
// Location is the struct for the Azure Regions Options.
|
|
type Location struct {
|
|
Abbreviation string
|
|
Name string
|
|
}
|
|
|
|
// DefaultOptions used throughout the cli.
|
|
var DefaultOptions = Options{
|
|
ArtifactsPath: "_out/",
|
|
Architectures: []string{"amd64", "arm64"},
|
|
}
|
|
|
|
// AWSImage returns path to AWS pre-built image.
|
|
func (o *Options) AWSImage(architecture string) string {
|
|
return filepath.Join(o.ArtifactsPath, fmt.Sprintf("aws-%s.tar.gz", architecture))
|
|
}
|
|
|
|
// AzureImage returns path to AWS pre-built image.
|
|
func (o *Options) AzureImage(architecture string) string {
|
|
return filepath.Join(o.ArtifactsPath, fmt.Sprintf("azure-%s.tar.gz", architecture))
|
|
}
|