Skip to content

Commit da65491

Browse files
authored
⭕️ Update Environment variables (#362)
* Update py3-compose.yml * Update py2-compose.yml * Create 24062019.misc * Update generate_ci_config.py * updated generator * Update docker-compose.yml
1 parent a8cd6ae commit da65491

7 files changed

Lines changed: 33 additions & 14 deletions

File tree

.circleci/config.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,12 @@ jobs:
407407
command: 'echo ''export TEST_RUNNER_DEFAULT_API_HOST=${MBED_CLOUD_API_HOST_OS2}''
408408
>> $BASH_ENV
409409
410+
echo ''export MBED_CLOUD_SDK_HOST=${MBED_CLOUD_API_HOST_OS2}'' >> $BASH_ENV
411+
410412
echo ''export TEST_RUNNER_DEFAULT_API_KEY=${MBED_CLOUD_API_KEY_OS2}'' >>
411-
$BASH_ENV'
413+
$BASH_ENV
414+
415+
echo ''export MBED_CLOUD_SDK_API_KEY=${MBED_CLOUD_API_KEY_OS2}'' >> $BASH_ENV'
412416
name: Set testrunner parameters
413417
- run:
414418
command: docker-compose -f container/py2-compose.yml up --exit-code-from=sdk_test_server
@@ -446,8 +450,12 @@ jobs:
446450
command: 'echo ''export TEST_RUNNER_DEFAULT_API_HOST=${MBED_CLOUD_API_HOST_PROD}''
447451
>> $BASH_ENV
448452
453+
echo ''export MBED_CLOUD_SDK_HOST=${MBED_CLOUD_API_HOST_PROD}'' >> $BASH_ENV
454+
449455
echo ''export TEST_RUNNER_DEFAULT_API_KEY=${MBED_CLOUD_API_KEY_PROD}'' >>
450-
$BASH_ENV'
456+
$BASH_ENV
457+
458+
echo ''export MBED_CLOUD_SDK_API_KEY=${MBED_CLOUD_API_KEY_PROD}'' >> $BASH_ENV'
451459
name: Set testrunner parameters
452460
- run:
453461
command: docker-compose -f container/py2-compose.yml up --exit-code-from=sdk_test_server
@@ -485,8 +493,12 @@ jobs:
485493
command: 'echo ''export TEST_RUNNER_DEFAULT_API_HOST=${MBED_CLOUD_API_HOST_OS2}''
486494
>> $BASH_ENV
487495
496+
echo ''export MBED_CLOUD_SDK_HOST=${MBED_CLOUD_API_HOST_OS2}'' >> $BASH_ENV
497+
488498
echo ''export TEST_RUNNER_DEFAULT_API_KEY=${MBED_CLOUD_API_KEY_OS2}'' >>
489-
$BASH_ENV'
499+
$BASH_ENV
500+
501+
echo ''export MBED_CLOUD_SDK_API_KEY=${MBED_CLOUD_API_KEY_OS2}'' >> $BASH_ENV'
490502
name: Set testrunner parameters
491503
- run:
492504
command: docker-compose -f container/py3-compose.yml up --exit-code-from=sdk_test_server
@@ -524,8 +536,12 @@ jobs:
524536
command: 'echo ''export TEST_RUNNER_DEFAULT_API_HOST=${MBED_CLOUD_API_HOST_PROD}''
525537
>> $BASH_ENV
526538
539+
echo ''export MBED_CLOUD_SDK_HOST=${MBED_CLOUD_API_HOST_PROD}'' >> $BASH_ENV
540+
527541
echo ''export TEST_RUNNER_DEFAULT_API_KEY=${MBED_CLOUD_API_KEY_PROD}'' >>
528-
$BASH_ENV'
542+
$BASH_ENV
543+
544+
echo ''export MBED_CLOUD_SDK_API_KEY=${MBED_CLOUD_API_KEY_PROD}'' >> $BASH_ENV'
529545
name: Set testrunner parameters
530546
- run:
531547
command: docker-compose -f container/py3-compose.yml up --exit-code-from=sdk_test_server

container/py2-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ services:
3131
- 'TEST_SERVER_URL=http://sdk_test_server:5000'
3232
- TEST_FIXTURES_DIR=/test_fixtures
3333
- TEST_RUNNER_SHUTDOWN_SERVER=yes
34-
- TEST_RUNNER_DEFAULT_API_KEY
35-
- TEST_RUNNER_DEFAULT_API_HOST
34+
- MBED_CLOUD_SDK_API_KEY
35+
- MBED_CLOUD_SDK_HOST
3636
depends_on:
3737
- sdk_test_server
3838
volumes:
3939
- ../results:/runner/results
4040
- ../test_fixtures:/runner/test_fixtures
4141
# sleep ensures the testrunner stays up whilst test server completes coverage shutdown
42-
command: [sh, -c, '(python -m trunner || true) && sleep 10000']
42+
command: [sh, -c, '(python -m trunner || true) && sleep 10000']

container/py3-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ services:
3131
- 'TEST_SERVER_URL=http://sdk_test_server:5000'
3232
- TEST_FIXTURES_DIR=/test_fixtures
3333
- TEST_RUNNER_SHUTDOWN_SERVER=yes
34-
- TEST_RUNNER_DEFAULT_API_KEY
35-
- TEST_RUNNER_DEFAULT_API_HOST
34+
- MBED_CLOUD_SDK_API_KEY
35+
- MBED_CLOUD_SDK_HOST
3636
depends_on:
3737
- sdk_test_server
3838
volumes:
3939
- ../results:/runner/results
4040
- ../test_fixtures:/runner/test_fixtures
4141
# sleep ensures the testrunner stays up whilst test server completes coverage shutdown
42-
command: [sh, -c, '(python -m trunner || true) && sleep 10000']
42+
command: [sh, -c, '(python -m trunner || true) && sleep 10000']

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ testrunner:
1717
environment:
1818
- "TEST_SERVER_URL=http://sdk_test_server:5000"
1919
- TEST_FIXTURES_DIR=/test_fixtures
20-
- TEST_RUNNER_DEFAULT_API_KEY
21-
- TEST_RUNNER_DEFAULT_API_HOST
20+
- MBED_CLOUD_SDK_API_KEY
21+
- MBED_CLOUD_SDK_HOST
2222
image: "${TESTRUNNER_DOCKER_IMAGE}"
2323
command:
2424
- sh

docs/news/24062019.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated environment variables in use by test runner

scripts/generate_ci_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ def new_test(py_ver: PyVer, cloud_host: CloudHost):
376376
name: Set testrunner parameters
377377
command: |-
378378
echo 'export TEST_RUNNER_DEFAULT_API_HOST=${{{cloud_host.envvar_host}}}' >> $BASH_ENV
379+
echo 'export MBED_CLOUD_SDK_HOST=${{{cloud_host.envvar_host}}}' >> $BASH_ENV
379380
echo 'export TEST_RUNNER_DEFAULT_API_KEY=${{{cloud_host.envvar_key}}}' >> $BASH_ENV
381+
echo 'export MBED_CLOUD_SDK_API_KEY=${{{cloud_host.envvar_key}}}' >> $BASH_ENV
380382
- run:
381383
name: Run all tests
382384
no_output_timeout: 15m

scripts/templates/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ services:
3131
- 'TEST_SERVER_URL=http://sdk_test_server:5000'
3232
- TEST_FIXTURES_DIR=/test_fixtures
3333
- TEST_RUNNER_SHUTDOWN_SERVER=yes
34-
- TEST_RUNNER_DEFAULT_API_KEY
35-
- TEST_RUNNER_DEFAULT_API_HOST
34+
- MBED_CLOUD_SDK_API_KEY
35+
- MBED_CLOUD_SDK_HOST
3636
depends_on:
3737
- sdk_test_server
3838
volumes:

0 commit comments

Comments
 (0)