Skip to content

Commit

Permalink
Fetch region from configuration in test task. Fix pyenv in CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyclemson committed Jun 10, 2021
1 parent 6bc6240 commit 494173b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ namespace :test do
mkdir_p(plugin_cache_directory)

ENV['TF_PLUGIN_CACHE_DIR'] = plugin_cache_directory
ENV['AWS_REGION'] = 'eu-west-2'
ENV['AWS_REGION'] = configuration.region
end
end

Expand Down
6 changes: 6 additions & 0 deletions lib/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ def work_directory
@delegate.work_directory
end

def region
@delegate
.for_scope(project_directory: project_directory)
.region
end

def public_address
PublicAddress.as_ip_address
end
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/common/install-pyenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ apt-get install -y --no-install-recommends \
libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils \
tk-dev libffi-dev liblzma-dev python-openssl git

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
curl https://pyenv.run | bash

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

pyenv install
pyenv install "$(cat .python-version)"
pip install --upgrade pip
pip install virtualenv

0 comments on commit 494173b

Please sign in to comment.