Skip to content

Update local-jobs.md #1107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 8, 2017
Merged

Conversation

michelle-luna
Copy link
Contributor

Qualify working_directory for clarity and add limitation and workaround for env vars.

Qualify working_directory for clarity and add limitation and workaround for env vars.
@@ -87,12 +91,10 @@ Caching is not currently supported in local jobs. When you have either a `save_c

### Relative Path for working_directory

Using a relative path for `working_directory` is not currently supported in local jobs. If a relative path is used in `working_directory`, then `circleci` returns an error and immediately exists.
The `working_directory:` key in your `.cirecleci.config.yml` file must not use a relative path for local jobs. If a relative path is used in `working_directory`, then `circleci` returns an error and immediately exists. To workaround this problem, change the value of the `working_directory:` key in your `.cirecleci.config.yml` file to use an absolute path.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: exists should be exits

@@ -77,6 +77,10 @@ The CLI tool automatically checks for updates and will prompt you if one is avai

Although running jobs locally with `circleci` is very helpful, there are some limitations.

### Setting Environment Variables

We don't yet have an ideal solution for setting environment variables, but there is a workaround. Define which variables you want to export in a file within your repository (don't commit it - just have it in the directory). Then set BASH_ENV to that filename in your `.cirecleci.config.yml` file. The file will be automatically sourced on each command as long as BASH_ENV is correct.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to be super clear this is for local builds:

"We don't yet have an ideal solution for setting environment variables on local builds, ..."

I've not had a chance to check, but if BASH_ENV is set in .circleci/config.yml what happens when that file doesn't exist on a non-local build?

incorporate Tom's changes
Copy link
Contributor

@FelicianoTech FelicianoTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's at least 3 instances where .cirecleci.config.yml is written which should be .cirecleci/config.yml.

incorporate Ricardo fixes
@michelle-luna michelle-luna merged commit 2e6f199 into master Jun 8, 2017
@michelle-luna michelle-luna deleted the local-builds-env-vars-limitation branch June 8, 2017 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants