box / box/ClusterRunner

clusterrunner_command file should include all env vars

Open
#191 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
184
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Here is an example of the current clusterrunner_command file:

```
export TESTPATH="/tmp/clusterrunner_build_symlinks/b42ce3c9-a9ff-40dd-bee0-09e990b9e775/test/unit/lib/Person_Test.php"; cd $PROJECT_DIR && echo "something important" > $ARTIFACT_DIR/coverage_config.xml && phpunit -c coverage_config.xml $TESTPATH
```

Note that the values of `$PROJECT_DIR` and `$ARTIFACT_DIR` are not included in this file, so if the user is debugging this command and would like to know what those values were then they will need to hunt through the clusterrunner master and slave logs to find all the env values.

I think it would be more useful if we also included the values of the ClusterRunner "standard" env vars (e.g., `$PROJECT_DIR`) in this file so that users could just execute the file to reproduce CR's behavior.

An example of what I mean for the above case would be:

```
export ATOM_ID="0";
export BUILD_EXECUTOR_INDEX="10";
export EXECUTOR_INDEX="0";
export MACHINE_EXECUTOR_INDEX="0";
export ARTIFACT_DIR="/home/jenkins/.clusterrunner/artifacts/2318/artifact_7_0";
export PROJECT_DIR="/tmp/clusterrunner_build_symlinks/b42ce3c9-a9ff-40dd-bee0-09e990b9e775";
export TESTPATH="/tmp/clusterrunner_build_symlinks/b42ce3c9-a9ff-40dd-bee0-09e990b9e775/test/unit/lib/Person_Test.php";

cd $PROJECT_DIR && echo "something important" > $ARTIFACT_DIR/coverage_config.xml && phpunit -c coverage_config.xml $TESTPATH
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.