Giter Club home page Giter Club logo

Comments (5)

ryanbourdais avatar ryanbourdais commented on July 19, 2024

Hi @thaole-NRS I'm looking into this issue right now.

from android-orb.

ryanbourdais avatar ryanbourdais commented on July 19, 2024

Hi @thaole-NRS the orb seems to be working as intended, this is evident from it erroring out with environment: line 8: mvn: command not found. It seems that the issue comes from sourcing /etc/environment which is not advised as it can have unintended consequences such as this. I am closing this issue with this response, but if you need any further help or explanation you are more than welcome to reopen this issue.

from android-orb.

thaole-NRS avatar thaole-NRS commented on July 19, 2024

@ryanbourdais You're correct, it is functioning as intended. I refrain from utilizing the 'source /etc/environment' command. Prior to executing the 'test-command,' I aim to establish an environment variable named TESTFILES, which should obtain its value from a file called 'testfiles.txt.' Could you assist me in determining the appropriate command for the 'pre-test-command' phase?

from android-orb.

ryanbourdais avatar ryanbourdais commented on July 19, 2024

If the value of the environment variable needs to be set dynamically we typically would create local variables like this using shell commands

- run: echo 'export STR="string"' >> "$BASH_ENV"
- run: echo ${STR}

this would set create the local environment variable STR which is accessible in a later step.
In the event that the value is known and fairly static you can use an environment variable

from android-orb.

thaole-NRS avatar thaole-NRS commented on July 19, 2024
- run:
    name: Run E2E Mobile Tests
    command: |
      echo "export TESTFILES=$(circleci tests glob "features_iOS/*.feature" | circleci tests split --split-by=filesize | xargs)" >> "$BASH_ENV"
      echo ${TESTFILES}
      [ -n "$TESTFILES" ] || exit 1
- run:
    name: "What was my custom environment variable?"
    command: echo ${TESTFILES}
- android/run-tests:
    max-tries: 1
    pre-test-command: echo ${TESTFILES}

@ryanbourdais The run command with "What was my custom environment variable?" returns with the expected value. But the pre-test-command returns with ${TESTFILES} which means it doesn't know TESTFILES env, did I miss anything here?

from android-orb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.