Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
d9d659241b | 5 months ago |
29 changed files with 65 additions and 11545 deletions
@ -1,91 +0,0 @@ |
|||||||
{ |
|
||||||
"title": "Keyboard Brightness Adjustment", |
|
||||||
"rules": [ |
|
||||||
{ |
|
||||||
"description": "command-f1 and f2 to adjust keyboard brightness", |
|
||||||
"manipulators": [ |
|
||||||
{ |
|
||||||
"type": "basic", |
|
||||||
"from": { |
|
||||||
"key_code": "f1", |
|
||||||
"modifiers": { |
|
||||||
"mandatory": [ |
|
||||||
"left_command" |
|
||||||
], |
|
||||||
"optional": [ |
|
||||||
"caps_lock" |
|
||||||
] |
|
||||||
} |
|
||||||
}, |
|
||||||
"to": [ |
|
||||||
{ |
|
||||||
"key_code": "illumination_decrement" |
|
||||||
} |
|
||||||
] |
|
||||||
}, |
|
||||||
{ |
|
||||||
"type": "basic", |
|
||||||
"from": { |
|
||||||
"key_code": "f2", |
|
||||||
"modifiers": { |
|
||||||
"mandatory": [ |
|
||||||
"left_command" |
|
||||||
], |
|
||||||
"optional": [ |
|
||||||
"caps_lock" |
|
||||||
] |
|
||||||
} |
|
||||||
}, |
|
||||||
"to": [ |
|
||||||
{ |
|
||||||
"key_code": "illumination_increment" |
|
||||||
} |
|
||||||
] |
|
||||||
} |
|
||||||
] |
|
||||||
}, |
|
||||||
{ |
|
||||||
"description": "command-f5 and f6 to adjust keyboard brightness, same keys as earlier macs", |
|
||||||
"manipulators": [ |
|
||||||
{ |
|
||||||
"type": "basic", |
|
||||||
"from": { |
|
||||||
"key_code": "f5", |
|
||||||
"modifiers": { |
|
||||||
"mandatory": [ |
|
||||||
"left_command" |
|
||||||
], |
|
||||||
"optional": [ |
|
||||||
"caps_lock" |
|
||||||
] |
|
||||||
} |
|
||||||
}, |
|
||||||
"to": [ |
|
||||||
{ |
|
||||||
"key_code": "illumination_decrement" |
|
||||||
} |
|
||||||
] |
|
||||||
}, |
|
||||||
{ |
|
||||||
"type": "basic", |
|
||||||
"from": { |
|
||||||
"key_code": "f6", |
|
||||||
"modifiers": { |
|
||||||
"mandatory": [ |
|
||||||
"left_command" |
|
||||||
], |
|
||||||
"optional": [ |
|
||||||
"caps_lock" |
|
||||||
] |
|
||||||
} |
|
||||||
}, |
|
||||||
"to": [ |
|
||||||
{ |
|
||||||
"key_code": "illumination_increment" |
|
||||||
} |
|
||||||
] |
|
||||||
} |
|
||||||
] |
|
||||||
} |
|
||||||
] |
|
||||||
} |
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -1,15 +0,0 @@ |
|||||||
[dep] |
|
||||||
upgrade: ask |
|
||||||
user_email: petr.nyc@oracle.com |
|
||||||
|
|
||||||
[bitbucket] |
|
||||||
username: pnyc |
|
||||||
|
|
||||||
[templates] |
|
||||||
project: CCATC |
|
||||||
repo: ccatc-seeks |
|
||||||
branch: main |
|
||||||
vcs: SCM |
|
||||||
scmrepo: ocid1.devopsrepository.oc1.phx.amaaaaaaw4vcxbyahrz7vgu4tdwdcfwd26e5fvmcoidmxrtmdvwyowqhi6rq |
|
||||||
filepath: seeks_templates.conf |
|
||||||
|
|
||||||
@ -1,12 +0,0 @@ |
|||||||
[dep] |
|
||||||
upgrade: ask |
|
||||||
user_email: petr.nyc@oracle.com |
|
||||||
|
|
||||||
[bitbucket] |
|
||||||
username: pnyc |
|
||||||
|
|
||||||
[templates] |
|
||||||
project: ODAAS |
|
||||||
repo: cm_automation |
|
||||||
branch: main |
|
||||||
filepath: change_templates/seeks_templates.conf |
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,10 +0,0 @@ |
|||||||
Include config-scm |
|
||||||
Include ssh_configs/config |
|
||||||
Include osd_configs/config |
|
||||||
Include user |
|
||||||
|
|
||||||
Host bitbucket.oci.oraclecorp.com |
|
||||||
IdentityFile ~/.ssh/orabucket |
|
||||||
HostkeyAlgorithms +ssh-rsa |
|
||||||
PubkeyAcceptedAlgorithms +ssh-rsa |
|
||||||
|
|
||||||
@ -1,157 +0,0 @@ |
|||||||
Host * |
|
||||||
# UseKeychain yes |
|
||||||
AddKeysToAgent yes |
|
||||||
ServerAliveInterval 300 |
|
||||||
ServerAliveCountMax 2 |
|
||||||
TCPKeepAlive no |
|
||||||
HostkeyAlgorithms +ssh-rsa |
|
||||||
PubkeyAcceptedAlgorithms +ssh-rsa |
|
||||||
# User pnyc |
|
||||||
|
|
||||||
|
|
||||||
Host * |
|
||||||
IdentitiesOnly yes |
|
||||||
|
|
||||||
Host 192.168.2.* |
|
||||||
IdentitiesOnly yes |
|
||||||
|
|
||||||
Host gitlab.com |
|
||||||
User git |
|
||||||
IdentityFile ~/.ssh/gitlab |
|
||||||
|
|
||||||
Host solaris-reviews.us.oracle.com |
|
||||||
User hg |
|
||||||
IdentityFile ~/.ssh/id_phabricator |
|
||||||
|
|
||||||
Host hetzner |
|
||||||
HostName u444067.your-storagebox.de |
|
||||||
User u444067 |
|
||||||
Port 23 |
|
||||||
IdentityFile ~/.ssh/id_hetzner |
|
||||||
|
|
||||||
|
|
||||||
Host pnyc-ws pnyc-ws.webad1phx.solarisx86phx.oraclevcn.com |
|
||||||
HostName pnyc-ws.webad1phx.solarisx86phx.oraclevcn.com |
|
||||||
User opc |
|
||||||
IdentityFile ~/.ssh/id_pnyc-ws |
|
||||||
# ssh -i ./id_pnyc-ws opc@pnyc-ws.webad1phx.solarisx86phx.oraclevcn.com |
|
||||||
|
|
||||||
Host osdbld |
|
||||||
HostName 100.73.219.187 |
|
||||||
User opc |
|
||||||
IdentityFile ~/.ssh/id_nginxbuild |
|
||||||
|
|
||||||
Host nginx-osd-dev |
|
||||||
Hostname 100.106.197.175 |
|
||||||
User opc |
|
||||||
IdentityFile ~/.ssh/osd-dev-pnyc |
|
||||||
|
|
||||||
Host osd-calico-dev osd-calico-dev.webad1phx.solarisx86phx.oraclevcn.com |
|
||||||
Hostname osd-calico-dev.webad1phx.solarisx86phx.oraclevcn.com |
|
||||||
User opc |
|
||||||
IdentityFile ~/.ssh/id_ed25519 |
|
||||||
|
|
||||||
|
|
||||||
# private m1 mac |
|
||||||
Host 192.168.2.81 |
|
||||||
User jetpac |
|
||||||
IdentityFile /Users/jetpac/.ssh/id_mac_private |
|
||||||
|
|
||||||
Host git.meinlschmidt.org |
|
||||||
IdentityFile ~/.ssh/git.meinlschmidt.org |
|
||||||
|
|
||||||
Host 192.168.2.1 gw gw.doma.jetpac.org |
|
||||||
IdentityFile ~/.ssh/mikrotik |
|
||||||
|
|
||||||
Host github.com |
|
||||||
IdentityFile ~/.ssh/github.com |
|
||||||
|
|
||||||
Host bitbucket.oci.oraclecorp.com |
|
||||||
IdentityFile ~/.ssh/orabucket |
|
||||||
HostkeyAlgorithms +ssh-rsa |
|
||||||
PubkeyAcceptedAlgorithms +ssh-rsa |
|
||||||
|
|
||||||
Host www.jetpac.org |
|
||||||
IdentityFile ~/.ssh/id_ed25519.jetpac.org |
|
||||||
User jetpac |
|
||||||
|
|
||||||
|
|
||||||
Host dabel dabel.us.oracle.com |
|
||||||
User pnyc |
|
||||||
IdentityFile ~/.ssh/dabel.key |
|
||||||
RequestTTY yes |
|
||||||
|
|
||||||
Host hubbins hubbins.us.oracle.com 10.134.7.102 |
|
||||||
User pnyc |
|
||||||
|
|
||||||
Host tdabel |
|
||||||
User pnyc |
|
||||||
Hostname dabel.us.oracle.com |
|
||||||
IdentityFile ~/.ssh/dabel.key |
|
||||||
RequestTTY yes |
|
||||||
RemoteCommand tmux new -A |
|
||||||
|
|
||||||
Host utmfedora |
|
||||||
Hostname 192.168.205.3 |
|
||||||
User jetpac |
|
||||||
|
|
||||||
|
|
||||||
Host 100.106.196.204 pnyc-mrspatmore.webad1phx.solarisx86phx.oraclevcn.com pnyc-mrspatmore |
|
||||||
User jetpac |
|
||||||
Hostname 100.106.196.204 |
|
||||||
IdentityFile ~/.ssh/pnyc-mrspatmore |
|
||||||
|
|
||||||
Host osd osd-dev-pnyc.webad1phx.solarisx86phx.oraclevcn.com |
|
||||||
IdentityFile ~/.ssh/osd-dev-pnyc |
|
||||||
Hostname osd-dev-pnyc.webad1phx.solarisx86phx.oraclevcn.com |
|
||||||
user pnyc |
|
||||||
|
|
||||||
Host osd-ol7 osd-dev-ol7.webad1phx.solarisx86phx.oraclevcn.com |
|
||||||
IdentityFile ~/.ssh/osd-dev-pnyc |
|
||||||
Hostname osd-dev-ol7.webad1phx.solarisx86phx.oraclevcn.com |
|
||||||
user pnyc |
|
||||||
|
|
||||||
Host andel.us.oracle.com dabel.us.oracle.com gates.us.oracle.com |
|
||||||
User pnyc |
|
||||||
|
|
||||||
|
|
||||||
Host gitlocal |
|
||||||
Hostname 127.0.0.1 |
|
||||||
Port 2200 |
|
||||||
|
|
||||||
Host oci-wireguard |
|
||||||
Hostname 130.61.98.65 |
|
||||||
User ubuntu |
|
||||||
IdentityFile ~/.ssh/id_ed25519_oci |
|
||||||
|
|
||||||
Host libcurlbuild |
|
||||||
Hostname led-build-mac.uk.oracle.com |
|
||||||
User petrnyc |
|
||||||
|
|
||||||
Host 192.168.2.72 homeassistant ha |
|
||||||
Hostname 192.168.2.72 |
|
||||||
user hassio |
|
||||||
IdentityFile ~/.ssh/jetpac01ha |
|
||||||
|
|
||||||
Host adam-test |
|
||||||
HostName 100.106.212.188 |
|
||||||
User opc |
|
||||||
|
|
||||||
Host nori nori.commonsub.zsphx.oraclevcn.com |
|
||||||
Hostname nori.commonsub.zsphx.oraclevcn.com |
|
||||||
User opc |
|
||||||
|
|
||||||
# Host operator-access-token.svc.ad1.r2 bastion*.oracleiaas.com |
|
||||||
# Include ~/.ssh/ssh_configs/config |
|
||||||
# User pnyc |
|
||||||
|
|
||||||
# vim: tabstop=4 shiftwidth=4 |
|
||||||
#Include ~/.ssh/ssh_configs/config |
|
||||||
#Include ~/.ssh/osd_configs/config |
|
||||||
|
|
||||||
|
|
||||||
Include ossh_configs/*.ossh |
|
||||||
Include ssh_configs/config |
|
||||||
Include osd_configs/config |
|
||||||
|
|
||||||
|
|
||||||
@ -1,26 +0,0 @@ |
|||||||
" General Settings |
|
||||||
set update.lastchecktime 1755245204669 |
|
||||||
set update.nag true |
|
||||||
set update.nagwait 7 |
|
||||||
set update.lastnaggedversion 1.14.0 |
|
||||||
set update.checkintervalsecs 86400 |
|
||||||
set configversion 2.0 |
|
||||||
set editorcmd '/opt/homebrew/bin/emacsclient' |
|
||||||
set smoothscroll true |
|
||||||
|
|
||||||
|
|
||||||
blacklistadd https://www.youtube.com/ |
|
||||||
" blacklistadd https://grt.us.oracle.com |
|
||||||
" auto-contain |
|
||||||
|
|
||||||
" tip from https://github.com/tridactyl/tridactyl/issues/1559 |
|
||||||
seturl youtube.com modeindicator false |
|
||||||
|
|
||||||
" vim bind u back |
|
||||||
" vim bind U undo |
|
||||||
" vim bind Y clipboard yank |
|
||||||
" vim u |
|
||||||
" nbind <c-f> |
|
||||||
|
|
||||||
" For syntax highlighting see https://github.com/tridactyl/vim-tridactyl |
|
||||||
" vim: set filetype=tridactyl |
|
||||||
@ -1,5 +0,0 @@ |
|||||||
#!/usr/bin/env bash |
|
||||||
# Remove ANSI escape sequences and ^M carriage return characters |
|
||||||
|
|
||||||
perl -pe 's/\e\[[0-9;]*[mGKHF]//g; s/\r//g' |
|
||||||
|
|
||||||
@ -1,101 +0,0 @@ |
|||||||
# common useful functions |
|
||||||
|
|
||||||
w3m_safe() { |
|
||||||
url="$1" |
|
||||||
|
|
||||||
output=$(/opt/homebrew/bin/w3m "$url" -M -cols 400 -graph -dump 2>&1) |
|
||||||
|
|
||||||
if echo "$output" | grep -q "Can't load"; then |
|
||||||
return 2 |
|
||||||
else |
|
||||||
echo "$output" |
|
||||||
return 0 |
|
||||||
fi |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
# Returns: |
|
||||||
# 0 = server reachable & remote command ran |
|
||||||
# 1 = network/host-not-up-yet |
|
||||||
# 2 = SSH auth failure (key needs passphrase / wrong key / agent locked) -> caller should abort |
|
||||||
# 3 = host not found |
|
||||||
is_server_up() { |
|
||||||
local host err st err_lc |
|
||||||
host=$1 |
|
||||||
|
|
||||||
# return 3 if the host does not exist |
|
||||||
host "$host" 2>&1 > /dev/null || return 3 |
|
||||||
|
|
||||||
# Capture only stderr; do NOT use -q (it suppresses diagnostics we need to classify). |
|
||||||
# Force English messages for stable matching. |
|
||||||
err=$(LC_ALL=C /usr/bin/ssh \ |
|
||||||
-o BatchMode=yes \ |
|
||||||
-o PreferredAuthentications=publickey \ |
|
||||||
-o PubkeyAuthentication=yes \ |
|
||||||
-o PasswordAuthentication=no \ |
|
||||||
-o KbdInteractiveAuthentication=no \ |
|
||||||
-o NumberOfPasswordPrompts=0 \ |
|
||||||
-o ConnectTimeout=10 \ |
|
||||||
-o ServerAliveInterval=20 \ |
|
||||||
-o ServerAliveCountMax=3 \ |
|
||||||
-o ConnectionAttempts=1 \ |
|
||||||
-o StrictHostKeyChecking=no \ |
|
||||||
-o UserKnownHostsFile=/dev/null \ |
|
||||||
-o LogLevel=ERROR \ |
|
||||||
-n "$host" 'uname -n || hostname' 2>&1 >/dev/null) |
|
||||||
st=$? |
|
||||||
|
|
||||||
# Success |
|
||||||
[ $st -eq 0 ] && return 0 |
|
||||||
|
|
||||||
# ssh uses 255 for any error; distinguish by stderr text |
|
||||||
err_lc=$(printf '%s' "$err" | tr '[:upper:]' '[:lower:]') |
|
||||||
|
|
||||||
case $err_lc in |
|
||||||
# Common auth/passphrase/agent problems |
|
||||||
*"permission denied"*|\ |
|
||||||
*"no supported authentication methods available"*|\ |
|
||||||
*"publickey authentication failed"*|\ |
|
||||||
*"too many authentication failures"*|\ |
|
||||||
*"sign_and_send_pubkey: signing failed"*|\ |
|
||||||
*"agent refused operation"*|\ |
|
||||||
*"agent admitted failure"*|\ |
|
||||||
*"bad permissions"*|\ |
|
||||||
*"enter passphrase"*) |
|
||||||
printf 'FATAL: SSH authentication failed for "%s": %s\n' "$host" "$err" >&2 |
|
||||||
return 2 |
|
||||||
;; |
|
||||||
esac |
|
||||||
|
|
||||||
# Everything else looks like "not up yet" (timeout, DNS, connection refused/reset, kex read, etc.) |
|
||||||
return 1 |
|
||||||
} |
|
||||||
|
|
||||||
wait_for_server_to_boot_up() { |
|
||||||
local server rc |
|
||||||
server=$1 |
|
||||||
while :; do |
|
||||||
is_server_up "$server" |
|
||||||
rc=$? |
|
||||||
case $rc in |
|
||||||
0) |
|
||||||
printf '"%s" is up and running.\n' "$server" |
|
||||||
return 0 |
|
||||||
;; |
|
||||||
2) |
|
||||||
printf 'Aborting: SSH authentication failed for "%s" (key needs passphrase / wrong key / agent locked).\n' "$server" >&2 |
|
||||||
return 2 |
|
||||||
;; |
|
||||||
3) |
|
||||||
printf 'Aborting: Host not found.\n' "$server" >&2 |
|
||||||
return 3 |
|
||||||
;; |
|
||||||
*) |
|
||||||
printf 'Server "%s" is not up\n' "$server" |
|
||||||
sleep 10 |
|
||||||
;; |
|
||||||
esac |
|
||||||
done |
|
||||||
} |
|
||||||
|
|
||||||
# vim: set ts=4 sw=4 tw=0 noet ft=sh: |
|
||||||
@ -1,45 +0,0 @@ |
|||||||
#!/usr/bin/env bash |
|
||||||
|
|
||||||
# exec &> >(tee -a "${SYSLOG}") |
|
||||||
# exec &> >(tee -a "${APPLOG}") |
|
||||||
|
|
||||||
trap 'exit 1' HUP INT QUIT TERM |
|
||||||
|
|
||||||
# trap 'on_error' EXIT |
|
||||||
|
|
||||||
log::prefix() { |
|
||||||
date=$(/opt/homebrew/bin/gdate '+%Y-%m-%d %H:%M:%S,%3N') |
|
||||||
printf '%s %s\n' "${date}" "${*}" |
|
||||||
} |
|
||||||
|
|
||||||
log::notice() { |
|
||||||
log::info "==> ${*}" |
|
||||||
} |
|
||||||
|
|
||||||
log::info() { |
|
||||||
log::prefix "INFO ${*}" |
|
||||||
} |
|
||||||
|
|
||||||
log::debug() { |
|
||||||
log::prefix "DEBUG ${*}" |
|
||||||
} |
|
||||||
|
|
||||||
log::warning() { |
|
||||||
log::prefix "WARNING ${*}" |
|
||||||
} |
|
||||||
|
|
||||||
log::error() { |
|
||||||
log::prefix "ERROR ${*}" >&2 |
|
||||||
} |
|
||||||
|
|
||||||
log::fatal() { |
|
||||||
reason="${1-Unknown or not specified}" |
|
||||||
log::error "Fatal error. Reason: ${reason}" |
|
||||||
kill -s TERM $$ |
|
||||||
} |
|
||||||
|
|
||||||
on_error() { |
|
||||||
if [ $? -ne 0 ]; then |
|
||||||
log::fatal "Unhandled script failure" |
|
||||||
fi |
|
||||||
} |
|
||||||
@ -1,67 +0,0 @@ |
|||||||
#!/usr/bin/env bash |
|
||||||
|
|
||||||
[[ "$0" == /* ]] && typeset -r PRG=$0 || typeset -r PRG=$PWD/$0 |
|
||||||
|
|
||||||
BINDIR=$(dirname "$PRG") |
|
||||||
typeset -r BINDIR |
|
||||||
source "${BINDIR}/lib/logging.sh" |
|
||||||
|
|
||||||
|
|
||||||
W3M=/opt/homebrew/bin/w3m |
|
||||||
AWK=/usr/bin/awk |
|
||||||
CURL=/usr/bin/curl |
|
||||||
|
|
||||||
source "${BINDIR}/lib/logging.sh" |
|
||||||
TARGET="${1-11.4.85.0.1.201.2}" |
|
||||||
hg_branch="s11u4_sust_084" |
|
||||||
log::info "TARGET:${TARGET}" |
|
||||||
|
|
||||||
URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=4&target=${TARGET}" |
|
||||||
log::debug $URL |
|
||||||
|
|
||||||
output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1) |
|
||||||
|
|
||||||
out=$(echo "$output" | $AWK '/^Details/ {found=1; next} found && NF') |
|
||||||
|
|
||||||
if [[ -z "$out" ]]; |
|
||||||
then |
|
||||||
log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..." |
|
||||||
exit 0 |
|
||||||
fi |
|
||||||
|
|
||||||
|
|
||||||
log::info "Starting build for for Ul11u4SRU" |
|
||||||
log::info "Target: \"${TARGET}\"" |
|
||||||
|
|
||||||
JENKINS_TOKEN='1154eb0158729a7d326c1db13e7dca0cea' |
|
||||||
JENKINS_SERVER='http://mrshughes.us.oracle.com/jenkins/' |
|
||||||
|
|
||||||
JOB_URL="${JENKINS_SERVER}/job/Solaris_11/job/11.4/job/userland-sru/job/userland-sru-build-11.4/buildWithParameters" |
|
||||||
|
|
||||||
log::info "Using '${JOB_URL}'" |
|
||||||
|
|
||||||
set -x |
|
||||||
curl -X POST "${JOB_URL}" \ |
|
||||||
--user "pnyc:${JENKINS_TOKEN}" \ |
|
||||||
--data-urlencode "Build_Label=${TARGET}" \ |
|
||||||
--data-urlencode "hg_branch=${hg_branch}" \ |
|
||||||
--data-urlencode "hguser=petr.nyc@oracle.com" \ |
|
||||||
--data-urlencode "verbose=true" \ |
|
||||||
--data-urlencode "debug=true" \ |
|
||||||
--data-urlencode "scriptdir=./solaris/userland/sru/" \ |
|
||||||
--data-urlencode "do_check_sru_cbe=true" \ |
|
||||||
--data-urlencode "prepare_work_area=true" \ |
|
||||||
--data-urlencode "do_build=true" \ |
|
||||||
--data-urlencode "merge_repo=true" \ |
|
||||||
--data-urlencode "create_sparse_repo=true" \ |
|
||||||
--data-urlencode "check_incorporations=true" \ |
|
||||||
--data-urlencode "zip_sparse_repo=true" \ |
|
||||||
--data-urlencode "create_escrow=true" \ |
|
||||||
--data-urlencode "create_foss=true" \ |
|
||||||
--data-urlencode "integration_dryrun=false" \ |
|
||||||
--data-urlencode "confirm_before_ingegration=false" \ |
|
||||||
--data-urlencode "wait_for_dock_open=true" \ |
|
||||||
--data-urlencode "delivery=true" |
|
||||||
|
|
||||||
log::info "The job will be started here:" |
|
||||||
log::info " ${JOB_URL%%buildWith*}" |
|
||||||
@ -1,67 +0,0 @@ |
|||||||
#!/usr/bin/env bash |
|
||||||
|
|
||||||
[[ "$0" == /* ]] && typeset -r PRG=$0 || typeset -r PRG=$PWD/$0 |
|
||||||
|
|
||||||
BINDIR=$(dirname "$PRG") |
|
||||||
typeset -r BINDIR |
|
||||||
source "${BINDIR}/lib/logging.sh" |
|
||||||
|
|
||||||
|
|
||||||
W3M=/opt/homebrew/bin/w3m |
|
||||||
AWK=/usr/bin/awk |
|
||||||
CURL=/usr/bin/curl |
|
||||||
|
|
||||||
source "${BINDIR}/lib/logging.sh" |
|
||||||
TARGET="${1-11.4.83.0.1.195.1}" |
|
||||||
hg_branch="s11u4_sust_084" |
|
||||||
log::info "TARGET:${TARGET}" |
|
||||||
|
|
||||||
URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=4&target=${TARGET}" |
|
||||||
log::debug $URL |
|
||||||
|
|
||||||
output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1) |
|
||||||
|
|
||||||
out=$(echo "$output" | $AWK '/^Details/ {found=1; next} found && NF') |
|
||||||
|
|
||||||
if [[ -z "$out" ]]; |
|
||||||
then |
|
||||||
log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..." |
|
||||||
exit 0 |
|
||||||
fi |
|
||||||
|
|
||||||
|
|
||||||
log::info "Starting build for for Ul11u4SRU" |
|
||||||
log::info "Target: \"${TARGET}\"" |
|
||||||
|
|
||||||
JENKINS_TOKEN='1154eb0158729a7d326c1db13e7dca0cea' |
|
||||||
JENKINS_SERVER='http://mrshughes.us.oracle.com/jenkins/' |
|
||||||
|
|
||||||
JOB_URL="${JENKINS_SERVER}/job/Solaris_11/job/11.4/job/userland-sru/job/userland-sru-build-11.4/buildWithParameters" |
|
||||||
|
|
||||||
log::info "Using '${JOB_URL}'" |
|
||||||
|
|
||||||
set -x |
|
||||||
curl -X POST "${JOB_URL}" \ |
|
||||||
--user "pnyc:${JENKINS_TOKEN}" \ |
|
||||||
--data-urlencode "Build_Label=${TARGET}" \ |
|
||||||
--data-urlencode "hg_branch=${hg_branch}" \ |
|
||||||
--data-urlencode "hguser=petr.nyc@oracle.com" \ |
|
||||||
--data-urlencode "verbose=true" \ |
|
||||||
--data-urlencode "debug=true" \ |
|
||||||
--data-urlencode "scriptdir=./solaris/userland/sru/" \ |
|
||||||
--data-urlencode "do_check_sru_cbe=false" \ |
|
||||||
--data-urlencode "prepare_work_area=false" \ |
|
||||||
--data-urlencode "do_build=false" \ |
|
||||||
--data-urlencode "merge_repo=true" \ |
|
||||||
--data-urlencode "create_sparse_repo=true" \ |
|
||||||
--data-urlencode "check_incorporations=true" \ |
|
||||||
--data-urlencode "zip_sparse_repo=true" \ |
|
||||||
--data-urlencode "create_escrow=true" \ |
|
||||||
--data-urlencode "create_foss=true" \ |
|
||||||
--data-urlencode "integration_dryrun=false" \ |
|
||||||
--data-urlencode "confirm_before_ingegration=false" \ |
|
||||||
--data-urlencode "wait_for_dock_open=true" \ |
|
||||||
--data-urlencode "delivery=true" |
|
||||||
|
|
||||||
log::info "The job will be started here:" |
|
||||||
log::info " ${JOB_URL%%buildWith*}" |
|
||||||
@ -1,59 +0,0 @@ |
|||||||
#!/usr/bin/env bash |
|
||||||
|
|
||||||
# set -x |
|
||||||
|
|
||||||
[[ "$0" == /* ]] && typeset -r PRG=$0 || typeset -r PRG=$PWD/$0 |
|
||||||
|
|
||||||
BINDIR=$(dirname "$PRG") |
|
||||||
typeset -r BINDIR |
|
||||||
|
|
||||||
W3M=/opt/homebrew/bin/w3m |
|
||||||
AWK=/usr/bin/awk |
|
||||||
CURL=/usr/bin/curl |
|
||||||
|
|
||||||
source "${BINDIR}/lib/logging.sh" |
|
||||||
|
|
||||||
TARGET="${1-11.4.86.0.1.201.1}" |
|
||||||
|
|
||||||
log::info "TARGET:${TARGET}" |
|
||||||
|
|
||||||
URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=1&target=${TARGET}" |
|
||||||
|
|
||||||
log::debug $URL |
|
||||||
|
|
||||||
output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1) |
|
||||||
|
|
||||||
out=$(echo "$output" | awk '/^Details.*Consolidation/ {found=1; next} found') |
|
||||||
|
|
||||||
if [[ -z "$out" ]]; |
|
||||||
then |
|
||||||
# log::debug "output: ### $out ###" |
|
||||||
log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..." |
|
||||||
exit 0 |
|
||||||
fi |
|
||||||
|
|
||||||
|
|
||||||
log::info "Opening the gate for ${TARGET}" |
|
||||||
|
|
||||||
log::debug "Starting gate open for Ul11u4SRU" |
|
||||||
log::debug "Target: \"${TARGET}\"" |
|
||||||
|
|
||||||
JENKINS_TOKEN='1154eb0158729a7d326c1db13e7dca0cea' |
|
||||||
JENKINS_SERVER='http://mrshughes.us.oracle.com/jenkins/' |
|
||||||
|
|
||||||
JOB_URL="${JENKINS_SERVER}/job/Solaris_11/job/11.4/job/userland-sru/job/userland-sru-gate-open-11.4/buildWithParameters" |
|
||||||
|
|
||||||
log::info "Using '${JOB_URL}'" |
|
||||||
|
|
||||||
$CURL -X POST "${JOB_URL}" \ |
|
||||||
--user "pnyc:${JENKINS_TOKEN}" \ |
|
||||||
--data-urlencode "Build_Label=${TARGET}" \ |
|
||||||
--data-urlencode "hguser=petr.nyc@oracle.com" \ |
|
||||||
--data-urlencode "dryrun=false" \ |
|
||||||
--data-urlencode "verbose=true" \ |
|
||||||
--data-urlencode "debug=true" \ |
|
||||||
--data-urlencode "scriptdir=./solaris/userland/sru/" \ |
|
||||||
--data-urlencode "do_gate_open=true" |
|
||||||
|
|
||||||
log::info "The job will be started here:" |
|
||||||
log::info " ${JOB_URL%%buildWith*}" |
|
||||||
@ -1,65 +0,0 @@ |
|||||||
#!/usr/bin/env bash |
|
||||||
|
|
||||||
[[ "$0" == /* ]] && typeset -r PRG=$0 || typeset -r PRG=$PWD/$0 |
|
||||||
|
|
||||||
BINDIR=$(dirname "$PRG") |
|
||||||
typeset -r BINDIR |
|
||||||
source "${BINDIR}/lib/logging.sh" |
|
||||||
|
|
||||||
|
|
||||||
W3M=/opt/homebrew/bin/w3m |
|
||||||
AWK=/usr/bin/awk |
|
||||||
CURL=/usr/bin/curl |
|
||||||
|
|
||||||
source "${BINDIR}/lib/logging.sh" |
|
||||||
TARGET="${1-11.4.83.0.1.195.1}" |
|
||||||
log::info "TARGET:${TARGET}" |
|
||||||
|
|
||||||
URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=4&target=${TARGET}" |
|
||||||
log::debug $URL |
|
||||||
|
|
||||||
output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1) |
|
||||||
|
|
||||||
out=$(echo "$output" | $AWK '/^Details/ {found=1; next} found && NF') |
|
||||||
|
|
||||||
if [[ -z "$out" ]]; |
|
||||||
then |
|
||||||
log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..." |
|
||||||
exit 0 |
|
||||||
fi |
|
||||||
|
|
||||||
|
|
||||||
log::info "Starting build for for Ul11u4SRU" |
|
||||||
log::info "Target: \"${TARGET}\"" |
|
||||||
|
|
||||||
JENKINS_TOKEN='1154eb0158729a7d326c1db13e7dca0cea' |
|
||||||
JENKINS_SERVER='http://mrshughes.us.oracle.com/jenkins/' |
|
||||||
|
|
||||||
JOB_URL="${JENKINS_SERVER}/job/Solaris_11/job/11.4/job/userland-sru/job/userland-sru-build-11.4/buildWithParameters" |
|
||||||
|
|
||||||
log::info "Using '${JOB_URL}'" |
|
||||||
|
|
||||||
set -x |
|
||||||
curl -X POST "${JOB_URL}" \ |
|
||||||
--user "pnyc:${JENKINS_TOKEN}" \ |
|
||||||
--data-urlencode "Build_Label=${TARGET}" \ |
|
||||||
--data-urlencode "hguser=petr.nyc@oracle.com" \ |
|
||||||
--data-urlencode "verbose=true" \ |
|
||||||
--data-urlencode "debug=true" \ |
|
||||||
--data-urlencode "scriptdir=./solaris/userland/sru/" \ |
|
||||||
--data-urlencode "do_check_sru_cbe=false" \ |
|
||||||
--data-urlencode "prepare_work_area=false" \ |
|
||||||
--data-urlencode "do_build=false" \ |
|
||||||
--data-urlencode "merge_repo=false" \ |
|
||||||
--data-urlencode "create_sparse_repo=false" \ |
|
||||||
--data-urlencode "check_incorporations=false" \ |
|
||||||
--data-urlencode "zip_sparse_repo=false" \ |
|
||||||
--data-urlencode "create_escrow=false" \ |
|
||||||
--data-urlencode "create_foss=false" \ |
|
||||||
--data-urlencode "integration_dryrun=false" \ |
|
||||||
--data-urlencode "confirm_before_ingegration=false" \ |
|
||||||
--data-urlencode "wait_for_dock_open=true" \ |
|
||||||
--data-urlencode "delivery=true" |
|
||||||
|
|
||||||
log::info "The job will be started here:" |
|
||||||
log::info " ${JOB_URL%%buildWith*}" |
|
||||||
@ -1,82 +0,0 @@ |
|||||||
#!/usr/bin/env bash |
|
||||||
|
|
||||||
set -x |
|
||||||
|
|
||||||
check_installed() { |
|
||||||
_pkgs=("$@") |
|
||||||
all_installed=true |
|
||||||
for pkg in "${_pkgs[@]}"; do |
|
||||||
if ! command -v "$pkg" > /dev/null 2>&1; then |
|
||||||
all_installed=false |
|
||||||
break |
|
||||||
fi |
|
||||||
done |
|
||||||
$all_installed && return 0 || return 1 |
|
||||||
} |
|
||||||
|
|
||||||
install_packages() { |
|
||||||
# List of packages to install |
|
||||||
packages=(zsh git) |
|
||||||
|
|
||||||
if ! check_installed "${packages[@]}"; then |
|
||||||
# Determine which package manager is available |
|
||||||
if check_installed apt; then |
|
||||||
echo "Using apt to install packages..." |
|
||||||
sudo apt update |
|
||||||
sudo apt install -y "${packages[@]}" |
|
||||||
elif check_installed dnf; then |
|
||||||
echo "Using dnf to install packages..." |
|
||||||
sudo dnf install -y "${packages[@]}" |
|
||||||
elif check_installed yum; then |
|
||||||
echo "Using yum to install packages..." |
|
||||||
sudo yum install -y "${packages[@]}" |
|
||||||
elif check_installed brew; then |
|
||||||
echo "Using Homebrew to install packages..." |
|
||||||
brew install "${packages[@]}" |
|
||||||
else |
|
||||||
echo "No supported package manager found (apt, dnf, yum, brew)." |
|
||||||
return 1 |
|
||||||
fi |
|
||||||
fi |
|
||||||
} |
|
||||||
|
|
||||||
clone_repos () { |
|
||||||
git clone --bare https://git.meinlschmidt.org/jetpac/dotfiles.git ~/.cfg |
|
||||||
# alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' |
|
||||||
git --git-dir=$HOME/.cfg config --local status.showUntrackedFiles no |
|
||||||
git --git-dir=$HOME/.cfg --work-tree=$HOME checkout |
|
||||||
|
|
||||||
|
|
||||||
# install oh-my-zsh |
|
||||||
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > /tmp/install_ohmyzsh.sh |
|
||||||
bash /tmp/install_ohmyzsh.sh --unattended --skip-chsh --keep-zshrc |
|
||||||
|
|
||||||
# powerlevel10k |
|
||||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k |
|
||||||
|
|
||||||
# tmux tpm plugin manager |
|
||||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm |
|
||||||
|
|
||||||
# plug for installing vim plugins |
|
||||||
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |
|
||||||
} |
|
||||||
|
|
||||||
configure_vim() { |
|
||||||
vim +PlugInstall +qall |
|
||||||
} |
|
||||||
|
|
||||||
configure_tmux() { |
|
||||||
echo "run tmux, prefix + I installs all plugins (needs to have proxies set)" |
|
||||||
echo "export proxies and run $HOME/.tmux/plugins/tpm/bin/install_plugins all" |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
# Call the function to execute the installation |
|
||||||
install_packages |
|
||||||
clone_repos |
|
||||||
configure_vim |
|
||||||
configure_tmux |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# vim: foldmethod=marker:foldmarker={,}:expandtab:sw=4:ts=4: |
|
||||||
Loading…
Reference in new issue