Simple command-line application to get properties from ConfigMaps and Secrets
- Run without need to install dart (compiled files)
- Cross platform
To run this project, you will need to add the following environment variables to your .env file
GIT_REPO_PATH Required. Selected folder or url that contain config files
GIT_BRANCH Optional. By default is the current branch
GIT_SSL_ENABLED Optional. If the SSL verification can be enabled. By default is true
GIT_FORCE_REMOTE Optional. If you need to get the last remote version. By default is false
CONFIG_MAPS_PATH Optional. The subfolder where the configMap files are saved. By default is 'configMap'
SECRETS_PATH Optional. The subfolder where the secret files are saved. By default is 'secret'
MAX_DURATION_IN_MIN Optional. The max duration for fetch get last remote version. By default is 2
Before to run this app requires the following
- Clone the project
git clone https://github.com/jsilverdev/config_props_extractor.git- Go to the project directory
cd config_props_extractor- Create .env from the .env.example
cp .env.example .env- Define the
GIT_REPO_PATHin the .env file
GIT_REPO_PATH="path/to/config_folder_path"- Install dependencies (if you don´t have dart go to the Run binaries section)
dart pub get- Start the cli app
dart run bin/main.dartYou can download the binaries on the releases section.
Or git checkout to a desired tag (for example v1.4.1):
git checkout tags/v1.4.1And then run the binary for your platform
.\run-win.exe
./run-macos
./run-linuxTo run tests, run the following command
dart testIf you want run tests with coverage, install coverage globally
dart pub global activate coverageThen run
dart pub global run coverage:test_with_coverage --function-coverage --branch-coverageIf you want to see a way to visualize this in a html page, you can use lcov for Linux or Mac. If you are on Windows, you can use jgenhtml and then run
genhtml -o coverage coverage/lcov.info