mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-20 04:54:46 -04:00
Feat/version manifests (#387)
Signed-off-by: Fabian Kammel <fk@edgeless.systems> Co-authored-by: Otto Bittner <cobittner@posteo.net>
This commit is contained in:
parent
cdcbed6ff9
commit
ec79484948
8 changed files with 377 additions and 0 deletions
37
hack/build-manifest/azure/options.go
Normal file
37
hack/build-manifest/azure/options.go
Normal file
|
@ -0,0 +1,37 @@
|
|||
package azure
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultResourceGroupName = "CONSTELLATION-IMAGES"
|
||||
DefaultGalleryName = "Constellation"
|
||||
DefaultImageDefinition = "constellation"
|
||||
)
|
||||
|
||||
type Options struct {
|
||||
SubscriptionID string
|
||||
ResourceGroupName string
|
||||
GalleryName string
|
||||
ImageDefinition string
|
||||
}
|
||||
|
||||
func DefaultOptions() Options {
|
||||
return Options{
|
||||
SubscriptionID: "",
|
||||
ResourceGroupName: DefaultResourceGroupName,
|
||||
GalleryName: DefaultGalleryName,
|
||||
ImageDefinition: DefaultImageDefinition,
|
||||
}
|
||||
}
|
||||
|
||||
func (o *Options) SetSubscription(sub string) error {
|
||||
if _, err := uuid.Parse(sub); err != nil {
|
||||
return fmt.Errorf("unable to set subscription: %w", err)
|
||||
}
|
||||
o.SubscriptionID = sub
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue