Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify useful variables for Rally CI #907

Merged
merged 2 commits into from
Feb 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .ci/variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"python_versions": {
"PY38": "3.8.0",
"PY37": "3.7.5",
"PY36": "3.6.9",
"PY35": "3.5.8"
}
}
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@

SHELL = /bin/bash
# We assume an active virtualenv for development
include make-requirements.txt
PYENV_REGEX = .pyenv/shims
PY_BIN = python3
PY35 = $(shell jq '.python_versions.PY35' .ci/variables.json)
PY36 = $(shell jq '.python_versions.PY36' .ci/variables.json)
PY37 = $(shell jq '.python_versions.PY37' .ci/variables.json)
PY38 = $(shell jq '.python_versions.PY38' .ci/variables.json)
VENV_NAME ?= .venv
VENV_ACTIVATE_FILE = $(VENV_NAME)/bin/activate
VENV_ACTIVATE = . $(VENV_ACTIVATE_FILE)
Expand All @@ -30,14 +33,14 @@ PYENV_PATH_ERROR = "\033[0;31mIMPORTANT\033[0m: Please add $(HOME)/$(PYENV_REGEX
PYENV_PREREQ_HELP = "\033[0;31mIMPORTANT\033[0m: please add \033[0;31meval \"\$$(pyenv init -)\"\033[0m to your bash profile and restart your terminal before proceeding any further.\n"
VE_MISSING_HELP = "\033[0;31mIMPORTANT\033[0m: Couldn't find $(PWD)/$(VENV_NAME); have you executed make venv-create?\033[0m\n"

prereq: make-requirements.txt
prereq:
pyenv install --skip-existing $(PY35)
pyenv install --skip-existing $(PY36)
pyenv install --skip-existing $(PY37)
pyenv install --skip-existing $(PY38)
pyenv global system $(PY35) $(PY36) $(PY37) $(PY38)
@# Ensure all Python versions are registered for this project
@awk -F'=' '{print $$2}' make-requirements.txt > .python-version
jq -r '.python_versions | [.[] | tostring] | join("\n")' .ci/variables.json > .python-version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Prefix with @ to hide output?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0bd2b61

-@ printf $(PYENV_PREREQ_HELP)

venv-create:
Expand Down
4 changes: 0 additions & 4 deletions make-requirements.txt

This file was deleted.