67 lines
1.2 KiB
YAML
67 lines
1.2 KiB
YAML
# vim: set ft=yaml:
|
|
stages:
|
|
- build
|
|
|
|
.build:
|
|
stage: build
|
|
cache:
|
|
paths:
|
|
- /var/lib/gitlab-runner/.config/packer/plugins/
|
|
needs:
|
|
- pipeline: $PARENT_PIPELINE_ID
|
|
job: distros
|
|
artifacts: true
|
|
- pipeline: $PARENT_PIPELINE_ID
|
|
job: generate
|
|
artifacts: true
|
|
tags:
|
|
- ${tag}
|
|
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:
|
|
matrix: []
|
|
|
|
virtualbox-iso.amd64:
|
|
extends: .build
|
|
variables:
|
|
<<: *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 |