Get env var right

This commit is contained in:
GeorgianaElena
2020-02-18 16:47:18 +02:00
parent 764806b999
commit f64d762d23
2 changed files with 22 additions and 26 deletions

View File

@@ -40,14 +40,14 @@ commands:
branch_path: branch_path:
type: string type: string
default: "" default: ""
steps: steps:
- run: - run:
name: Run basic tests name: Run basic tests
command: | command: |
CIRCLE_PR_BRANCH=`curl -s https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER | grep '"ref":' | grep -v "master" | cut -d '"' -f4`
.circleci/integration-test.py run-test basic-tests \ .circleci/integration-test.py run-test basic-tests \
test_hub.py test_install.py test_extensions.py \ test_hub.py test_install.py test_extensions.py \
<< parameters.upgrade >> << parameters.branch_path >> << parameters.upgrade >> $CIRCLE_PR_BRANCH
admin_tests: admin_tests:
parameters: parameters:
@@ -57,7 +57,6 @@ commands:
branch_path: branch_path:
type: string type: string
default: "" default: ""
steps: steps:
- run: - run:
name: Run admin tests name: Run admin tests
@@ -75,7 +74,6 @@ commands:
branch_path: branch_path:
type: string type: string
default: "" default: ""
steps: steps:
- run: - run:
name: Run plugin tests name: Run plugin tests
@@ -86,20 +84,16 @@ commands:
<< parameters.upgrade >> << parameters.upgrade >>
bootstrap_checks: bootstrap_checks:
parameters:
branch_path:
type: string
default: ""
steps: steps:
- run: - run:
name: Run bootstrap checks name: Run bootstrap checks
command: | command: |
py.test integration-tests/test_bootstrap.py py.test integration-tests/test_bootstrap.py
get_pr_branch:
steps:
- run:
name: Get PR branch
command: |
CIRCLE_PR_BRANCH=`curl -s https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${CIRCLE_PR_NUMBER} \
| grep '"ref":' | grep -v "master" | cut -d '"' -f4'
jobs: jobs:
unit-test: unit-test:
@@ -148,56 +142,57 @@ jobs:
command: | command: |
apk add --no-cache python3 pytest apk add --no-cache python3 pytest
- get_pr_branch
- checkout - checkout
- setup_remote_docker - setup_remote_docker
- build_systemd_image - build_systemd_image
- basic-tests: - basic_tests:
branch_path: "git+https://github.com/{CIRCLE_PROJECT_USERNAME}/the-littlest-jupyterhub.git@${CIRCLE_PR_BRANCH}" branch_path: $CIRCLE_PR_BRANCH
- admin_tests: - admin_tests:
branch_path: "git+https://github.com/{CIRCLE_PROJECT_USERNAME}/the-littlest-jupyterhub.git@${CIRCLE_PR_BRANCH}" branch_path: 'git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_PR_BRANCH'
- plugin_tests: - plugin_tests:
branch_path: "git+https://github.com/{CIRCLE_PROJECT_USERNAME}/the-littlest-jupyterhub.git@${CIRCLE_PR_BRANCH}" branch_path: 'git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_PR_BRANCH'
- bootstrap_checks: - bootstrap_checks:
branch_path: "git+https://github.com/{CIRCLE_PROJECT_USERNAME}/the-littlest-jupyterhub.git@${CIRCLE_PR_BRANCH}" branch_path: 'git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_PR_BRANCH'
upgrade-test: upgrade-test:
docker: docker:
- image: docker:18.05.0-ce-git - image: docker:18.05.0-ce-git
environment:
CIRCLE_PR_BRANCH: |
$(curl -s https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER \
| grep '"ref":' | grep -v "master" | cut -d '"' -f4)
steps: steps:
- run: - run:
name: setup python3 name: setup python3
command: | command: |
apk add --no-cache python3 pytest apk add --no-cache python3 pytest
- get_pr_branch
- checkout - checkout
- setup_remote_docker - setup_remote_docker
- build_systemd_image - build_systemd_image
- basic-tests: - basic_tests:
upgrade: "--upgrade" upgrade: "--upgrade"
branch_path: "git+https://github.com/{CIRCLE_PROJECT_USERNAME}/the-littlest-jupyterhub.git@${CIRCLE_PR_BRANCH}" branch_path: 'git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_PR_BRANCH'
- admin_tests: - admin_tests:
upgrade: "--upgrade" upgrade: "--upgrade"
branch_path: "git+https://github.com/{CIRCLE_PROJECT_USERNAME}/the-littlest-jupyterhub.git@${CIRCLE_PR_BRANCH}" branch_path: "git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_PR_BRANCH"
- plugin_tests: - plugin_tests:
upgrade: "--upgrade" upgrade: "--upgrade"
branch_path: "git+https://github.com/{CIRCLE_PROJECT_USERNAME}/the-littlest-jupyterhub.git@${CIRCLE_PR_BRANCH}" branch_path: "git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_PR_BRANCH"
documentation: documentation:
@@ -240,4 +235,5 @@ workflows:
jobs: jobs:
- unit-test - unit-test
- integration-test - integration-test
- upgrade-test
- documentation - documentation

View File

@@ -261,7 +261,7 @@ def ensure_user_environment(user_requirements_txt_file):
else: else:
if conda.check_miniconda_version( if conda.check_miniconda_version(
USER_ENV_PREFIX, miniconda_old_version USER_ENV_PREFIX, miniconda_old_version
) ):
conda_version = '4.5.8' conda_version = '4.5.8'
# If no prior miniconda installation is found, we can install a newer version # If no prior miniconda installation is found, we can install a newer version
else: else: