Skip to content

Commit

Permalink
Adjust .yamllint and add .yamltidy
Browse files Browse the repository at this point in the history
Currently we cannot use .yamllint from os-autoinst-common as
the yamllint version in Leap does not support ignore-from-file.

I ran all files which yamllint complained about through yamltidy,
and all passes now.
  • Loading branch information
perlpunk committed Jan 23, 2024
1 parent ad66406 commit 968a075
Show file tree
Hide file tree
Showing 19 changed files with 425 additions and 406 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
node-version: [16.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm i
- name: npm run lint
run: npm run lint
- uses: actions/checkout@v1
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm i
- name: npm run lint
run: npm run lint
44 changes: 22 additions & 22 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@ pull_request_rules:
- name: automatic merge
conditions:
- and: &base_checks
- base=master
- -label~=^acceptance-tests-needed|not-ready
# wait explicitly for one of the final checks to show up to be on the
# safe side even in case of checks not reporting back at all
- "status-success=codecov/project"
- "status-success=codecov/patch"
# Multibuild results will not report the "pending" status:
# https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.scm_ci_workflow_integration.html#sec.obs.obs_scm_ci_workflow_integration.setup.status_reporting
# "unresolvable" is not reported in general:
# https://trello.com/c/0N3jHq5M/2257-report-back-to-scm-when-build-results-arent-failed-and-succeeded
# So we need to require the number of tests explicitly:
- "#check-success>=35"
- "status-success=static-check-containers"
- "status-success=webui-docker-compose"
- "#check-failure=0"
- "#check-pending=0"
- linear-history
- base=master
- -label~=^acceptance-tests-needed|not-ready
# wait explicitly for one of the final checks to show up to be on the
# safe side even in case of checks not reporting back at all
- status-success=codecov/project
- status-success=codecov/patch
# Multibuild results will not report the "pending" status:
# https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.scm_ci_workflow_integration.html#sec.obs.obs_scm_ci_workflow_integration.setup.status_reporting
# "unresolvable" is not reported in general:
# https://trello.com/c/0N3jHq5M/2257-report-back-to-scm-when-build-results-arent-failed-and-succeeded
# So we need to require the number of tests explicitly:
- "#check-success>=35"
- status-success=static-check-containers
- status-success=webui-docker-compose
- "#check-failure=0"
- "#check-pending=0"
- linear-history
- and:
- "#approved-reviews-by>=2"
- "#changes-requested-reviews-by=0"
# https://doc.mergify.io/examples.html#require-all-requested-reviews-to-be-approved
- "#review-requested=0"
- "#approved-reviews-by>=2"
- "#changes-requested-reviews-by=0"
# https://doc.mergify.io/examples.html#require-all-requested-reviews-to-be-approved
- "#review-requested=0"
actions: &merge
merge:
method: merge
- name: automatic merge on special label
conditions:
- and: *base_checks
- "label=merge-fast"
- label=merge-fast
actions: *merge
- name: automatic merge for dependency bot updates
conditions:
Expand Down
54 changes: 27 additions & 27 deletions .obs/workflows.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
---
pr:
steps:
- branch_package:
source_project: devel:openQA
source_package: openQA
target_project: devel:openQA:GitHub
add_repositories: disabled
- configure_repositories:
project: devel:openQA:GitHub
repositories:
- name: openSUSE_Tumbleweed
paths:
- target_project: openSUSE:Factory
target_repository: snapshot
- target_project: devel:openQA
target_repository: openSUSE_Tumbleweed
architectures: [ x86_64 ]
- name: openSUSE_Leap_15.5
paths:
- target_project: devel:openQA:Leap:15.5
target_repository: openSUSE_Leap_15.5
- target_project: devel:openQA
target_repository: openSUSE_Leap_15.5
architectures: [ x86_64 ]
- name: SLE_15_SP6_Backports
paths:
- target_project: openSUSE:Backports:SLE-15-SP6:Update
target_repository: standard
architectures: [ x86_64 ]
- branch_package:
source_project: devel:openQA
source_package: openQA
target_project: devel:openQA:GitHub
add_repositories: disabled
- configure_repositories:
project: devel:openQA:GitHub
repositories:
- name: openSUSE_Tumbleweed
paths:
- target_project: openSUSE:Factory
target_repository: snapshot
- target_project: devel:openQA
target_repository: openSUSE_Tumbleweed
architectures: [ x86_64 ]
- name: openSUSE_Leap_15.5
paths:
- target_project: devel:openQA:Leap:15.5
target_repository: openSUSE_Leap_15.5
- target_project: devel:openQA
target_repository: openSUSE_Leap_15.5
architectures: [ x86_64 ]
- name: SLE_15_SP6_Backports
paths:
- target_project: openSUSE:Backports:SLE-15-SP6:Update
target_repository: standard
architectures: [ x86_64 ]
filters:
event: pull_request

Expand Down
21 changes: 16 additions & 5 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
extends: default
ignore: |
t/data/job-templates/invalid-yaml-schema.yaml
t/data/job-templates/duplicate-key.yaml
t/data/08-opensuse-test.yaml
t/data/08-opensuse.yaml
container/helm/**
dbicdh
node_modules


rules:
line-length:
max: 160
document-start: disable
indentation:
indent-sequences: whatever
indent-sequences: true
spaces: 2

# Allows aligning subsequent lines with [] sequences
brackets:
min-spaces-inside: 0
max-spaces-inside: -1
commas:
max-spaces-after: -1

# Allows aligning key value pairs
colons:
max-spaces-after: -1

ignore: |
t/data/job-templates/invalid-yaml-schema.yaml
t/data/job-templates/duplicate-key.yaml
container/helm/**
truthy:
allowed-values: ['true', 'false']
check-keys: false
8 changes: 8 additions & 0 deletions .yamltidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
v: v0.1
indentation:
spaces: 2
block-sequence-in-mapping: 2
trailing-spaces: fix
scalar-style:
default: plain
12 changes: 6 additions & 6 deletions public/schema/JobScenarios-01.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ description: Definitions for openQA job scenarios
type: object
additionalProperties: false
required:
- job_templates
- job_templates
patternProperties:
'^\.[a-z0-9_]+$':
^\.[a-z0-9_]+$:
type: object
description: Definitions that can be re-used

Expand All @@ -15,7 +15,7 @@ properties:
type: object
additionalProperties: false
patternProperties:
'^[A-Za-z0-9._*-]+$':
^[A-Za-z0-9._*-]+$:
type: object
description: The name of a product (medium)
required:
Expand All @@ -40,14 +40,14 @@ properties:
description: Additional test variables to be set
additionalProperties: false
patternProperties:
'^[A-Z_+]+[A-Z0-9_]*$':
^[A-Z_+]+[A-Z0-9_]*$:
type: string

machines:
type: object
additionalProperties: false
patternProperties:
'^[A-Za-z0-9._*-]+$':
^[A-Za-z0-9._*-]+$:
type: object
description: The name of a machine
required:
Expand All @@ -66,7 +66,7 @@ properties:
type: object
additionalProperties: false
patternProperties:
'^[A-Za-z\s0-9_*.+-]+$':
^[A-Za-z\s0-9_*.+-]+$:
type: object
description: The name of the job template
additionalProperties: false
Expand Down
82 changes: 41 additions & 41 deletions public/schema/JobTemplates-01.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ description: openQA job template
type: object
additionalProperties: false
required:
- products
- scenarios
- products
- scenarios
patternProperties:
'^\.[a-z0-9_]+$':
^\.[a-z0-9_]+$:
type: object
description: Definitions that can be re-used

Expand All @@ -17,60 +17,60 @@ properties:
type: object
additionalProperties: false
patternProperties:
'^[a-z0-9_]+$':
^[a-z0-9_]+$:
type: object
description: The architecture of the test suite(s) eg. ppc64le
patternProperties:
'^.*$':
^.*$:
type: array
description: The product to run the test suite(s) on
items:
anyOf:
- type: string
description: Name of a test suite name
- type: object
maxProperties: 1
description: A test suite with machine and/or priority value specified, or a custom job template name if testsuite was specified
additionalProperties: false
patternProperties:
&testsuite-pattern '^[A-Za-z\s0-9_*.+-]+$':
type: object
additionalProperties: false
properties:
machine: &machine-definition
oneOf:
- type: string
- type: array
items:
- type: string
description: Name of a test suite name
- type: object
maxProperties: 1
description: A test suite with machine and/or priority value specified, or a custom job template name if testsuite was specified
additionalProperties: false
patternProperties:
&testsuite-pattern ^[A-Za-z\s0-9_*.+-]+$:
type: object
additionalProperties: false
properties:
machine: &machine-definition
oneOf:
- type: string
priority: &priority-definition
type: number
settings: &settings-definition
type: object
description: Additional test variables to be set
additionalProperties: false
patternProperties:
'^[A-Z_+]+[A-Z0-9_]*$':
type: string
testsuite:
type: [string, 'null']
pattern: *testsuite-pattern
description: The test suite this scenario is based on if a custom job template name was used
description:
type: string
description: The description of the job template
- type: array
items:
- type: string
priority: &priority-definition
type: number
settings: &settings-definition
type: object
description: Additional test variables to be set
additionalProperties: false
patternProperties:
^[A-Z_+]+[A-Z0-9_]*$:
type: string
testsuite:
type: [string, 'null']
pattern: *testsuite-pattern
description: The test suite this scenario is based on if a custom job template name was used
description:
type: string
description: The description of the job template

defaults:
description: A set of architectures with default configurations
type: object
additionalProperties: false
patternProperties:
'^[a-z0-9_]+$':
^[a-z0-9_]+$:
type: object
description: The architecture to define a default configuration for eg. ppc64le
required:
- machine
- priority
- machine
- priority
additionalProperties: false
properties:
machine: *machine-definition
Expand All @@ -81,7 +81,7 @@ properties:
type: object
additionalProperties: false
patternProperties:
'^[A-Za-z0-9._*-]+$':
^[A-Za-z0-9._*-]+$:
type: object
description: The name of a product (medium)
required:
Expand Down
16 changes: 8 additions & 8 deletions t/data/08-create-modify-group.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
scenarios:
i586:
opensuse-13.1-DVD-i586:
- foobar # Test names shouldn't conflict across groups
- spam
- eggs:
machine: 32bit
priority: 20
settings:
FOO: removed later
BAR: updated later
- foobar # Test names shouldn't conflict across groups
- spam
- eggs:
machine: 32bit
priority: 20
settings:
FOO: removed later
BAR: updated later
defaults:
i586:
machine: 64bit
Expand Down
8 changes: 4 additions & 4 deletions t/data/08-hidden-keys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ products:
scenarios:
i586:
opensuse-13.1-DVD-i586:
- kde_usb:
settings:
USB: '1'
<<: *kde_template
- kde_usb:
settings:
USB: '1'
<<: *kde_template
Loading

0 comments on commit 968a075

Please sign in to comment.