Skip to content

Commit fec6899

Browse files
committed
Simplify Vagrant plugin installation in build script
1 parent ccc45ad commit fec6899

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.buildkite/vagrant-run.sh

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,20 @@ cleanup() {
1313
}
1414

1515
echo --- ":vagrant: installing plugins"
16-
plugins=("vagrant-google --plugin-version '2.7.0'" vagrant-env vagrant-scp)
17-
for i in "${plugins[@]}"; do
18-
vagrant plugin list --no-tty
19-
if ! vagrant plugin list --no-tty | grep "$i"; then
20-
vagrant plugin install "$i"
21-
fi
22-
done
16+
vagrant --version
17+
vagrant plugin install vagrant-google --plugin-version '2.7.0'
18+
vagrant plugin install vagrant-env
19+
vagrant plugin install vagrant-scp
2320

2421
trap cleanup EXIT
2522

26-
echo --- ":bug: fixing dotenv"
27-
echo "see fix: https://github.com/hashicorp/vagrant/issues/13550"
28-
sed -i -e 's/exists?/exist?/g' /var/lib/buildkite-agent/.vagrant.d/gems/3.3.8/gems/dotenv-0.11.1/lib/dotenv.rb
23+
# echo --- ":bug: fixing dotenv"
24+
# echo "see fix: https://github.com/hashicorp/vagrant/issues/13550"
25+
# sed -i -e 's/exists?/exist?/g' /var/lib/buildkite-agent/.vagrant.d/gems/3.3.8/gems/dotenv-0.11.1/lib/dotenv.rb
2926

3027
echo --- ":lock: builder account key"
3128
KEY_PATH="/tmp/e2e-builder.json"
32-
if [ ! -f ${KEY_PATH} ];
29+
if [ ! -f ${KEY_PATH} ]; then
3330
gcloud secrets versions access latest --secret=e2e-builder-sa-key --quiet --project=sourcegraph-ci > "${KEY_PATH}"
3431
fi
3532
export GOOGLE_JSON_KEY_LOCATION="${KEY_PATH}"

0 commit comments

Comments
 (0)