This document explains the major steps, script calls, and data flows in the sync-midstream.sh script.
─────────────────────────────────────────────────────────────────────────
| #!/bin/bash | |
| unpack () { | |
| local IMAGE="$1" | |
| DIR="${IMAGE//:/_}" | |
| DIR="/tmp/${DIR//\//-}" | |
| rm -fr "$DIR"; mkdir -p "$DIR"; container_id=$(podman create "${IMAGE}") | |
| podman export $container_id -o /tmp/image.tar && tar xf /tmp/image.tar -C "${DIR}/"; podman rm $container_id; rm -f /tmp/image.tar | |
| echo "Unpacked $IMAGE into $DIR" | |
| cd $DIR; tree -d -L 3 -I "usr|root|buildinfo" |
| oc get pipelineruns \ | |
| -n rhdh-tenant -l 'appstudio.openshift.io/application=rhdh-plugin-catalog-1' -o json | \ | |
| jq -r '.items[] | select(.status.conditions[0].reason == "Running" or .status.conditions[0].reason == "PipelineRunPending") | select(.metadata.name | test("-on-pull-")) | .metadata.name' \ | |
| | xargs -r -n 25 -P 4 sh -c 'for pr; do tkn pipelinerun cancel "$pr" -n rhdh-tenant 2>/dev/null || \ | |
| oc delete pipelinerun "$pr" -n rhdh-tenant --wait=false 2>/dev/null; done' |
| alias lgtm='gh pr review -a -b "/lgtm | |
| /approve" ' | |
| alias lgtm-override='ght;gh pr comment -b "/override \"ci/prow/e2e-ocp-helm\" | |
| /override \"Build with Node.js\" | |
| /override \"Test with Node.js\" | |
| /override \"Build Image\" "' | |
| alias merge='gh pr merge -s --auto ' |
| # Close JIRAs recursively | |
| use `jira` commandline to close Feature <link> with comment "Closing as won't do."; | |
| then look at child Epic tasks under that issue and close them too, with the same comment; | |
| recurse into any children of those Epics and close them using the same comment too. | |
| alias cur='sudo ulimit -v 62914560 && cursor' | |
| other approaches: https://search.brave.com/search?q=limit+the+ram+use+by+cursor+on+lnux&summary=1&conversation=08f722cccea181c2fa2ce5e51198b466f648 |
| # log in to registry | |
| RASRC_REGISTRY="registry.***" | |
| RASRC_USER="***" | |
| RASRC_PWD="**********" | |
| echo -n "[INFO]: Log into $RASRC_REGISTRY ... " | |
| echo "${RASRC_PWD}" | skopeo login -u="${RASRC_USER}" --password-stdin ${RASRC_REGISTRY} | |
| # run konflux push | |
| ./build/scripts/kfuxRelease.sh -v 1.9.0 --plugin --stage --debug --regex orchestrator |
| #!/usr/bin/env python3 | |
| """ | |
| Compare support and provider metadata between CSV file and YAML files. | |
| Auto-updates YAML files when CSV says "community supported" (requires --edit flag). | |
| """ | |
| import argparse | |
| import csv | |
| import os | |
| import yaml |
cd workspaces/roadie-backstage-plugins
yarn install; yarn tsc:full && yarn build:all
...
Found 122 errors in 42 files.
| git fetch -a; \ | |
| for branch in $(git branch -a -r | grep -v rhdh-1 | sed -r -e "s|.+origin/||"); do \ | |
| echo $branch; git push origin :${branch}; git branch -D ${branch}; \ | |
| done; \ | |
| for branch in $(git branch -a -r | grep -E -v "origin/rhdh-1.*-rhel-9" | grep rhdh-1 | sed -r -e "s|.+origin/||"); do \ | |
| echo $branch; git push origin :${branch}; git branch -D ${branch}; \ | |
| done |