Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Support environment variable mapping analog to OptionMapper #14

Open
Larusso opened this issue Mar 22, 2022 · 0 comments
Open

Support environment variable mapping analog to OptionMapper #14

Larusso opened this issue Mar 22, 2022 · 0 comments
Assignees

Comments

@Larusso
Copy link
Member

Larusso commented Mar 22, 2022

Description

For some cli tools we want to wrap it is sometimes neccesary or better to provide certain values with the environment.
We have a great system to declare and map gradle task properties to cli options. There is no way of doing the same for environment variables. I suggest to add this functionality anolog to how OptionMapper works so one can delclare custom mappings from task properties to specific environment variable names.

Larusso added a commit to wooga/atlas-snyk that referenced this issue Mar 22, 2022
Description
===========

During testing I saw that snyk monitor only works by coincidence since
we ask for the same environment property name `SNYK_TOKEN` as a convention
to set the `token` property. The token property is actually not needed
as a common or base property since only commands whi interact with snyk backend
need a token to authenticate. I left it in `SnykTaskSpec` for the moment since
we lack a generic way to describe custom environment variables from properties
similar to commandline arguments. A feature request is filed for [wooga/gradle-commons#14].

I did a very minimalistic implemenation to make sure that the token value is passed
as environment variable to `snyk` cli.

Changes
=======

* ![FIX] `snyk` token handling

[wooga/gradle-commons#14]: wooga/gradle-commons#14
Larusso added a commit to wooga/atlas-snyk that referenced this issue Mar 22, 2022
Description
===========

During testing I saw that snyk monitor only works by coincidence since
we ask for the same environment property name `SNYK_TOKEN` as a convention
to set the `token` property. The token property is actually not needed
as a common or base property since only commands whi interact with snyk backend
need a token to authenticate. I left it in `SnykTaskSpec` for the moment since
we lack a generic way to describe custom environment variables from properties
similar to commandline arguments. A feature request is filed for [wooga/gradle-commons#14].

I did a very minimalistic implemenation to make sure that the token value is passed
as environment variable to `snyk` cli.

Changes
=======

* ![FIX] `snyk` token handling

[wooga/gradle-commons#14]: wooga/gradle-commons#14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants