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 bash | |
set -o nounset -o errexit -o pipefail | |
usage() { | |
cat <<EOM | |
Usage: | |
$(basename $0) [OPTIONS] | |
$(basename $0) [ -j | --jenkins-url | -n | --node-name | -s | -d | --desc | --slave-home | -e | --executors | -sh | --ssh-host | -sp | --ssh-port | |
| -c | --cred-id | -l | --labels | -u | --user-id | -p | --password | -h | --help ] |
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 | |
set -u | |
CI_MASTER_URL="http://ci-1" | |
node_online() { | |
curl --silent "$CI_MASTER_URL/computer/$1/api/json" | grep --silent '"temporarilyOffline":false' | |
} |
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 python | |
""" | |
mocking requests calls | |
""" | |
import mock | |
import unittest | |
import requests | |
from requests.exceptions import HTTPError |