Skip to content

Commit

Permalink
Enable yaml formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed Mar 15, 2024
1 parent 4467d22 commit 02aa7f0
Show file tree
Hide file tree
Showing 22 changed files with 32 additions and 125 deletions.
3 changes: 0 additions & 3 deletions .github/actions/vagrant-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Install and configure tools required for the CI vagrant composite task

inputs:
distro:
description: Linux distribution
default: ubuntu

runs:
using: "composite"
steps:
Expand Down
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

version: 2
updates:
- package-ecosystem: "github-actions"
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Scheduled Kolla Images Build verification
# yamllint disable-line rule:truthy
on:
Expand All @@ -21,17 +20,16 @@ on:
schedule:
- cron: '0 0 * * 5'
workflow_dispatch:

jobs:
build-baremetal:
name: Check building and publishing Kolla Docker images in a local Docker registry on an Ubuntu Jammy Virtual Environment
runs-on: ubuntu-22.04
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
) || github.event_name != 'pull_request_review'
steps:
- uses: actions/[email protected]
- name: Install requirements
Expand Down Expand Up @@ -60,10 +58,10 @@ jobs:
runs-on: macos-12
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
) || github.event_name != 'pull_request_review'
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/vagrant-setup
Expand All @@ -73,6 +71,7 @@ jobs:
env:
VAGRANT_DISABLE_VBOXSYMLINKCREATE: 1
OS_DISTRO: ${{ matrix.distro }}
OS_KOLLA_BUILD_ARGS: ${{ matrix.image }} --registry 127.0.0.1:5000 --push --threads 2 --quiet --retries 5 --cache --push-threads 2 --base ${{ matrix.base }}
OS_KOLLA_BUILD_ARGS: ${{ matrix.image }} --registry 127.0.0.1:5000 --push --threads 2 --quiet --retries 5 --cache --push-threads 2 --base ${{ matrix.base
}}
working-directory: ./samples/distributed
run: vagrant up registry
2 changes: 0 additions & 2 deletions .github/workflows/diagram.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Documentation and diagram generation
# yamllint disable-line rule:truthy
on:
Expand All @@ -16,7 +15,6 @@ on:
- codebase-structure.svg
- .github/
workflow_dispatch:

jobs:
check-diagram:
name: Update the codebase structure diagram
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Scheduled Latest Vagrant Boxes verification
# yamllint disable-line rule:truthy
on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:

jobs:
check-versions:
permissions:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Lint Code Base
# yamllint disable-line rule:truthy
on:
push:
pull_request:

jobs:
check-broken-links:
name: Check documentation external links
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/on-demand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Check Bash scripts
# yamllint disable-line rule:truthy
on:
Expand All @@ -17,16 +16,15 @@ on:
pull_request_review:
types:
- submitted

jobs:
check-format:
name: Check scripts format
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
) || github.event_name != 'pull_request_review'
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/on-demand_aio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Check All-in-One setup
# yamllint disable-line rule:truthy
on:
Expand All @@ -21,16 +20,15 @@ on:
pull_request_review:
types:
- submitted

jobs:
generate-json-matrix:
runs-on: ubuntu-latest
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
) || github.event_name != 'pull_request_review'
steps:
- uses: actions/[email protected]
- name: Get matrix values
Expand Down Expand Up @@ -74,10 +72,10 @@ jobs:
name: Check All-in-One deployment on Ubuntu Jammy Virtual Environment
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
) || github.event_name != 'pull_request_review'
env:
OS_KOLLA_ENABLE_CINDER: "no"
steps:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/on-demand_noha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Check No High Availability setup
# yamllint disable-line rule:truthy
on:
Expand All @@ -21,17 +20,16 @@ on:
pull_request_review:
types:
- submitted

jobs:
check-noha-ubuntu:
name: Check No High Availability deployment on Ubuntu Focal Virtual Machines
runs-on: macos-12
if: >-
(
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved'
) ||
github.event_name != 'pull_request_review'
) || github.event_name != 'pull_request_review'
env:
VAGRANT_DISABLE_VBOXSYMLINKCREATE: 1
VAGRANT_EXPERIMENTAL: disks
Expand All @@ -55,7 +53,7 @@ jobs:
CPUS: 1
working-directory: ./samples/noha
run: vagrant reload compute01
# NOTE: macOS provides 3 vCPUS and 14 GB of RAM (https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources)
# NOTE: macOS provides 3 vCPUS and 14 GB of RAM (https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources)
- name: Deploy OpenStack Control nodes
env:
OS_DEBUG: true
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Automatic Rebase
# yamllint disable-line rule:truthy
on:
issue_comment:
types: [created]

jobs:
rebase:
name: Rebase
Expand All @@ -24,7 +22,7 @@ jobs:
uses: actions/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/scheduled_aio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Scheduled OpenStack All-in-One verification
# yamllint disable-line rule:truthy
on:
schedule:
- cron: '0 0 * * 5'
workflow_dispatch:

jobs:
generate-json-matrix:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/spell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Run misspell
# yamllint disable-line rule:truthy
on:
Expand All @@ -18,7 +17,6 @@ on:
pull_request_review:
types:
- submitted

jobs:
check-reviewdog:
name: Check spelling (reviewdog)
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Scheduled Versions and Dictionary verification
# yamllint disable-line rule:truthy
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
check-versions:
name: Update python requirements files
Expand Down
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

AllCops:
NewCops: enable
Metrics/BlockLength:
Expand Down
1 change: 0 additions & 1 deletion .spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

matrix:
- name: markdown
dictionary:
Expand Down
4 changes: 0 additions & 4 deletions .yaml-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

extends: default

yaml-files:
- '*.yml'

ignore: |
.tox/
rules:
line-length: disable
comments: disable
13 changes: 13 additions & 0 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2020
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
formatter:
type: basic
include_document_start: true
pad_line_comments: 2
max_line_length: 160
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ lint:
fmt:
sudo -E $(DOCKER_CMD) run --rm -u "$$(id -u):$$(id -g)" \
-v "$$(pwd):/mnt" -v /mnt/spec -w /mnt mvdan/shfmt -l -w -i 4 -s .
command -v yamlfmt > /dev/null || curl -s "https://i.jpillora.com/google/yamlfmt!!" | bash
yamlfmt -dstar **/*.{yaml,yml}
1 change: 0 additions & 1 deletion distros_supported.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

rocky_9:
name: rockylinux/9
vb_controller: IDE Controller
Expand Down
Loading

0 comments on commit 02aa7f0

Please sign in to comment.