mirror of
https://github.com/kairos-io/osbuilder.git
synced 2025-09-13 13:50:36 +00:00
16
.github/workflows/lint.yaml
vendored
Normal file
16
.github/workflows/lint.yaml
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
name: Lint
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**'
|
||||||
|
env:
|
||||||
|
FORCE_COLOR: 1
|
||||||
|
jobs:
|
||||||
|
call-workflow:
|
||||||
|
uses: kairos-io/linting-composite-action/.github/workflows/reusable-linting.yaml@v0.0.6
|
||||||
|
with:
|
||||||
|
yamldirs: ".github/workflows/ config/ tools-image/"
|
||||||
|
is-go: true
|
5
.shellcheckrc
Normal file
5
.shellcheckrc
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
disable=SC2086
|
||||||
|
disable=SC2034
|
||||||
|
disable=SC2046
|
||||||
|
disable=SC2068
|
||||||
|
disable=SC2154
|
21
.yamllint
Normal file
21
.yamllint
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
# 80 chars should be enough, but don't fail if a line is longer
|
||||||
|
line-length:
|
||||||
|
max: 150
|
||||||
|
level: warning
|
||||||
|
|
||||||
|
# accept both key:
|
||||||
|
# - item
|
||||||
|
#
|
||||||
|
# and key:
|
||||||
|
# - item
|
||||||
|
indentation:
|
||||||
|
indent-sequences: whatever
|
||||||
|
|
||||||
|
truthy:
|
||||||
|
check-keys: false
|
||||||
|
|
||||||
|
document-start:
|
||||||
|
present: false
|
@@ -73,8 +73,6 @@ vars:
|
|||||||
# kind: Service
|
# kind: Service
|
||||||
# version: v1
|
# version: v1
|
||||||
# name: webhook-service
|
# name: webhook-service
|
||||||
|
|
||||||
vars:
|
|
||||||
- name: NGINX_NAMESPACE
|
- name: NGINX_NAMESPACE
|
||||||
objref:
|
objref:
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
# Prometheus Monitor Service (Metrics)
|
# Prometheus Monitor Service (Metrics)
|
||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
kind: ServiceMonitor
|
kind: ServiceMonitor
|
||||||
|
@@ -26,7 +26,8 @@ set -e
|
|||||||
kubectl cluster-info --context kind-$CLUSTER_NAME
|
kubectl cluster-info --context kind-$CLUSTER_NAME
|
||||||
echo "Sleep to give times to node to populate with all info"
|
echo "Sleep to give times to node to populate with all info"
|
||||||
kubectl wait --for=condition=Ready node/$CLUSTER_NAME-control-plane
|
kubectl wait --for=condition=Ready node/$CLUSTER_NAME-control-plane
|
||||||
export EXTERNAL_IP=$(kubectl get nodes -o jsonpath='{.items[].status.addresses[?(@.type == "InternalIP")].address}')
|
EXTERNAL_IP=$(kubectl get nodes -o jsonpath='{.items[].status.addresses[?(@.type == "InternalIP")].address}')
|
||||||
|
export EXTERNAL_IP
|
||||||
export BRIDGE_IP="172.18.0.1"
|
export BRIDGE_IP="172.18.0.1"
|
||||||
kubectl get nodes -o wide
|
kubectl get nodes -o wide
|
||||||
cd $ROOT_DIR/tests && $GINKGO -r -v ./e2e
|
cd $ROOT_DIR/tests && $GINKGO -r -v ./e2e
|
@@ -131,7 +131,7 @@ get_url()
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
trap "cleanup" 1 2 3 6 9 14 15 EXIT
|
trap "cleanup" 1 2 3 6 14 15 EXIT
|
||||||
|
|
||||||
load_vars
|
load_vars
|
||||||
|
|
||||||
@@ -223,6 +223,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$cos_config" ] && [ -e "$cos_config" ]; then
|
if [ -n "$cos_config" ] && [ -e "$cos_config" ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
source "$cos_config"
|
source "$cos_config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -283,7 +284,7 @@ ensure_dir_structure $TARGET
|
|||||||
# Download the container image
|
# Download the container image
|
||||||
if [ -z "$directory" ]; then
|
if [ -z "$directory" ]; then
|
||||||
echo ">>> Downloading container image"
|
echo ">>> Downloading container image"
|
||||||
elemental pull-image $( (( $local_build == 'true')) && printf %s '--local' ) $container_image $TARGET
|
elemental pull-image $( (( local_build == 'true')) && printf %s '--local' ) $container_image $TARGET
|
||||||
else
|
else
|
||||||
echo ">>> Copying files from $directory"
|
echo ">>> Copying files from $directory"
|
||||||
rsync -axq --exclude='host' --exclude='mnt' --exclude='proc' --exclude='sys' --exclude='dev' --exclude='tmp' ${directory}/ $TARGET
|
rsync -axq --exclude='host' --exclude='mnt' --exclude='proc' --exclude='sys' --exclude='dev' --exclude='tmp' ${directory}/ $TARGET
|
||||||
@@ -354,7 +355,7 @@ sgdisk -n 2:0:+${state_size}M -c 2:state -t 2:8300 ${output_image}
|
|||||||
if [ "$disable_lvm" == 'true' ]; then
|
if [ "$disable_lvm" == 'true' ]; then
|
||||||
sgdisk -n 3:0:+${recovery_size}M -c 3:recovery -t 3:8300 ${output_image}
|
sgdisk -n 3:0:+${recovery_size}M -c 3:recovery -t 3:8300 ${output_image}
|
||||||
else
|
else
|
||||||
sgdisk -n 3:0:+$(( ${recovery_size} + ${oem_size} ))M -c 3:lvm -t 3:8e00 ${output_image}
|
sgdisk -n 3:0:+$(( recovery_size + oem_size ))M -c 3:lvm -t 3:8e00 ${output_image}
|
||||||
fi
|
fi
|
||||||
sgdisk -n 4:0:+64M -c 4:persistent -t 4:8300 ${output_image}
|
sgdisk -n 4:0:+64M -c 4:persistent -t 4:8300 ${output_image}
|
||||||
|
|
||||||
@@ -366,7 +367,8 @@ fi
|
|||||||
|
|
||||||
# Prepare the image and copy over the files
|
# Prepare the image and copy over the files
|
||||||
|
|
||||||
export DRIVE=$(losetup -f "${output_image}" --show)
|
DRIVE=$(losetup -f "${output_image}" --show)
|
||||||
|
export DRIVE
|
||||||
if [ -z "${DRIVE}" ]; then
|
if [ -z "${DRIVE}" ]; then
|
||||||
echo "Cannot execute losetup for $output_image"
|
echo "Cannot execute losetup for $output_image"
|
||||||
exit 1
|
exit 1
|
||||||
|
@@ -71,7 +71,7 @@ truncate -s "+$((1024*1024))" $OUT
|
|||||||
|
|
||||||
if [ -n "$EXTEND" ]; then
|
if [ -n "$EXTEND" ]; then
|
||||||
echo "Extending image of $EXTEND MB"
|
echo "Extending image of $EXTEND MB"
|
||||||
truncate -s "+$(($EXTEND*1024*1024))" $OUT
|
truncate -s "+$((EXTEND*1024*1024))" $OUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create the partition table in $OUT (assumes sectors of 512 bytes)
|
# Create the partition table in $OUT (assumes sectors of 512 bytes)
|
||||||
|
Reference in New Issue
Block a user