Skip to content

Instantly share code, notes, and snippets.

View pvalena's full-sized avatar

Pavel Valena pvalena

View GitHub Profile
diff --git a/macros.rubygems b/macros.rubygems
index 8167e3c..2c00ae8 100644
--- a/macros.rubygems
+++ b/macros.rubygems
@@ -146,7 +146,7 @@ unset -v gemspec_remove_dep_script \
read -d '' gemspec_add_file_script << 'EOR' || : \
gemspec_file = '%{-s*}%{!?-s:%{_builddir}/%{gem_name}-%{version}.gemspec}' \
\
- abort if 1 < ( 0 %{?-t:+1} %{?-r:+1} ) \
+ abort("Use only one option at a time.") if "%{?-t}%{?-r}" == "-t-r" \
#!/bin/bash
#
# ./clusterup.sh [--pretend|--clean] [WD [UR [AR]]]
# --pretend dry-run
# --clean remove previous instance
#
# Optional
# WD working (base) directory
# UR openshift url
# AR additional args
#!/bin/bash
#
# ./getocstatus.sh [interval]
#
i="${1:-10}"
main () {
{
#!/usr/bin/ruby
#
# $ ./ruby-paralell echo 2 test <<EOLX
# first
# second
# third
# EOL
# [2192]+ echo first test
# [2193]+ echo second test
# first test
@pvalena
pvalena / icom
Created April 1, 2019 18:55
Run arbitrary commands on multiple folders or prefixed (interactive)
#!/bin/bash
#
# Run arbitrary commands on multiple folders or prefixed (interactive)
#
# ./icom [options] [command]
# -c clear before every command
# -d debug output
# -f [dirs] list folders (args for input for `ls -d`)
#
# Examples:
@pvalena
pvalena / log
Created November 5, 2019 22:09
smoke test Vagrant 2.2.6
Packages installed:
- vagrant-2.2.6-1.fc32.1.noarch
- vagrant-libvirt-0.0.45-5.fc30.noarch
- ruby-2.6.5-124.fc32.x86_64
- rubygems-3.0.3-124.fc32.noarch
- rubygem-net-ssh-5.1.0-2.fc31.noarch
- rubygem-i18n-1.7.0-1.fc32.noarch
- rubygem-childprocess-1.0.1-4.fc31.noarch
- rubygem-ruby-libvirt-0.7.1-6.fc31.x86_64
- rubygem-fog-core-2.1.2-3.fc32.noarch
@pvalena
pvalena / example one log
Created November 18, 2019 22:10
example one log
$ plans/example.fmf
summary:
Basic smoke test
discover:
how: fmf
prepare:
script: dnf install -y ruby
provision:
how: remote
host: 10.0.138.95
@pvalena
pvalena / example run 2
Created November 18, 2019 22:14
example run 2
# created using `tmt init --base` and then edited
# same test as example 1, fixed password, with --debug
# example 1: https://gist.github.com/pvalena/b7a49d19a423ffb7e44ca12c41a508dc
$ tmt run --debug
/var/tmp/tmt/run-001
Found 1 plan.
/plans/example
summary: Basic smoke test
@pvalena
pvalena / YMMV
Created November 19, 2019 20:22
tmt run --debug
$ tmt run --debug
/var/tmp/tmt/run-004
Found 1 plan.
/ci
how: prepare
name: one
how: shell
Read file '/var/tmp/tmt/run-004/ci/discover/status.txt'.
Write file '/var/tmp/tmt/run-004/ci/discover/status.txt'.
@pvalena
pvalena / example run 3
Created November 22, 2019 14:54
tmt run --debug
2019-11-22T12:51:41-02:00
/var/tmp/tmt/run-012
Found 1 plan.
/ci
how: prepare
how: install
path: https://koji.fedoraproject.org/koji/buildinfo?buildID=1395975
name: one