Files
vms/.gitlab-ci.yml
T
2024-07-13 03:03:14 -05:00

73 lines
1.2 KiB
YAML

stages:
- generate
- check
- trigger
variables:
PACKER_CONFIG_DIR: ./packer_config/
PACKER_CACHE_DIR: ./cache/
default:
image: registry.thehellings.com/greg/ci-images/vm-test:latest
tags:
- nix
generate:
stage: generate
artifacts:
paths:
- distros/**/*.pkrvars.hcl
script: nix run ".#generate"
continue:
stage: generate
artifacts:
reports:
dotenv: build.env
paths:
- .gitlab-ci-build.yml
script:
- nix build ".#continue"
- cp result .gitlab-ci-build.yml
- cat result
shellcheck:
stage: generate
script: nix run ".#shellcheck"
validate:
stage: check
needs:
- generate
cache:
- key:
files:
- sources/build.pkr.hcl
paths:
- ./packer_config/
script: nix run ".#validate"
# Makes sure that all of the ISO files we are looking for are
# present on the S3 buckets that we use
downloads:
stage: check
retry: 2
needs:
- generate
cache:
- key:
files:
- sources/build.pkr.hcl
paths:
- ./packer_config/
script: nix run ".#cache"
trigger:
stage: trigger
trigger:
include:
- artifact: .gitlab-ci-build.yml
job: continue
variables:
PARENT_PIPELINE_ID: $CI_PIPELINE_ID