mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-03 10:31:25 +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:
|
stages:
|
||||||
- preflight
|
- preflight
|
||||||
|
|
||||||
# Generic DIND template
|
|
||||||
.dind: &dind
|
|
||||||
before_script:
|
|
||||||
- docker info
|
|
||||||
services:
|
|
||||||
- name: docker:dind
|
|
||||||
command: ["--experimental"]
|
|
||||||
|
|
||||||
# Generic preflight template
|
# Generic preflight template
|
||||||
.preflight: &preflight
|
.preflight: &preflight
|
||||||
stage: preflight
|
stage: preflight
|
||||||
|
@ -24,9 +16,7 @@ stages:
|
||||||
# Preflight jobs
|
# Preflight jobs
|
||||||
shellcheck:
|
shellcheck:
|
||||||
<<: *preflight
|
<<: *preflight
|
||||||
image:
|
image: pipelinecomponents/shellcheck:latest
|
||||||
name: koalaman/shellcheck-alpine:stable
|
|
||||||
entrypoint: [""]
|
|
||||||
before_script:
|
before_script:
|
||||||
- shellcheck --version
|
- shellcheck --version
|
||||||
- apk --no-cache add grep
|
- apk --no-cache add grep
|
||||||
|
@ -35,8 +25,8 @@ shellcheck:
|
||||||
xargs -0 sed -i 's:#!/usr/bin/with-contenv bash:#!/bin/bash:g'
|
xargs -0 sed -i 's:#!/usr/bin/with-contenv bash:#!/bin/bash:g'
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
for file in $(grep -IRl "#\!\(/usr/bin/env \|/bin/\)" --exclude-dir ".git" "${ADDON_TARGET}"); do
|
for file in $(grep -IRl "#\!\(/usr/bin/env \|/bin/\)" --exclude-dir ".git" "lib"); do
|
||||||
if ! shellcheck $file; then
|
if ! shellcheck --external-sources $file; then
|
||||||
export FAILED=1
|
export FAILED=1
|
||||||
else
|
else
|
||||||
echo "$file OK"
|
echo "$file OK"
|
||||||
|
@ -48,7 +38,7 @@ shellcheck:
|
||||||
|
|
||||||
yamllint:
|
yamllint:
|
||||||
<<: *preflight
|
<<: *preflight
|
||||||
image: sdesbure/yamllint
|
image: pipelinecomponents/yamllint:latest
|
||||||
before_script:
|
before_script:
|
||||||
- yamllint --version
|
- yamllint --version
|
||||||
script:
|
script:
|
||||||
|
@ -56,7 +46,7 @@ yamllint:
|
||||||
|
|
||||||
jsonlint:
|
jsonlint:
|
||||||
<<: *preflight
|
<<: *preflight
|
||||||
image: sahsu/docker-jsonlint
|
image: pipelinecomponents/jsonlint:latest
|
||||||
before_script:
|
before_script:
|
||||||
- jsonlint --version || true
|
- jsonlint --version || true
|
||||||
script:
|
script:
|
||||||
|
@ -74,11 +64,8 @@ jsonlint:
|
||||||
|
|
||||||
markdownlint:
|
markdownlint:
|
||||||
<<: *preflight
|
<<: *preflight
|
||||||
image:
|
image: pipelinecomponents/markdownlint:latest
|
||||||
name: ruby:alpine
|
|
||||||
entrypoint: [""]
|
|
||||||
before_script:
|
before_script:
|
||||||
- gem install mdl
|
|
||||||
- mdl --version
|
- mdl --version
|
||||||
script:
|
script:
|
||||||
- mdl --style all --warnings .
|
- 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