Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit 95c020f

Browse files
authored
Merge pull request #3809 from weaveworks/move-ansible-install
Move ansible install out from every CI run
2 parents f78c4da + 7c2084b commit 95c020f

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

bin/provision_test_vms.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ function install_terraform() {
1313
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
1414
}
1515

16-
function install_ansible() {
17-
sudo apt-get update || true
18-
sudo apt-get install -qq -y python-pip python-dev libffi-dev libssl-dev \
19-
&& pip install --user -U setuptools cffi \
20-
&& pip install --user ansible
21-
}
22-
2316
[ -n "$SECRET_KEY" ] || {
2417
echo "Cannot run smoke tests: no secret key"
2518
exit 1
@@ -28,7 +21,6 @@ function install_ansible() {
2821
source "$SRCDIR/bin/circle-env"
2922

3023
install_terraform
31-
install_ansible
3224

3325
# Only attempt to create GCP image in first container, wait for it to be created otherwise:
3426
[ "$CIRCLE_NODE_INDEX" != "0" ] && export CREATE_IMAGE=0

test/run-integration-tests.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function print_vars() {
6666
}
6767

6868
function verify_dependencies() {
69-
local deps=(python terraform ansible-playbook gcloud)
69+
local deps=(python terraform gcloud)
7070
for dep in "${deps[@]}"; do
7171
if [ ! "$(which "$dep")" ]; then
7272
echo >&2 "$dep is not installed or not in PATH."
@@ -141,9 +141,18 @@ function wait_for_image() {
141141
exit 1
142142
}
143143

144+
function install_ansible() {
145+
sudo apt-get update || true
146+
sudo apt-get install -qq -y python-pip python-dev libffi-dev libssl-dev \
147+
&& pip install --user -U setuptools cffi \
148+
&& pip install --user ansible
149+
}
150+
144151
# shellcheck disable=SC2155
145152
function create_image() {
146153
if [[ "$CREATE_IMAGE" == 1 ]]; then
154+
install_ansible
155+
147156
greenly echo "> Creating GCP image $IMAGE_NAME..."
148157
local begin_img=$(date +%s)
149158
local num_hosts=1

0 commit comments

Comments
 (0)