- https://www.flowdock.com/app/rulemotion/r-resinos/threads/zv366eTa8wNZmC7IrUZB52JUwt7
- https://resinio.testlodge.com/projects/16238/runs/579754?tab=2#executed_case_23888354
- https://resinio.testlodge.com/projects/16238/suites/140935?expand_section=241935#case_2870775
- https://hub.docker.com/r/resin/resinos/tags?page=1&ordering=last_updated
- https://hub.docker.com/r/resin/resinos-staging/tags?page=1&ordering=last_updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// update_gitmodules.mjs | |
import fs from 'fs/promises'; | |
import path from 'path'; | |
import { fileURLToPath } from 'url'; | |
import readline from 'readline'; | |
import { parse, stringify } from 'ini'; | |
import simpleGit from 'simple-git'; | |
import { createPatch } from 'diff'; | |
const __filename = fileURLToPath(import.meta.url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// update_gitmodules.mjs | |
import fs from 'fs/promises'; | |
import path from 'path'; | |
import { fileURLToPath } from 'url'; | |
import readline from 'readline'; | |
import { parse } from 'ini'; | |
const __filename = fileURLToPath(import.meta.url); | |
const __dirname = path.dirname(__filename); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for file in .github/repos/*.yml; do | |
# delete custom merge settings | |
yq e 'del(.repository)' -i "$file" | |
# delete required approving review count as we use policy-bot instead | |
yq e 'del(.branches[].protection.required_pull_request_reviews.required_approving_review_count)' -i "$file" | |
if [ "$(yq e '.branches[].protection.required_pull_request_reviews' "$file")" = "{}" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
GH_TOKEN="$(<"${HOME}/.github_pat")" | |
github_org="balena-os" | |
repo_yaml_match="yocto-based OS image" | |
clone_root_path="src" # Set the root repository clone path here | |
# known_branches=("pyro" "rocko" "sumo" "thud" "warrior" "zeus" "dunfell" "honister" "kirkstone" "master" "main") # Add your list of known branches here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pull alpine image for the correct platform (avoid pulling the wrong platform on Pi Zero) | |
balena pull alpine --platform linux/arm/v6 | |
# Run inotifywatch to gather filesystem access statistics for 5m | |
balena run --rm -it -v /mnt/data:/mnt/data:ro alpine sh -c \ | |
'apk add --no-cache inotify-tools && /usr/bin/inotifywatch -v -t 300 -r /mnt/data' | |
# Run iostat with 5 min intervals | |
balena run --rm --privileged alpine iostat -z -k -t -d 300 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eux | |
cleanup() { | |
sudo umount /mnt/flasher | |
sudo losetup -d "${loopback_device:-}" | |
} | |
trap cleanup EXIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
module_path="${1}" | |
tag="${2}" | |
tag() { | |
if [[ $1 == v* ]] | |
then | |
echo "${1/v/}" | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# only supports hub.docker.com for now | |
registry="${1:-"https://registry.hub.docker.com"}" | |
# limited to 100 for hub.docker.com | |
page_size="${2:-100}" | |
# avoid reading all pages if at least one match is found | |
quick=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG BR_VERSION=2020.11 | |
# hadolint ignore=DL3029 | |
FROM --platform=$BUILDPLATFORM klutchell/buildroot-rootfs-amd64:$BR_VERSION as rootfs-amd64 | |
# hadolint ignore=DL3029 | |
FROM --platform=$BUILDPLATFORM klutchell/buildroot-rootfs-arm64:$BR_VERSION as rootfs-arm64 | |
# hadolint ignore=DL3029 | |
FROM --platform=$BUILDPLATFORM klutchell/buildroot-rootfs-arm32v7:$BR_VERSION as rootfs-armv7 |
NewerOlder