Skip to content

Commit

Permalink
openshift-virtualization-pipelines-tasks: Auto-update tekton pipeline…
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions authored and openshift-merge-bot[bot] committed Mar 19, 2024
1 parent 83343e9 commit 7053d64
Showing 1 changed file with 360 additions and 0 deletions.
360 changes: 360 additions & 0 deletions pipelines/windows-efi-installer/4.15.0/windows-efi-installer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,360 @@
---
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
annotations:
tekton.dev/pipelines.minVersion: "0.43.0"
tekton.dev/categories: Automation
tekton.dev/tags: kubevirt
tekton.dev/displayName: "OpenShift Virtualization Windows UEFI installer"
tekton.dev/platforms: "linux/amd64"
artifacthub.io/maintainers: |
- name: KubeVirt Tekton tasks maintainers
email: [email protected]
artifacthub.io/provider: Red Hat
artifacthub.io/recommendations: |
- url: https://kubevirt.io/
artifacthub.io/category: integration-delivery
labels:
app.kubernetes.io/version: 4.15.0
name: windows-efi-installer
spec:
description: >-
This pipeline installs Windows 11/2k22 into a new DataVolume. Then the
DataVolume is suitable to be used as a default boot source or golden image
for Windows 11/2k22 VMs. Different OS versions requires different
customizeConfigMapName parameter with unattend.xml.
params:
- description: Download URL to Windows 11 or server 2022 installation ISO (English United States x64 version is needed). You can follow https://www.microsoft.com/en-us/software-download/windows11 or https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2022 to get one.
name: winImageDownloadURL
type: string
- name: instanceTypeName
type: string
description: Name of VirtualMachineClusterInstancetype object
default: u1.large
- name: instanceTypeKind
type: string
description: Kind of VirtualMachineInstancetype object
default: VirtualMachineClusterInstancetype
- name: preferenceName
type: string
description: Name of VirtualMachineClusterPreference object
default: windows.11
- name: virtualMachinePreferenceKind
type: string
description: Kind of virtualMachinePreference object
default: VirtualMachineClusterPreference
- default: windows11-autounattend
description: Name of the ConfigMap containing the sysprep configuration files (autounattend.xml, etc.). For example windows11-autounattend or windows2022-autounattend. It is possible to provide customize ConfigMaps created by the user too.
name: autounattendConfigMapName
type: string
- default: quay.io/kubevirt/virtio-container-disk:v1.2.0
description: Reference to the containerdisk containing the virtio-win drivers ISO.
name: virtioContainerDiskName
type: string
- default: win11
description: Name of the base DataVolume which is created. Pre-installed Windows VMs can be created from this DataVolume.
name: baseDvName
type: string
- default: openshift-virtualization-os-images
description: Namespace of the base DataVolume which is created.
name: baseDvNamespace
type: string
- default: win11
description: Name of Windows ISO datavolume
name: isoDVName
type: string
tasks:
- name: import-win-iso
params:
- name: manifest
value: |-
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
generateName: $(params.isoDVName)-
spec:
source:
http:
url: $(params.winImageDownloadURL)
storage:
volumeMode: Filesystem
resources:
requests:
storage: 9Gi
- name: waitForSuccess
value: false
- name: allowReplace
value: true
taskRef:
resolver: hub
params:
- name: catalog
value: kubevirt-tekton-tasks
- name: type
value: artifact
- name: kind
value: task
- name: name
value: modify-data-object
- name: version
value: 4.15.0
- name: modify-windows-iso-file
params:
- name: pvcName
value: $(tasks.import-win-iso.results.name)
runAfter:
- import-win-iso
- create-vm-root-disk
taskRef:
resolver: hub
params:
- name: catalog
value: kubevirt-tekton-tasks
- name: type
value: artifact
- name: kind
value: task
- name: name
value: modify-windows-iso-file
- name: version
value: 4.15.0
- name: create-vm-root-disk
taskRef:
resolver: hub
params:
- name: catalog
value: kubevirt-tekton-tasks
- name: type
value: artifact
- name: kind
value: task
- name: name
value: modify-data-object
- name: version
value: 4.15.0
params:
- name: manifest
value: |-
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
generateName: windows-efi-root-disk-
spec:
storage:
resources:
requests:
storage: 20Gi
source:
blank: {}
- name: waitForSuccess
value: false
- name: create-vm
params:
- name: runStrategy
value: RerunOnFailure
- name: manifest
value: |-
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
generateName: windows-efi-
spec:
instancetype:
kind: $(params.instanceTypeKind)
name: $(params.instanceTypeName)
preference:
kind: $(params.virtualMachinePreferenceKind)
name: $(params.preferenceName)
template:
spec:
evictionStrategy: LiveMigrateIfPossible
domain:
devices:
disks:
- cdrom:
bus: sata
name: installcdrom
bootOrder: 2
- disk:
bus: virtio
name: rootdisk
bootOrder: 1
- cdrom:
bus: sata
name: virtiocontainerdisk
- cdrom:
bus: sata
name: sysprep
volumes:
- name: installcdrom
persistentVolumeClaim:
claimName: $(tasks.import-win-iso.results.name)
- name: virtiocontainerdisk
containerDisk:
image: $(params.virtioContainerDiskName)
- name: sysprep
sysprep:
configMap:
name: $(params.autounattendConfigMapName)
- dataVolume:
name: $(tasks.create-vm-root-disk.results.name)
name: rootdisk
runAfter:
- modify-windows-iso-file
taskRef:
resolver: hub
params:
- name: catalog
value: kubevirt-tekton-tasks
- name: type
value: artifact
- name: kind
value: task
- name: name
value: create-vm-from-manifest
- name: version
value: 4.15.0
- name: wait-for-vmi-status
params:
- name: vmiName
value: $(tasks.create-vm.results.name)
- name: vmiNamespace
value: $(tasks.create-vm.results.namespace)
- name: successCondition
value: status.phase == Succeeded
- name: failureCondition
value: status.phase in (Failed, Unknown)
runAfter:
- create-vm
taskRef:
resolver: hub
params:
- name: catalog
value: kubevirt-tekton-tasks
- name: type
value: artifact
- name: kind
value: task
- name: name
value: wait-for-vmi-status
- name: version
value: 4.15.0
timeout: 2h0m0s
- name: create-base-dv
params:
- name: manifest
value: |
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
annotations:
"cdi.kubevirt.io/storage.bind.immediate.requested": "true"
labels:
"instancetype.kubevirt.io/default-instancetype-kind": $(params.instanceTypeKind)
"instancetype.kubevirt.io/default-instancetype": $(params.instanceTypeName)
"instancetype.kubevirt.io/default-preference-kind": $(params.virtualMachinePreferenceKind)
"instancetype.kubevirt.io/default-preference": $(params.preferenceName)
name: $(params.baseDvName)
namespace: $(params.baseDvNamespace)
spec:
storage: {}
source:
pvc:
name: $(tasks.create-vm-root-disk.results.name)
namespace: $(tasks.create-vm-root-disk.results.namespace)
- name: waitForSuccess
value: true
- name: allowReplace
value: true
runAfter:
- wait-for-vmi-status
taskRef:
resolver: hub
params:
- name: catalog
value: kubevirt-tekton-tasks
- name: type
value: artifact
- name: kind
value: task
- name: name
value: modify-data-object
- name: version
value: 4.15.0
finally:
- name: cleanup-vm
params:
- name: vmName
value: $(tasks.create-vm.results.name)
- name: vmNamespace
value: $(tasks.create-vm.results.namespace)
- name: delete
value: true
taskRef:
resolver: hub
params:
- name: catalog
value: kubevirt-tekton-tasks
- name: type
value: artifact
- name: kind
value: task
- name: name
value: cleanup-vm
- name: version
value: 4.15.0
timeout: 10m0s
- name: delete-imported-iso
params:
- name: deleteObject
value: true
- name: deleteObjectKind
value: DataVolume
- name: deleteObjectName
value: $(tasks.import-win-iso.results.name)
- name: namespace
value: $(tasks.import-win-iso.results.namespace)
taskRef:
resolver: hub
params:
- name: catalog
value: kubevirt-tekton-tasks
- name: type
value: artifact
- name: kind
value: task
- name: name
value: modify-data-object
- name: version
value: 4.15.0
- name: delete-vm-rootdisk
params:
- name: deleteObject
value: true
- name: deleteObjectKind
value: DataVolume
- name: deleteObjectName
value: $(tasks.create-vm-root-disk.results.name)
- name: namespace
value: $(tasks.create-vm-root-disk.results.namespace)
taskRef:
resolver: hub
params:
- name: catalog
value: kubevirt-tekton-tasks
- name: type
value: artifact
- name: kind
value: task
- name: name
value: modify-data-object
- name: version
value: 4.15.0
results:
- description: Name of the created base DataVolume
name: baseDvName
value: $(tasks.create-base-dv.results.name)
- description: Namespace of the created base DataVolume
name: baseDvNamespace
value: $(tasks.create-base-dv.results.namespace)

0 comments on commit 7053d64

Please sign in to comment.