Skip to content

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

@SeJunB

Description

@SeJunB

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions