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

Feature: Allow user to load environment variables from file. #133

Open
SeJunB opened this issue Oct 8, 2023 · 0 comments
Open

Feature: Allow user to load environment variables from file. #133

SeJunB opened this issue Oct 8, 2023 · 0 comments

Comments

@SeJunB
Copy link

SeJunB commented Oct 8, 2023

This PR allows the user to load environment variables from env-file. In particular, the environment variables loaded from env-file will overwrite any existing environment variables, since one of the primary use for this feature will be to override the plugin variables (PLUGIN_*) that is injected by drone.

Example: Dynamically set target to testReport_XXXX, where XXXX is the current date and time.

...

- name: create env
  image: alpine
  commands:
    - echo PLUGIN_TARGET=/testReport_$$(date +"%Y-%m-%dT%H.%m.%S")UTC > target-env

- name: upload
  image: plugins/s3
  settings:
    bucket: BUCKET_NAME
    region: us-east-1
    source: results/**/*
    env-file: ./target-env
  depends_on:
    - create env

#132

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

No branches or pull requests

1 participant