Streamline the push and build process

This commit is contained in:
Greg Hellings
2025-08-17 14:30:55 -05:00
parent 612e04c4a0
commit 91500a155c
3 changed files with 76 additions and 63 deletions
+38
View File
@@ -0,0 +1,38 @@
generate:
stage: generate
artifacts:
paths:
- distros/**/*.pkrvars.hcl
reports:
dotenv: build.env
script: nix run ".#generate"
continue:
stage: generate
artifacts:
paths:
- .gitlab-ci-build.yml
script:
- nix build ".#continue"
- cp result .gitlab-ci-build.yml
- cat result
shellcheck:
stage: generate
script: nix run ".#shellcheck"
flake-check:
stage: generate
script: nix flake check
validate:
stage: check
needs:
- generate
cache:
- key:
files:
- sources/build.pkr.hcl
paths:
- ./packer_config/
script: nix run ".#validate"
+27
View File
@@ -0,0 +1,27 @@
# These jobs actually fetch the downloads and trigger the
# target builds. I don't want to do that on every single push,
# but only when I'm part of a merge request or release event
# 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