Hyperv Debian + UEFI
This commit is contained in:
+47
-9
@@ -1,12 +1,25 @@
|
||||
# vim: set ft=yaml:
|
||||
stages:
|
||||
- build
|
||||
- release
|
||||
|
||||
.build:
|
||||
stage: build
|
||||
cache:
|
||||
paths:
|
||||
- /var/lib/gitlab-runner/.config/packer/plugins/
|
||||
- key:
|
||||
files:
|
||||
- sources/build.pkr.hcl
|
||||
paths:
|
||||
- ./packer_config/
|
||||
- paths:
|
||||
- packer_cache/*.iso
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
variables:
|
||||
EXCEPT: ''
|
||||
- if: $CI_COMMIT_TAG =~ "/^$/"
|
||||
variables:
|
||||
EXCEPT: '-except=upload'
|
||||
needs:
|
||||
- pipeline: $PARENT_PIPELINE_ID
|
||||
job: distros
|
||||
@@ -17,21 +30,23 @@ stages:
|
||||
tags:
|
||||
- ${tag}
|
||||
variables: &variables
|
||||
PACKER_LOG: 1
|
||||
PACKER_CONFIG_DIR: ./packer_config/
|
||||
PACKER_LOG: 0
|
||||
COMMAND: >
|
||||
packer build ${only}
|
||||
-var-file="${distro}"
|
||||
-var build=${BUILD}
|
||||
-var cpus=2
|
||||
-var memory=4096
|
||||
-except=upload
|
||||
${EXCEPT}
|
||||
sources
|
||||
before_script:
|
||||
- packer init sources
|
||||
- echo $COMMAND
|
||||
script:
|
||||
- export EFI_DIR="$(dirname "$(find /nix/store -name OVMF_VARS.fd | head -1)")/"
|
||||
- echo $COMMAND > build.sh
|
||||
- bash build.sh
|
||||
- bash build.sh || exit 1
|
||||
|
||||
qemu.amd64:
|
||||
extends: .build
|
||||
@@ -50,6 +65,10 @@ virtualbox-iso.amd64:
|
||||
tag: vbox
|
||||
parallel:
|
||||
matrix: []
|
||||
after_script: |-
|
||||
if [ "$CI_JOB_STATUS" == "success" ]; then
|
||||
xonsh test.xsh
|
||||
fi
|
||||
|
||||
hyperv-iso.amd64:
|
||||
extends: .build
|
||||
@@ -59,9 +78,28 @@ 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
|
||||
- echo 'if (-not $?) { throw "Error in build"}' >> build.ps1
|
||||
- pwsh .\build.ps1
|
||||
after_script: |-
|
||||
if ( "$CI_JOB_STATUS" -eq "success" ) {
|
||||
xonsh test.xsh
|
||||
}
|
||||
|
||||
"Create release":
|
||||
stage: release
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
script: echo "Tagging as released"
|
||||
needs:
|
||||
- pipeline: $PARENT_PIPELINE_ID
|
||||
job: distros
|
||||
artifacts: true
|
||||
release:
|
||||
tag_name: '$CI_COMMIT_TAG'
|
||||
description: >-
|
||||
Release $CI_COMMIT_TAG, found on [Vagrant Cloud](https://app.vagrantup.com/boxen/)
|
||||
as version v${BUILD}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user