Documentation
¶
Index ¶
- Constants
- Variables
- func AvailableVirtualMachineConfigsForCurrentHostOSByVirtualizationEngine() map[VirtualizationEngine][]VirtualMachineConfig
- func BuildArtifactsExist(config VirtualMachineConfig) (bool, error)
- func BuildArtifactsExistQuiet(config VirtualMachineConfig) (bool, error)
- func CreationResourceWarnings(vm VirtualMachineConfig, storageDir string) []string
- func DefaultAppDataDirForOS(goos string, getenv func(string) string, ...) (string, error)
- func DependencyReconciliation(ctx context.Context, vmconfig VirtualMachineConfig) error
- func DisplayVirtualizationEngine(engine VirtualizationEngine) string
- func DownloadWin11ISO(url, dst, expectedSHA256 string) error
- func FetchLatestWin11Release() (string, error)
- func GenerateVirtualMachineSlug(config *VirtualMachineConfig) string
- func GetVirtualMachineNameWithType(config VirtualMachineConfig) string
- func GetVmCpuCount(config VirtualMachineConfig) int
- func GetVmMemoryMB(config VirtualMachineConfig) int
- func GroupVirtualMachineConfigsByVirtualizationEngine(configs []VirtualMachineConfig) map[VirtualizationEngine][]VirtualMachineConfig
- func HandleInterrupts(parent context.Context) (context.Context, func())
- func HasLinuxCloneIdentity(artifact string) bool
- func HashFile(file string) (string, int64, error)
- func InstanceHostname(vm VirtualMachineConfig) string
- func InstanceKey(vm VirtualMachineConfig) string
- func InstanceName(vm VirtualMachineConfig) string
- func Interrupted(ctx context.Context) bool
- func IsVirtualizationEngineUnstable(engine VirtualizationEngine) bool
- func MarkBuildArtifactsComplete(artifacts []string) error
- func MarkBuildArtifactsPending(artifacts []string) (restore func() error, err error)
- func OSHasTypes(osName string) bool
- func ParseWin11Build(sourceName string) string
- func ParseWin11Release(sourceName string) string
- func ProbeWin11ISO(url string) (int64, error)
- func RemoveBuildArtifactCompletionMarkers(artifacts []string) error
- func RemoveBuildArtifacts(artifacts []string) error
- func RemoveBuildArtifactsForConfig(config VirtualMachineConfig)
- func RunBashScript(config RunProcessConfig) error
- func RunBuildScript(ctx context.Context, config VirtualMachineConfig, executable string, ...) (err error)
- func RunCliCommand(workdir string, command string, args []string) ([]byte, error)
- func RunCliCommandWithEnv(workdir string, command string, args []string, env []string) ([]byte, error)
- func RunExternalProcess(config RunProcessConfig) (context.Context, error)
- func RunExternalProcessWithRetries(config RunProcessConfig) context.Context
- func RunFfmpegVideoGenerationProcess(vm_config VirtualMachineConfig, ctx context.Context, ...) context.Context
- func RunHypervUbuntuBuildOnWindows(ctx context.Context, config VirtualMachineConfig) error
- func RunHypervWindowsBuildOnWindows(ctx context.Context, config VirtualMachineConfig) error
- func RunPowerShellScript(config RunProcessConfig) error
- func RunQemuUbuntuBuildOnLinux(ctx context.Context, config VirtualMachineConfig) error
- func RunQemuUbuntuBuildOnMacOS(ctx context.Context, config VirtualMachineConfig) error
- func RunQemuWindowsBuildOnLinux(ctx context.Context, config VirtualMachineConfig) error
- func RunQemuWindowsBuildOnMacOS(ctx context.Context, config VirtualMachineConfig) error
- func RunVirtualBoxWindowsBuildOnWindows(ctx context.Context, config VirtualMachineConfig) error
- func RunVncSnapshotProcess(vm_config VirtualMachineConfig, ctx context.Context, ...) context.Context
- func TargetType(osName, requested string) string
- func UtmVMDirectory() (string, error)
- func UtmVirtualMachinePath(config VirtualMachineConfig) (string, error)
- func ValidateInstance(vm VirtualMachineConfig) error
- func ValidateInstanceName(name string) error
- func VncSnapshotDir(cacheDir string, vm_config VirtualMachineConfig) string
- func Win11ISOOffline() bool
- func Win11ObjectName(sourceName, arch string, firstSeen time.Time) string
- func Win11RefreshDue(m *Win11Manifest, now time.Time, latestRelease string, force bool) (bool, string)
- func Win11SourceNameFromURL(rawURL string) string
- type ArtifactState
- type Directories
- func (u *Directories) CachePath(paths ...string) string
- func (u *Directories) ConfigPath(paths ...string) string
- func (u *Directories) GetDirectories() Directories
- func (u *Directories) ManagedEnv() []string
- func (u *Directories) PackerCachePath(paths ...string) string
- func (u *Directories) VagrantPath(paths ...string) string
- type HostOsType
- type ProgressBarListener
- type RunProcessConfig
- type VirtualMachineConfig
- func AvailableVirtualMachineConfigs() []VirtualMachineConfig
- func AvailableVirtualMachineConfigsForCurrentHostOS() []VirtualMachineConfig
- func AvailableVirtualMachineConfigsForHostOS(hostOs HostOsType) []VirtualMachineConfig
- func ParseInstanceName(providerName string, base VirtualMachineConfig) (VirtualMachineConfig, bool)
- type VirtualizationEngine
- type VncRecordingConfig
- type WebFileDependency
- type Win11HistoryEntry
- type Win11LinkInfo
- type Win11Manifest
Constants ¶
const (
// Win11OfflineEnv disables every attempt to reach Microsoft (CI build jobs).
Win11OfflineEnv = "SAILWRIGHT_WIN11_ISO_OFFLINE"
)
Variables ¶
var ErrInterrupted = errors.New("interrupted")
ErrInterrupted is the cancellation cause of a build context after an interrupt signal (Ctrl+C, SIGTERM or SIGHUP).
var ErrMicrosoftRefused = errors.New("microsoft refused the Windows 11 download request")
ErrMicrosoftRefused signals that Microsoft rejected or challenged the request (e.g. datacenter IP). It is a neutral outcome, not a code defect.
Functions ¶
func AvailableVirtualMachineConfigsForCurrentHostOSByVirtualizationEngine ¶ added in v0.4.0
func AvailableVirtualMachineConfigsForCurrentHostOSByVirtualizationEngine() map[VirtualizationEngine][]VirtualMachineConfig
func BuildArtifactsExist ¶ added in v0.4.0
func BuildArtifactsExist(config VirtualMachineConfig) (bool, error)
func BuildArtifactsExistQuiet ¶ added in v0.4.0
func BuildArtifactsExistQuiet(config VirtualMachineConfig) (bool, error)
func CreationResourceWarnings ¶ added in v0.27.0
func CreationResourceWarnings(vm VirtualMachineConfig, storageDir string) []string
CreationResourceWarnings is advisory: missing telemetry never blocks create.
func DefaultAppDataDirForOS ¶ added in v0.27.0
func DefaultAppDataDirForOS(goos string, getenv func(string) string, userHomeDir, userConfigDir func() (string, error)) (string, error)
DefaultAppDataDirForOS exposes the app-data contract so sailwright-gateway tests can verify that the gateway's shared-state resolution mirrors it.
func DependencyReconciliation ¶
func DependencyReconciliation(ctx context.Context, vmconfig VirtualMachineConfig) error
DependencyReconciliation downloads the missing web file dependencies of vmconfig. Cancelling ctx (e.g. Ctrl+C) aborts the running download.
func DisplayVirtualizationEngine ¶ added in v0.8.0
func DisplayVirtualizationEngine(engine VirtualizationEngine) string
func DownloadWin11ISO ¶ added in v0.20.0
DownloadWin11ISO downloads the ISO to dst (go-getter, progress, checksum retry) and verifies sha256 when given.
func FetchLatestWin11Release ¶ added in v0.20.0
FetchLatestWin11Release queries the public release notes for the newest Windows 11 release.
func GenerateVirtualMachineSlug ¶
func GenerateVirtualMachineSlug(config *VirtualMachineConfig) string
func GetVirtualMachineNameWithType ¶
func GetVirtualMachineNameWithType(config VirtualMachineConfig) string
func GetVmCpuCount ¶ added in v0.3.0
func GetVmCpuCount(config VirtualMachineConfig) int
GetVmCpuCount returns the resolved CPU count for the given VM config.
func GetVmMemoryMB ¶ added in v0.3.0
func GetVmMemoryMB(config VirtualMachineConfig) int
GetVmMemoryMB returns the resolved memory allocation in megabytes for the given VM config.
func GroupVirtualMachineConfigsByVirtualizationEngine ¶ added in v0.4.0
func GroupVirtualMachineConfigsByVirtualizationEngine(configs []VirtualMachineConfig) map[VirtualizationEngine][]VirtualMachineConfig
func HandleInterrupts ¶ added in v0.27.0
HandleInterrupts installs the signal handling for builds. The returned context is cancelled with ErrInterrupted on the first interrupt. A second Ctrl+C also cancels post-processing, a third one kills all child process groups and exits with code 130. The returned stop function restores the default signal behaviour.
func HasLinuxCloneIdentity ¶ added in v0.27.0
HasLinuxCloneIdentity reports whether a matching completed local build was prepared for independent first-boot DHCP identities. Legacy/pulled images do not make this guarantee, even when they are otherwise usable.
func InstanceHostname ¶ added in v0.27.0
func InstanceHostname(vm VirtualMachineConfig) string
InstanceHostname obeys Windows' 15-character computer-name limit. Unix guests use the full provider name, which fits the DNS label limit.
func InstanceKey ¶ added in v0.27.0
func InstanceKey(vm VirtualMachineConfig) string
InstanceKey is the logical address, independent of provider and image cache.
func InstanceName ¶ added in v0.27.0
func InstanceName(vm VirtualMachineConfig) string
InstanceName derives provider identity while preserving every legacy default. A future OS version belongs after OS, before type; image slugs exclude Name.
func Interrupted ¶ added in v0.27.0
Interrupted reports whether ctx was cancelled because of an interrupt signal.
func IsVirtualizationEngineUnstable ¶ added in v0.8.0
func IsVirtualizationEngineUnstable(engine VirtualizationEngine) bool
func MarkBuildArtifactsComplete ¶ added in v0.27.0
MarkBuildArtifactsComplete writes the completion markers of artifacts that reached their final path, e.g. after a successful build or OCI pull.
func MarkBuildArtifactsPending ¶ added in v0.27.0
MarkBuildArtifactsPending marks all artifacts of a set as incomplete before a build or pull replaces any of them. If the replacement stops partway, the set stays incomplete instead of mixing new and old artifacts without markers, which would count as unverified and usable. MarkBuildArtifactsComplete replaces the markers once the whole set is in place. restore puts the previous markers back, for a replacement that left every artifact as it was.
func OSHasTypes ¶ added in v0.27.0
OSHasTypes reports whether osName has typed targets (such as ubuntu server and desktop). It is derived from the VM configurations, so commands, locks and the gateway agree on which targets carry a type.
func ParseWin11Build ¶ added in v0.20.0
ParseWin11Build extracts the build (e.g. "26300.9457") from Microsoft's ISO file name; "" if unknown.
func ParseWin11Release ¶ added in v0.20.0
ParseWin11Release extracts the release (e.g. "25H2") from Microsoft's ISO file name; "" if unknown.
func ProbeWin11ISO ¶ added in v0.20.0
ProbeWin11ISO returns the size of the ISO behind url without downloading it. It tries HEAD first and falls back to a one-byte ranged GET, because signed CDN URLs sometimes reject HEAD or omit Content-Length.
func RemoveBuildArtifactCompletionMarkers ¶ added in v0.27.0
RemoveBuildArtifactCompletionMarkers removes the completion markers of artifacts, e.g. together with the artifacts.
func RemoveBuildArtifacts ¶
func RemoveBuildArtifactsForConfig ¶
func RemoveBuildArtifactsForConfig(config VirtualMachineConfig)
func RunBashScript ¶
func RunBashScript(config RunProcessConfig) error
func RunBuildScript ¶
func RunBuildScript(ctx context.Context, config VirtualMachineConfig, executable string, args []string, extraEnv ...string) (err error)
RunBuildScript runs a build script with the managed environment plus extraEnv. Cancelling ctx stops dependency downloads and the build's whole process group; the staged artifact is then discarded, so the final artifact path never holds a partial build.
func RunCliCommand ¶ added in v0.2.0
func RunCliCommandWithEnv ¶ added in v0.12.0
func RunExternalProcess ¶
func RunExternalProcess(config RunProcessConfig) (context.Context, error)
RunExternalProcess runs a helper process in a process group of its own. Cancelling config.Context terminates the group; without interrupt handling in config.Context, Ctrl+C is handled for the duration of the call.
func RunExternalProcessWithRetries ¶
func RunExternalProcessWithRetries(config RunProcessConfig) context.Context
func RunFfmpegVideoGenerationProcess ¶
func RunFfmpegVideoGenerationProcess(vm_config VirtualMachineConfig, ctx context.Context, process_config RunProcessConfig, recording_config *VncRecordingConfig) context.Context
func RunHypervUbuntuBuildOnWindows ¶ added in v0.3.0
func RunHypervUbuntuBuildOnWindows(ctx context.Context, config VirtualMachineConfig) error
RunHypervUbuntuBuildOnWindows builds an Ubuntu VM using Hyper-V on Windows.
func RunHypervWindowsBuildOnWindows ¶ added in v0.2.0
func RunHypervWindowsBuildOnWindows(ctx context.Context, config VirtualMachineConfig) error
RunHypervWindowsBuildOnWindows builds a Windows 11 VM using Hyper-V on Windows. It retries early failures to handle the transient "No ip address" race condition in the Packer HyperV plugin: StepRun calls GetHostAdapterIpAddressForSwitch with no retry, and attaching a new VM to the Default Switch can briefly disrupt the host adapter's IPv4 address. This failure always occurs within the first ~30 seconds; real build failures take 30+ minutes. Retries are skipped for long-running failures to avoid wasting CI time on genuine errors.
func RunPowerShellScript ¶ added in v0.2.0
func RunPowerShellScript(config RunProcessConfig) error
func RunQemuUbuntuBuildOnLinux ¶ added in v0.12.0
func RunQemuUbuntuBuildOnLinux(ctx context.Context, config VirtualMachineConfig) error
func RunQemuUbuntuBuildOnMacOS ¶
func RunQemuUbuntuBuildOnMacOS(ctx context.Context, config VirtualMachineConfig) error
func RunQemuWindowsBuildOnLinux ¶ added in v0.14.0
func RunQemuWindowsBuildOnLinux(ctx context.Context, config VirtualMachineConfig) error
func RunQemuWindowsBuildOnMacOS ¶
func RunQemuWindowsBuildOnMacOS(ctx context.Context, config VirtualMachineConfig) error
func RunVirtualBoxWindowsBuildOnWindows ¶ added in v0.2.0
func RunVirtualBoxWindowsBuildOnWindows(ctx context.Context, config VirtualMachineConfig) error
RunVirtualBoxWindowsBuildOnWindows builds a Windows 11 VM using VirtualBox on Windows.
func RunVncSnapshotProcess ¶
func RunVncSnapshotProcess(vm_config VirtualMachineConfig, ctx context.Context, process_config RunProcessConfig, recording_config *VncRecordingConfig) context.Context
func TargetType ¶ added in v0.27.0
TargetType returns the type a command uses for osName: requested for OSes with typed targets and empty for all others, including "all" and "local".
func UtmVMDirectory ¶ added in v0.27.0
UtmVMDirectory resolves the destination shared by all UTM lifecycle commands. The legacy default directory is retained for existing VMs.
func UtmVirtualMachinePath ¶ added in v0.27.0
func UtmVirtualMachinePath(config VirtualMachineConfig) (string, error)
UtmVirtualMachinePath identifies the bundle created for config.
func ValidateInstance ¶ added in v0.27.0
func ValidateInstance(vm VirtualMachineConfig) error
ValidateInstance checks selectors before any provider command is executed.
func ValidateInstanceName ¶ added in v0.27.0
ValidateInstanceName accepts an empty name for the legacy default instance.
func VncSnapshotDir ¶ added in v0.19.0
func VncSnapshotDir(cacheDir string, vm_config VirtualMachineConfig) string
VncSnapshotDir is where the VNC snapshot process stores console frames for a VM. sailwright-gateway mirrors this layout without importing this package; a test in internal/gateway keeps both in sync.
func Win11ISOOffline ¶ added in v0.20.0
func Win11ISOOffline() bool
Win11ISOOffline reports whether Microsoft access is disabled (CI build jobs).
func Win11ObjectName ¶ added in v0.20.0
Win11ObjectName builds the immutable remote object name from Microsoft's file name and the first-seen date. Unexpected source names use the requested architecture (amd64 or arm64) in the fallback.
func Win11RefreshDue ¶ added in v0.20.0
func Win11RefreshDue(m *Win11Manifest, now time.Time, latestRelease string, force bool) (bool, string)
Win11RefreshDue decides offline whether contacting Microsoft is worthwhile. latestRelease is the newest release announced by the release notes ("" if unknown). A newer announcement triggers one check only: announcements without general ISO media (e.g. device-specific releases) would otherwise contact Microsoft on every run. After that check, the age rule picks up media that Microsoft publishes later.
func Win11SourceNameFromURL ¶ added in v0.20.0
Win11SourceNameFromURL returns Microsoft's file name (the URL path basename, ignoring the query string).
Types ¶
type ArtifactState ¶ added in v0.27.0
type ArtifactState string
ArtifactState describes whether a build artifact in the cache can be used.
const ( // ArtifactStateExists means the artifact was completed by a successful build or pull. ArtifactStateExists ArtifactState = "exists" // ArtifactStateUnverified means the artifact has no completion marker, e.g. because // an older sailwright version produced it. It is still used, see legacyArtifactState. ArtifactStateUnverified ArtifactState = "unverified" // ArtifactStateIncomplete means a build or pull did not finish: the completion marker // does not match the artifact, or only staging/backup files of an interrupted build // are left. ArtifactStateIncomplete ArtifactState = "incomplete" // ArtifactStateMissing means there is no artifact. ArtifactStateMissing ArtifactState = "missing" )
func BuildArtifactState ¶ added in v0.27.0
func BuildArtifactState(config VirtualMachineConfig) (ArtifactState, error)
BuildArtifactState returns the combined state of the build artifacts of config.
func (ArtifactState) Usable ¶ added in v0.27.0
func (s ArtifactState) Usable() bool
Usable reports whether builds may skip the artifact and VM commands may use it.
type Directories ¶
type Directories struct {
WorkingDir string
ProjectDir string
AppDataDir string
ConfigDir string
CacheDir string
VagrantDir string
PackerCacheDir string
}
func GetDirectoriesInstance ¶
func GetDirectoriesInstance() *Directories
func UserSettingsDirectories ¶ added in v0.27.0
func UserSettingsDirectories() (Directories, error)
UserSettingsDirectories resolves CLI settings and cache paths without creating a project or unpacking runtime assets. It shares the managed directory policy.
func (*Directories) CachePath ¶ added in v0.8.0
func (u *Directories) CachePath(paths ...string) string
func (*Directories) ConfigPath ¶ added in v0.16.1
func (u *Directories) ConfigPath(paths ...string) string
func (*Directories) GetDirectories ¶
func (u *Directories) GetDirectories() Directories
func (*Directories) ManagedEnv ¶ added in v0.8.0
func (u *Directories) ManagedEnv() []string
func (*Directories) PackerCachePath ¶ added in v0.8.0
func (u *Directories) PackerCachePath(paths ...string) string
func (*Directories) VagrantPath ¶ added in v0.8.0
func (u *Directories) VagrantPath(paths ...string) string
type HostOsType ¶ added in v0.2.0
type HostOsType string
const ( HostOsLinux HostOsType = "debian" HostOsWindows HostOsType = "windows" HostOsDarwin HostOsType = "darwin" )
func GetCurrentHostOs ¶ added in v0.2.0
func GetCurrentHostOs() HostOsType
type ProgressBarListener ¶
type ProgressBarListener struct {
// contains filtered or unexported fields
}
ProgressBarListener implements getter.ProgressListener using an mpb container so that concurrent downloads render their bars cleanly on separate lines.
func (*ProgressBarListener) TrackProgress ¶
func (p *ProgressBarListener) TrackProgress(src string, current, total int64, r io.ReadCloser) io.ReadCloser
type RunProcessConfig ¶
type VirtualMachineConfig ¶
type VirtualMachineConfig struct {
// Name selects an independent instance; empty preserves the legacy default.
Name string
OS string
Arch string
UbuntuType string
VncPort int
Slug string
ExpectedBuildArtifacts []string
StagedBuildArtifacts []string
NoCache bool
HostOs HostOsType
VirtualizationEngine VirtualizationEngine
Cpus int
// MemoryMB is the desired VM memory in megabytes.
// When 0 (the default), memory is calculated automatically:
// max(4096, totalSystemMemoryMB - 4096).
MemoryMB int
Headless bool
Verbose bool
// DetachedFromTerminal runs the build without access to the terminal, e.g. while
// several builds run in parallel: Ctrl+C then reaches sailwright, and a prompt in
// the build fails instead of stopping it.
DetachedFromTerminal bool
}
func AvailableVirtualMachineConfigs ¶
func AvailableVirtualMachineConfigs() []VirtualMachineConfig
func AvailableVirtualMachineConfigsForCurrentHostOS ¶ added in v0.2.0
func AvailableVirtualMachineConfigsForCurrentHostOS() []VirtualMachineConfig
func AvailableVirtualMachineConfigsForHostOS ¶ added in v0.4.0
func AvailableVirtualMachineConfigsForHostOS(hostOs HostOsType) []VirtualMachineConfig
func ParseInstanceName ¶ added in v0.27.0
func ParseInstanceName(providerName string, base VirtualMachineConfig) (VirtualMachineConfig, bool)
ParseInstanceName recognizes provider names without depending on local metadata.
type VirtualizationEngine ¶ added in v0.2.0
type VirtualizationEngine string
const ( VirtualizationEngineQemu VirtualizationEngine = "qemu" VirtualizationEngineTart VirtualizationEngine = "tart" VirtualizationEngineUtm VirtualizationEngine = "utm" VirtualizationEngineHyperv VirtualizationEngine = "hyperv" VirtualizationEngineVirtualBox VirtualizationEngine = "virtualbox" )
func CurrentHostVirtualizationEngines ¶ added in v0.4.0
func CurrentHostVirtualizationEngines() []VirtualizationEngine
func VirtualizationEnginesForVirtualMachineConfigs ¶ added in v0.4.0
func VirtualizationEnginesForVirtualMachineConfigs(configs []VirtualMachineConfig) []VirtualizationEngine
type VncRecordingConfig ¶
type WebFileDependency ¶
type WebFileDependency struct {
LocalPath string
Checksum string
Source string
FallbackSources []string
RelatedVmConfigs []VirtualMachineConfig
// BeforeHook is a function that is called before downloading the dependency. It can be used to modify the Source URL dynamically.
BeforeHook func(ctx context.Context) (string, error)
// PrepareHook runs during dependency reconciliation before the existence check, whether or not a
// download follows. It can migrate or clean up related files in the cache.
PrepareHook func()
// FailureHint is appended to the error when every source fails.
FailureHint string
}
type Win11HistoryEntry ¶ added in v0.20.0
type Win11HistoryEntry struct {
Object string `json:"object"`
SHA256 string `json:"sha256"`
PublishedAt string `json:"published_at"`
}
Win11HistoryEntry describes one published ISO object.
type Win11LinkInfo ¶ added in v0.20.0
type Win11LinkInfo struct {
URL string `json:"url"`
SourceName string `json:"source_name"`
SHA256 string `json:"sha256"`
}
Win11LinkInfo is written by playwright_win11_iso.py next to the URL file.
func ReadWin11LinkInfo ¶ added in v0.20.0
func ReadWin11LinkInfo(arch string) (*Win11LinkInfo, error)
ReadWin11LinkInfo reads the link description of the last resolution for an architecture.
func ResolveWindows11Link ¶ added in v0.20.0
func ResolveWindows11Link(arch string) (*Win11LinkInfo, error)
ResolveWindows11Link asks Microsoft (via Playwright) for the current ISO link. It returns ErrMicrosoftRefused when Microsoft blocks the request.
type Win11Manifest ¶ added in v0.20.0
type Win11Manifest struct {
Schema int `json:"schema"`
Arch string `json:"arch"`
Object string `json:"object"`
SourceName string `json:"source_name"`
Release string `json:"release"`
SHA256 string `json:"sha256"`
Size int64 `json:"size"`
Build string `json:"build"`
PublishedAt string `json:"published_at"`
CheckedAt string `json:"checked_at"`
// AnnouncedRelease is the newest release the release notes announced at the last successful check.
// The release-notes trigger fires only once per announcement, see Win11RefreshDue.
AnnouncedRelease string `json:"announced_release,omitempty"`
History []Win11HistoryEntry `json:"history"`
}
Win11Manifest is the pointer file (win11-<arch>.json) to the current ISO object on the remote cache.
func LoadWin11Manifest ¶ added in v0.20.0
func LoadWin11Manifest(file string) (*Win11Manifest, error)
LoadWin11Manifest reads a manifest file. A missing file yields (nil, nil).
func (*Win11Manifest) CheckedTime ¶ added in v0.20.0
func (m *Win11Manifest) CheckedTime() time.Time
CheckedTime parses CheckedAt; the zero time is returned when unset or invalid.
func (*Win11Manifest) MarkRefreshDue ¶ added in v0.20.0
func (m *Win11Manifest) MarkRefreshDue(now time.Time)
MarkRefreshDue backdates CheckedAt so the next scheduled run contacts Microsoft. Unlike the epoch, the result stays well inside the staleness limit, so a refused first run does not fail.
func (*Win11Manifest) Promote ¶ added in v0.20.0
func (m *Win11Manifest) Promote(entry Win11HistoryEntry, sourceName string, size int64, now time.Time) []string
Promote makes entry the current ISO and returns the objects that fell out of the retention window. The object the manifest points to is never part of the returned list.
func (*Win11Manifest) Save ¶ added in v0.20.0
func (m *Win11Manifest) Save(file string) error
Save writes the manifest as indented JSON.
Source Files
¶
- artifact_state.go
- dependencies.go
- directories.go
- embedded_project.go
- external_process_handler.go
- generic_build.go
- helper.go
- hyperv_diagnostics.go
- instance.go
- interrupt.go
- linux-build.go
- log_sanitizer.go
- macos-silicon-build.go
- memory_other.go
- process_cleanup.go
- process_helpers_unix.go
- qemu-arm64.go
- resource_disk_unix.go
- resource_memory_linux.go
- resource_warnings.go
- utm_paths.go
- virtual-machine.go
- vnc_recording.go
- win11iso.go
- windows-build.go
- windows-linux-build.go