Merge branch '2.6'
This commit is contained in:
commit
9d669c3312
2 files changed
+10
-9
No files matched your search
@@ -13,13 +13,6 @@ function install_terraform() {
|
|||||||
curl -fsS https://releases.hashicorp.com/terraform/0.11.14/terraform_0.11.14_linux_amd64.zip | gunzip >terraform && chmod +x terraform && sudo mv terraform /usr/bin
|
curl -fsS https://releases.hashicorp.com/terraform/0.11.14/terraform_0.11.14_linux_amd64.zip | gunzip >terraform && chmod +x terraform && sudo mv terraform /usr/bin
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_ansible() {
|
|
||||||
sudo apt-get update || true
|
|
||||||
sudo apt-get install -qq -y python-pip python-dev libffi-dev libssl-dev \
|
|
||||||
&& pip install --user -U setuptools cffi \
|
|
||||||
&& pip install --user ansible
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -n "$SECRET_KEY" ] || {
|
[ -n "$SECRET_KEY" ] || {
|
||||||
echo "Cannot run smoke tests: no secret key"
|
echo "Cannot run smoke tests: no secret key"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -28,7 +21,6 @@ function install_ansible() {
|
|||||||
source "$SRCDIR/bin/circle-env"
|
source "$SRCDIR/bin/circle-env"
|
||||||
|
|
||||||
install_terraform
|
install_terraform
|
||||||
install_ansible
|
|
||||||
|
|
||||||
# Only attempt to create GCP image in first container, wait for it to be created otherwise:
|
# Only attempt to create GCP image in first container, wait for it to be created otherwise:
|
||||||
[ "$CIRCLE_NODE_INDEX" != "0" ] && export CREATE_IMAGE=0
|
[ "$CIRCLE_NODE_INDEX" != "0" ] && export CREATE_IMAGE=0
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ function print_vars() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function verify_dependencies() {
|
function verify_dependencies() {
|
||||||
local deps=(python terraform ansible-playbook gcloud)
|
local deps=(python terraform gcloud)
|
||||||
for dep in "${deps[@]}"; do
|
for dep in "${deps[@]}"; do
|
||||||
if [ ! "$(which "$dep")" ]; then
|
if [ ! "$(which "$dep")" ]; then
|
||||||
echo >&2 "$dep is not installed or not in PATH."
|
echo >&2 "$dep is not installed or not in PATH."
|
||||||
@@ -141,9 +141,18 @@ function wait_for_image() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function install_ansible() {
|
||||||
|
sudo apt-get update || true
|
||||||
|
sudo apt-get install -qq -y python-pip python-dev libffi-dev libssl-dev \
|
||||||
|
&& pip install --user -U setuptools cffi \
|
||||||
|
&& pip install --user ansible
|
||||||
|
}
|
||||||
|
|
||||||
# shellcheck disable=SC2155
|
# shellcheck disable=SC2155
|
||||||
function create_image() {
|
function create_image() {
|
||||||
if [[ "$CREATE_IMAGE" == 1 ]]; then
|
if [[ "$CREATE_IMAGE" == 1 ]]; then
|
||||||
|
install_ansible
|
||||||
|
|
||||||
greenly echo "> Creating GCP image $IMAGE_NAME..."
|
greenly echo "> Creating GCP image $IMAGE_NAME..."
|
||||||
local begin_img=$(date +%s)
|
local begin_img=$(date +%s)
|
||||||
local num_hosts=1
|
local num_hosts=1
|
||||||
|
|||||||
Reference in new issue
Block a user