This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import logging | |
from os import cpu_count | |
import boto3 | |
import json | |
import requests | |
from pkg_resources import resource_filename | |
from multiprocessing import Pool | |
import tabulate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hudson.AbortException | |
import com.sonyericsson.jenkins.plugins.bfa.model.FailureCauseBuildAction | |
import org.jvnet.jenkins.plugins.nodelabelparameter.LabelParameterValue | |
import org.jvnet.jenkins.plugins.nodelabelparameter.node.AllNodeEligibility | |
import hudson.model.Label | |
import hudson.model.labels.LabelExpression | |
import jenkins.model.Jenkins | |
import com.cloudbees.groovy.cps.NonCPS | |
@NonCPS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
# To build in 64bit mode | |
if ! command -v aarch64-linux-gnu-gcc; then | |
sudo apt-get install gcc-aarch64-linux-gnu | |
fi | |
if ! command -v mformat; then | |
sudo apt-get install mtools | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will use osd.5 as an example | |
# ceph commands are expected to be run in the rook-toolbox | |
1) disk fails | |
2) remove disk from node | |
3) mark out osd. `ceph osd out osd.5` | |
4) remove from crush map. `ceph osd crush remove osd.5` | |
5) delete caps. `ceph auth del osd.5` | |
6) remove osd. `ceph osd rm osd.5` | |
7) delete the deployment `kubectl delete deployment -n rook-ceph rook-ceph-osd-5` | |
8) delete osd data dir on node `rm -rf /var/lib/rook/osd5` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
if ! [ -e "All-Users" ]; then | |
[ -n "$GERRIT_GIT_PATH" ] || ( echo "GERRIT_GIT_PATH not set" && exit 1 ) | |
git clone "${GERRIT_GIT_PATH}/All-Users.git" | |
fi | |
cd All-Users | |
rm -f /tmp/users.csv | |
set +e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dir=$1 | |
for file in $(find "$dir" -name "lib*.so" -or -wholename "*/bin/*"); do | |
objdump -x $file 2>/dev/null | grep NEEDED | |
done | sort -u | awk '{print $2}' > /tmp/all-libs | |
while read -r -u 10 lib; do | |
( find "$dir" -name "$lib" -print0 | grep -qz . ) || echo "$lib" | |
done 10</tmp/all-libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
if [ -z "$OBJDUMP" ]; then | |
OBJDUMP="$(which objdump)" | |
echo "Using $OBJDUMP" | |
fi | |
LEFT=$1 | |
RIGHT=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
GIT_ROOT=${GIT_ROOT:-"/storage/git"} | |
TMP_GIT=${TMP_GIT:-"/home/core/test"} | |
OLD_ID=$1 | |
NEW_ID=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This shell script allows you to maintain a local cache of public images. | |
# | |
# Just add your images in CACHE_IMAGES, and it will push the image to the | |
# registry specified in LOCAL_REGISTRY. | |
# The / in the origin image name is replaced by a -. | |
# google/cadvisor => local_registry:5000/google-cadvisor | |
# | |
# If you want to rename the destination image, just specify the destination name | |
# after a comma. For instance: |