Skip to content
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

[BashV3] Add task input to provide an ability to set BASH_ENV environment variable #15352

Conversation

alexander-smolyakov
Copy link
Contributor

@alexander-smolyakov alexander-smolyakov commented Sep 29, 2021

Task name:

  • BashV3

Issue description:
Since the Bash pipeline task invokes Bash as a non-interactive shell noRc and noProfile inputs are ignored by the Bash according to the documentation. In the non-interactive mode, Bash looks only for the BASH_ENV environment variable.

Fix:
This PR introduces a new input for the Bash task to provide an ability to set a value for BASH_ENV environment variable. The customer could set a path to the startup file In this environment variable that will be read before script execution.

Changes:

  • noRc and noProfile inputs are removed from the task
  • Updated unit tests according changes
  • Added input bashEnvValue to provide an ability to set BASH_ENV environment variable for the task

Documentation changes required: Yes

Added unit tests: Yes

Attached related issue:

Checklist:

  • Task version was bumped - please check instruction how to do it
  • Checked that applied changes work as expected

Aleksandr Smolyakov added 3 commits September 29, 2021 16:04
- Remove `noRc` and `noProfile` inputs from task UI
- Remove ` --noprofile` and `--norc` arguments from `translateDirectoryPath` function
- Remove `--noprofile` and `--norc` arguments from unit tests mocked answers
- Add `bashEnvValue` input for task UI
- Add `setBashEnvVariable` function
- Updated help markdown  of `bashEnvValue` input
- Updated help description `setBashEnvVariable` function
- Minor code changes
@alexander-smolyakov alexander-smolyakov requested a review from a team October 7, 2021 15:09
@alexander-smolyakov alexander-smolyakov self-assigned this Oct 7, 2021
@alexander-smolyakov alexander-smolyakov marked this pull request as ready for review October 7, 2021 15:10
@EzzhevNikita
Copy link
Contributor

LGTM!
Also tested this changes manually, everything works as expected

Aleksandr Smolyakov added 4 commits October 8, 2021 20:17
- Added `BASH_ENV - set environment variable` unit  test
- Added `BASH_ENV - override environment variable` unit  test
@alexander-smolyakov alexander-smolyakov requested a review from a team October 11, 2021 09:02
Maxim Zaytsev and others added 2 commits October 12, 2021 13:30
@alexander-smolyakov alexander-smolyakov merged commit 7b5260e into master Oct 13, 2021
@alexander-smolyakov alexander-smolyakov deleted the users/alexander-smolyakov/issue1641_BashV3_remove_norc_noprofile_inputs branch October 13, 2021 07:43
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.

4 participants