Skip to content

Instantly share code, notes, and snippets.

View nickboldt's full-sized avatar

Nick Boldt nickboldt

View GitHub Profile
@nickboldt
nickboldt / pods.sh
Last active January 3, 2025 18:35
get pod logs for konflux processes
og get Pods
oc logs -f rhdh-hub-1-4-on-push-4npgp-publish-helm-pod -c step-publish
oc logs -f rhdh-hub-1-on-pull-request-67jzd-prefetch-dependencies-pod -c step-prefetch-dependencies
oc logs -f rhdh-hub-1-4-on-push-4npgp-build-container-pod -c step-build
oc logs -f rhdh-hub-1-on-pull-request-67jzd-build-container-pod -c step-build \
| tee /tmp/rhdh-hub-1-on-pull-request-67jzd-build-container-pod_step-build.log.txt
@nickboldt
nickboldt / vbox-restart-vm-network-after-sleep.txt
Last active December 18, 2024 12:17
VBox VM loses network - workaround for Fedora
# if your VM went to sleep / hibernate, and on wakeup can't find the network...
# switch your guest's Network settings in Virtual Box as follows:
Attached to: Bridged Adapter
Name: Intel Wifi
Promiscuous Mode: Allow VMs
[x] Cable Connected
# go back into the VM and run
@nickboldt
nickboldt / 0-snapshot.sh
Created December 14, 2024 00:33
manual snapshot and release
#!/bin/bash
echo "apiVersion: appstudio.redhat.com/v1alpha1
kind: Snapshot
metadata:
name: rhdh-1-4-rc-12-13
namespace: rhdh-tenant
labels:
test.appstudio.openshift.io/type: override
spec:
@nickboldt
nickboldt / edit-expiry.sh
Last active January 21, 2025 16:40
remove-image-tag-expiry
### THESE DON'T WORK -- you ned up with a tiny image that replaces your own :(
# much simpler from https://docs.redhat.com/en/documentation/red_hat_quay/3.12/html/use_red_hat_quay/oci-intro#annotation-parsing-oras
# never expire
oras push --annotation "quay.expires-after=" --annotation "expiration = " quay.io/rhdh-community/rhdh:tmp
# expire in 200 days
oras push --annotation "quay.expires-after=200d" --annotation "expiration = 200d" quay.io/rhdh-community/rhdh:tmp
@nickboldt
nickboldt / get-sbom.sh
Last active December 7, 2024 18:17
HOWTO: read SBOMs for RHDH containers
# To find the SBOM for a given tag:
# * go to https://quay.io/repository/rhdh/rhdh-hub-rhel9?tab=tags
# * search for a tag, like 1.4-118. Note the short SHA = 8cfadda9c15f
# * search for tags matching that SHA, then look for the one ending in .sbom:
# * sha256-8cfadda9c15fb0e1a4b0e5f8613d62433f92f42e16f3c7ea63be36bd9e5d2a1f.sbom
# * pull that image to see the contents of the SBOM
rm -fr /tmp/sbom; mkdir -p /tmp/sbom
skopeo copy \
@nickboldt
nickboldt / smoketest.install.sh
Created November 29, 2024 21:51
helm and operator smoke test installer
#!/bin/bash
usage() {
echo "Usage:
$0 --helm --op --next -b rhdh-1-rhel-9
$0 --helm --latest -b rhdh-1.4-rhel-9
$0 --op -b rhdh-1.3-rhel-9
"
}
# to check that CI is up to date, use RHDH_VERSION=1
# for declaring RC, use RHDH_VERSION=1.y
RHDH_VERSION=1.4
echo "Latest images:";
./build/scripts/getLatestImageTags.sh -b rhdh-${RHDH_VERSION}-rhel-9 --quay;
echo; echo "Images in latest bundle (should be the same hub + operator):";
./build/scripts/checkImagesInCSV.sh -q -y \
$(./build/scripts/getLatestImageTags.sh -b rhdh-${RHDH_VERSION}-rhel-9 --quay -c rhdh/rhdh-operator-bundle)
@nickboldt
nickboldt / turbo.json.patch
Last active November 14, 2024 17:36
use turbo 2 with RHDH 1.3
find . -name turbo.json -exec sed -r -e "s/pipeline/tasks/" -i {} \;
@nickboldt
nickboldt / find.sh
Created August 27, 2024 17:49
find.sh
#!/bin/bash
# find in files
if [[ $# -eq 0 ]]; then
echo "usage: $0 \"<dir(s)>\" \"<include filename pattern (*test*/*.java)>\" \"<searchstring(s)>\" \"<exclude filename pattern (target|.svn|.git)>\" [\"-mindepth 3 -maxdepth 4\"] [-quiet]"; echo "";
echo "example: $0 . \"*test*/feature.*\" \"label|featureName\" target \"-mindepth 2 -maxdepth 4\" -q"; echo "";
exit 1;
fi
if [[ $1 ]]; then dirs=$1; else dirs="."; fi
@nickboldt
nickboldt / 0-host-setup.adoc
Last active January 3, 2025 18:33
Fedora 40 VM Config (2024)

Virtual Box Fedora 40 virtual machine setup - setup of VM on the host

VBox configuration

General
* bi-directional clipboard
* [ ] disk encryption: unchanged/off

System