Skip to content
No description, website, or topics provided.
Python Gherkin Dockerfile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dpm supporting json structures for properties and secrets. Mar 25, 2020
.gitignore Including requirements.txt Feb 28, 2020
.pre-commit-config.yaml adding initial code structure. Feb 18, 2020
.secrets.baseline adding initial code structure. Feb 18, 2020
.travis.yml Travis CI Implementation Mar 16, 2020
Dockerfile
Pipfile For Adam Mar 20, 2020
README.md
requirements.txt removing specific requirement for packaging Mar 27, 2020
setup.py bypassing Pipfile for builds for now Mar 20, 2020

README.md

How to install

For pipenv

[packages]
dynamic-property-management-module = { version = "*", git = "https://github.com/mozilla-it/dynamic-property-management-module.git", ref = "master"}

Must be set

These environmental variables must be set.

  • GOOGLE_APPLICATION_CREDENTIALS
  • GCP_PROJECT

Example Usage

**[Initialization should only happen once. The polling 
values will determine if additional polls will be performed.]**
Env.initialize(
               dpm_service_name = <service name/>, 
               dpm_program_name = <program_name/>,
               dpm_polling_interval = <dpm_polling_interval/>,
               secrets_name = <secrets_name/>, 
               secrets_polling_interval = <secrets_polling_interval/>,
               project = <project/>
              )

**[Pulling Properties]**
property_value = Env.get_property(<property_name/>)

**[Pulling Secrets]**
secret_value = Env.get_secret(<secret_name/>)
>>> from dpm.api import Env
>>> Env.initialize("LOOK AT THE EXAMPLE ABOVE")
>>> Env.get_property("property_key")
'property_value'
>>> Env.get_secret("secret_key")
'secret_value'

How to Add a Properties and Secrets

To add properties there is a specific naming convention for the properties blob in secret manager:

dpm-<the name of the service/>-<the name of the program/>-config
Example:
dpm-integrations-intacct-config

Managing Properties and Secrets

In order to create/delete/update/read properties or secrets go here: https://github.com/mozilla-it/cloudsecrets

You'll have to follow the instructions on how to install and use the CLI tool.

You can’t perform that action at this time.