mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-03 02:21:21 +00:00
🔨 Updates GitLab CI build script
This commit is contained in:
parent
01b5c70639
commit
7cbbd0e5bf
2 changed files with 70 additions and 19 deletions
|
@ -7,14 +7,6 @@ variables:
|
|||
stages:
|
||||
- preflight
|
||||
|
||||
# Generic DIND template
|
||||
.dind: &dind
|
||||
before_script:
|
||||
- docker info
|
||||
services:
|
||||
- name: docker:dind
|
||||
command: ["--experimental"]
|
||||
|
||||
# Generic preflight template
|
||||
.preflight: &preflight
|
||||
stage: preflight
|
||||
|
@ -24,9 +16,7 @@ stages:
|
|||
# Preflight jobs
|
||||
shellcheck:
|
||||
<<: *preflight
|
||||
image:
|
||||
name: koalaman/shellcheck-alpine:stable
|
||||
entrypoint: [""]
|
||||
image: pipelinecomponents/shellcheck:latest
|
||||
before_script:
|
||||
- shellcheck --version
|
||||
- apk --no-cache add grep
|
||||
|
@ -35,8 +25,8 @@ shellcheck:
|
|||
xargs -0 sed -i 's:#!/usr/bin/with-contenv bash:#!/bin/bash:g'
|
||||
script:
|
||||
- |
|
||||
for file in $(grep -IRl "#\!\(/usr/bin/env \|/bin/\)" --exclude-dir ".git" "${ADDON_TARGET}"); do
|
||||
if ! shellcheck $file; then
|
||||
for file in $(grep -IRl "#\!\(/usr/bin/env \|/bin/\)" --exclude-dir ".git" "lib"); do
|
||||
if ! shellcheck --external-sources $file; then
|
||||
export FAILED=1
|
||||
else
|
||||
echo "$file OK"
|
||||
|
@ -48,7 +38,7 @@ shellcheck:
|
|||
|
||||
yamllint:
|
||||
<<: *preflight
|
||||
image: sdesbure/yamllint
|
||||
image: pipelinecomponents/yamllint:latest
|
||||
before_script:
|
||||
- yamllint --version
|
||||
script:
|
||||
|
@ -56,7 +46,7 @@ yamllint:
|
|||
|
||||
jsonlint:
|
||||
<<: *preflight
|
||||
image: sahsu/docker-jsonlint
|
||||
image: pipelinecomponents/jsonlint:latest
|
||||
before_script:
|
||||
- jsonlint --version || true
|
||||
script:
|
||||
|
@ -74,11 +64,8 @@ jsonlint:
|
|||
|
||||
markdownlint:
|
||||
<<: *preflight
|
||||
image:
|
||||
name: ruby:alpine
|
||||
entrypoint: [""]
|
||||
image: pipelinecomponents/markdownlint:latest
|
||||
before_script:
|
||||
- gem install mdl
|
||||
- mdl --version
|
||||
script:
|
||||
- mdl --style all --warnings .
|
||||
|
|
64
.yamllint
Normal file
64
.yamllint
Normal file
|
@ -0,0 +1,64 @@
|
|||
---
|
||||
rules:
|
||||
braces:
|
||||
level: error
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 1
|
||||
min-spaces-inside-empty: -1
|
||||
max-spaces-inside-empty: -1
|
||||
brackets:
|
||||
level: error
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 0
|
||||
min-spaces-inside-empty: -1
|
||||
max-spaces-inside-empty: -1
|
||||
colons:
|
||||
level: error
|
||||
max-spaces-before: 0
|
||||
max-spaces-after: 1
|
||||
commas:
|
||||
level: error
|
||||
max-spaces-before: 0
|
||||
min-spaces-after: 1
|
||||
max-spaces-after: 1
|
||||
comments:
|
||||
level: error
|
||||
require-starting-space: true
|
||||
min-spaces-from-content: 2
|
||||
comments-indentation:
|
||||
level: error
|
||||
document-end:
|
||||
level: error
|
||||
present: false
|
||||
document-start:
|
||||
level: error
|
||||
present: true
|
||||
empty-lines:
|
||||
level: error
|
||||
max: 1
|
||||
max-start: 0
|
||||
max-end: 1
|
||||
hyphens:
|
||||
level: error
|
||||
max-spaces-after: 1
|
||||
indentation:
|
||||
level: error
|
||||
spaces: 2
|
||||
indent-sequences: true
|
||||
check-multi-line-strings: false
|
||||
key-duplicates:
|
||||
level: error
|
||||
line-length:
|
||||
level: warning
|
||||
max: 120
|
||||
allow-non-breakable-words: true
|
||||
allow-non-breakable-inline-mappings: true
|
||||
new-line-at-end-of-file:
|
||||
level: error
|
||||
new-lines:
|
||||
level: error
|
||||
type: unix
|
||||
trailing-spaces:
|
||||
level: error
|
||||
truthy:
|
||||
level: error
|
Loading…
Add table
Add a link
Reference in a new issue