Skip to content

Instantly share code, notes, and snippets.

View nickboldt's full-sized avatar

Nick Boldt nickboldt

View GitHub Profile
@nickboldt
nickboldt / scrubMR.sh
Created March 7, 2025 17:24
delete GL MR comments (notes)
# for a given merge_request, delete its comments (notes):
# this will make reading the information in a MR much easier
# as you won't have dozens of Kfux comments to scroll past and ignore
GL_API_TOKEN="your token here"
MR=197
for id in $(curl --request GET --header "PRIVATE-TOKEN: $GL_API_TOKEN" --url "https://gitlab.cee.redhat.com/api/v4/projects/rhidp%2Frhdh/merge_requests/${MR}/notes?sort=desc" -sS | jq -r '.[].id'); do
echo "> $id"
curl --request DELETE --header "PRIVATE-TOKEN: $GL_API_TOKEN" --url "https://gitlab.cee.redhat.com/api/v4/projects/rhidp%2Frhdh/merge_requests/${MR}/notes/${id}"
done
@nickboldt
nickboldt / get-playwright-deps.sh
Created February 20, 2025 03:06
get playwright browser deps
podman run -it --rm --entrypoint /bin/bash --user root registry.access.redhat.com/ubi9/nodejs-20:9.5
# then
dnf install -q -y --allowerasing --nobest \
acl alternatives attr audit-libs basesystem bash binutils binutils-gold brotli brotli-devel bsdtar bzip2-libs ca-certificates cmake containers-common coreutils-single cpp cracklib cracklib-dicts criu criu-libs crun crypto-policies crypto-policies-scripts curl-minimal cyrus-sasl-lib dbus dbus-broker dbus-common dbus-libs dejavu-sans-fonts dmidecode dnf dnf-data elfutils-debuginfod-client elfutils-default-yama-scope elfutils-libelf elfutils-libs emacs-filesystem environment-modules expat file-libs filesystem findutils fonts-filesystem fuse-common fuse-overlayfs fuse3 fuse3-libs gawk gcc gcc-c++ gdb-gdbserver gdbm-libs gettext gettext-libs git git-core git-core-doc glib2 glibc glibc-common glibc-devel glibc-headers glibc-langpack-en glibc-locale-source glibc-minimal-langpack gmp gnupg2 gnutls gobject-introspection gpgme grep groff-base gzip ima-evm-ut
@nickboldt
nickboldt / 1. collect logs for konflux pipeline and task runs.md
Last active March 10, 2025 15:45
collecting konflux pipeline and task run logs
@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 {} \;