Add Hyper-V to CI
This commit is contained in:
+37
-17
@@ -11,28 +11,32 @@ stages:
|
||||
- pipeline: $PARENT_PIPELINE_ID
|
||||
job: distros
|
||||
artifacts: true
|
||||
- pipeline: $PARENT_PIPELINE_ID
|
||||
job: generate
|
||||
artifacts: true
|
||||
tags:
|
||||
- ${tag}
|
||||
script: |
|
||||
set -exo pipefail
|
||||
export PACKER_LOG=1
|
||||
if [ -f "${distro}.sh" ]; then
|
||||
./"${distro}.sh"
|
||||
fi
|
||||
packer init sources
|
||||
packer build "${only}" \
|
||||
-var-file="${distro}" \
|
||||
-var "build=${BUILD}" \
|
||||
-var "cpus=2" \
|
||||
-var "memory=4096" \
|
||||
-var "http_port_min=${HTTP_PORT_MIN:-8000}" \
|
||||
-var "http_port_max=${HTTP_PORT_MAX:-9000}" \
|
||||
-except=upload \
|
||||
sources
|
||||
variables: &variables
|
||||
PACKER_LOG: 1
|
||||
COMMAND: >
|
||||
packer build ${only}
|
||||
-var-file="${distro}"
|
||||
-var build=${BUILD}
|
||||
-var cpus=2
|
||||
-var memory=4096
|
||||
-except=upload
|
||||
sources
|
||||
before_script:
|
||||
- packer init sources
|
||||
- echo $COMMAND
|
||||
script:
|
||||
- echo $COMMAND > build.sh
|
||||
- bash build.sh
|
||||
|
||||
qemu.amd64:
|
||||
extends: .build
|
||||
variables:
|
||||
<<: *variables
|
||||
only: "-only=qemu.amd64"
|
||||
tag: qemu
|
||||
parallel:
|
||||
@@ -41,7 +45,23 @@ qemu.amd64:
|
||||
virtualbox-iso.amd64:
|
||||
extends: .build
|
||||
variables:
|
||||
only: "-only=virtualbox-iso.amd64"
|
||||
<<: *variables
|
||||
only: '-only="virtualbox-iso.amd64"'
|
||||
tag: vbox
|
||||
parallel:
|
||||
matrix: []
|
||||
|
||||
hyperv-iso.amd64:
|
||||
extends: .build
|
||||
variables:
|
||||
<<: *variables
|
||||
only: '-only="hyperv-iso.amd64"'
|
||||
tag: hyperv
|
||||
parallel:
|
||||
matrix: []
|
||||
cache:
|
||||
paths:
|
||||
- C:\Users\gregh\AppData\Roaming\packer.d\plugins\
|
||||
script:
|
||||
- echo $env:COMMAND > build.ps1
|
||||
- powershell .\build.ps1
|
||||
Reference in New Issue
Block a user