Where is $COMPONENT_PATH set?

I am running Bitrise CLI and having an issue with step xamarin components restore

The output is:

mono /xamarin-component.exe restore EventPhoto.Xamarin.sln
Cannot open assembly ‘/xamarin-component.exe’: No such file or directory.

The step uses $COMPONENT_PATH but I am not sure where that is being set.

Do you have this issue locally on your Mac?

COMPONENT_PATH is defined in a bash profile file, you can find it here:

1 Like

Yes, the issue is specific to running bitrise cli locally on my Mac. I downloaded the bitrise.yml file and copied it to the root of my project. (Builds are running just fine on Bitrise.io, this is my first attempt at using the cli)

I ran bitrise setup
Then just running my birtise workflow.

1 Like

Hi @mbiehl,

You can define your environments in a .bitrise.secrets.yml file, if the file is placed in the same directory where your bitrise.yml is and you run bitrise cli commands in this directory, bitrise run will use this envs automatically.
Otherwise you can specify the secrets file path: bitrise run --inventory [PATH/TO/YOUR/.bitrise.secrets.yml]

Note: you should gitignore this file, since it is related to your local environment.

.bitrise.secrets.yml example:

envs:
  - MY_ENV_KEY1: my_env_value1
  - MY_ENV_KEY2: my_env_value2
...

You can define environments in:

  • in bitrise.yml as app:/envs:
app:
  envs:
  - MY_ENV_KEY1: my_env_value1
  • in bitirise.yml as workflow:/envs:
workflows:
  primary:
    envs:
    - MY_ENV_KEY1: my_env_value1
  • in .bitrise.secrets.yml
envs:
  - MY_ENV_KEY1: my_env_value1

The envs are processed in the following order (by priority):

secret envs < app envs < workflow envs

So workflow env will override app env and secret env with the same key.

2 Likes