Files
image-specs/debian/salsa-ci.yml
Diederik de Haas 9bb0488096 Fix shellcheck issue SC2154
SC2154: var is referenced but not assigned.

The 'rootmnt' variable is set in /usr/share/initramfs-tools/init and if
it's not available, that would be bad.
According to SC2154 you can fix that issue by using '${var:?}' so it
would fail if unset or empty.
So apply that and reference that SC item in the comments.

Also remove it from the exclude list in the CI config file.
2022-11-14 22:38:47 +01:00

44 lines
1.1 KiB
YAML

---
stages:
# Garbage in is garbage out, so verify our input
- check input
- build
variables:
DEBIAN_FRONTEND: "noninteractive"
# At https://salsa.debian.org/salsa-ci-team/pipeline/container_registry one can see which images are available
SALSA_CI_IMAGES: registry.salsa.debian.org/salsa-ci-team/pipeline
BASE_CI_IMAGES: ${SALSA_CI_IMAGES}/base
yamllint:
stage: check input
image: $BASE_CI_IMAGES:unstable
dependencies: []
script:
- apt-get update && apt-get upgrade -y
- apt-get install -y yamllint
- yamllint -c debian/yamllint.yml .
shellcheck:
stage: check input
image: $BASE_CI_IMAGES:unstable
dependencies: []
script:
- apt-get update && apt-get upgrade -y
- apt-get install -y shellcheck
- shellcheck -e SC1090,SC1091,SC2086 -s dash $(find rootfs/etc/initramfs-tools -type f -executable | xargs grep -l '^#!/bin/sh')
build yamls:
stage: build
image: $BASE_CI_IMAGES:unstable
dependencies: []
script:
- apt-get update && apt-get upgrade -y
- apt-get install -y python3 make git
- make yaml
- mkdir build
- cp raspi*.yaml build/
artifacts:
paths:
- build/