mirror of
				https://github.com/siderolabs/talos.git
				synced 2025-10-31 00:11:36 +01:00 
			
		
		
		
	Also uncomment Azure uploader. Add the Azure environment variables to the Makefile cloud-images step. Change disk size and tier to 16GiB and tier: P3 Add boolean value to drone pipeline and the cloud images hack will check the value to determine which Azure Compute Gallery to push images to. Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com> Signed-off-by: Christian Rolland <christian.rolland@siderolabs.com>
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.2 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
 | |
| 	AzureCoreTag     string
 | |
| 	AzureAbbrevTag   string
 | |
| 	AzureGalleryName string
 | |
| 	AzurePreRelease  string
 | |
| }
 | |
| 
 | |
| // 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))
 | |
| }
 |