Skip to content

Is it possible to set an OS environment variable and use it in a different task? #660

Answered by kerma
ezerw asked this question in Q&A
Discussion options

You must be logged in to vote

Environment handling is a bit of a weak point of task. However there are various ways how to achieve what you're after.

  1. Login in the same shell
task_b:
  cmds:
    - |
      test ! -z "$AWS_ACCESS_KEY_ID" && login.sh
      real_command
  1. Use https://github.com/99designs/aws-vault (which is probably what you should do)

There is some background reading on this topic in various issues, like

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ezerw
Comment options

Answer selected by ezerw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants