feat: Use yaml-rust2 to get line numbers for better errors
This commit is contained in:
parent
e67a427dc3
commit
1481fba40a
14 changed files with 930 additions and 221 deletions
|
|
@ -89,6 +89,7 @@ validate:
|
|||
RUN --no-cache bluebuild -v validate recipes/recipe-invalid.yml && exit 1 || exit 0
|
||||
RUN --no-cache bluebuild -v validate recipes/recipe-invalid-module.yml && exit 1 || exit 0
|
||||
RUN --no-cache bluebuild -v validate recipes/recipe-invalid-stage.yml && exit 1 || exit 0
|
||||
RUN --no-cache bluebuild -v validate recipes/recipe-invalid-from-file.yml && exit 1 || exit 0
|
||||
|
||||
legacy-base:
|
||||
FROM ../+blue-build-cli-alpine --RELEASE=false
|
||||
|
|
|
|||
7
integration-tests/test-repo/recipes/invalid-module.yml
Normal file
7
integration-tests/test-repo/recipes/invalid-module.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://schema.blue-build.org/module-list-v1.json
|
||||
modules:
|
||||
# Tests installing rpms from a combo image stage
|
||||
- type: akmods
|
||||
install: openrazer
|
||||
|
||||
37
integration-tests/test-repo/recipes/invalid-stages.yml
Normal file
37
integration-tests/test-repo/recipes/invalid-stages.yml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://schema.blue-build.org/module-stage-list-v1.json
|
||||
stages:
|
||||
- name: ubuntu-test
|
||||
from:
|
||||
- ubuntu
|
||||
modules: {}
|
||||
- name: debian-test
|
||||
from: debian
|
||||
modules:
|
||||
- from-file: stages.yml
|
||||
- name: fedora-test
|
||||
from: fedora
|
||||
modules:
|
||||
- from-file: stages.yml
|
||||
- name: alpine-test
|
||||
from: alpine
|
||||
modules:
|
||||
- from-file: stages.yml
|
||||
modules:
|
||||
- type: files
|
||||
files:
|
||||
- usr: /usr
|
||||
- type: script
|
||||
scripts:
|
||||
- example.sh
|
||||
snippets:
|
||||
- echo "test" > /test.txt
|
||||
- type: test-module
|
||||
source: local
|
||||
- type: containerfile
|
||||
containerfiles:
|
||||
- labels
|
||||
snippets:
|
||||
- RUN echo "This is a snippet"
|
||||
- type: rpm-ostree
|
||||
install: micro
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://schema.blue-build.org/recipe-v1.json
|
||||
name: cli/test
|
||||
description: This is my personal OS image.
|
||||
base-image: ghcr.io/ublue-os/silverblue-main
|
||||
image-version: 40
|
||||
stages:
|
||||
- from-file: invalid-stages.yml
|
||||
modules:
|
||||
- from-file: invalid-module.yml
|
||||
- from-file: flatpaks.yml
|
||||
|
||||
- type: files
|
||||
files:
|
||||
- source: usr
|
||||
destination: /usr
|
||||
|
||||
- type: script
|
||||
scripts:
|
||||
- example.sh
|
||||
|
||||
- type: rpm-ostree
|
||||
repos:
|
||||
- https://copr.fedorainfracloud.org/coprs/atim/starship/repo/fedora-%OS_VERSION%/atim-starship-fedora-%OS_VERSION%.repo
|
||||
install:
|
||||
- micro
|
||||
- starship
|
||||
remove:
|
||||
- firefox
|
||||
- firefox-langpacks
|
||||
|
||||
- type: signing
|
||||
|
||||
- type: test-module
|
||||
source: local
|
||||
|
||||
- type: containerfile
|
||||
containerfiles:
|
||||
- labels
|
||||
snippets:
|
||||
- RUN echo "This is a snippet" && ostree container commit
|
||||
|
||||
- type: copy
|
||||
from: alpine-test
|
||||
src: /test.txt
|
||||
dest: /
|
||||
- type: copy
|
||||
from: ubuntu-test
|
||||
src: /test.txt
|
||||
dest: /
|
||||
- type: copy
|
||||
from: debian-test
|
||||
src: /test.txt
|
||||
dest: /
|
||||
- type: copy
|
||||
from: fedora-test
|
||||
src: /test.txt
|
||||
dest: /
|
||||
Loading…
Add table
Add a link
Reference in a new issue