Skip to content
The documentation is not yet completly updated for Version 0.4. This will be done within the next few days.

Secrets

In this section it will be explained on how to define secrets.

The following example shows all settings that can be set and which will be explained on this page:

secrets:
ComposerSecret:
missingMessage: Secrets.Missing.Composer
source:
key: auth
group: composer
target:
file: auth.json
expectedSecrets:
- GitLab
- Package Repository
GitlabDockerLoginSecret:
missingMessage: Secrets.Missing.DockerLogin.Gitlab
source:
key: gitlab_docker_login
group: docker
target:
envVar: file
expectedVars:
- DOCKER_USERNAME
- DOCKER_PASSWORD

missingMessage Since v0.3.2

Section titled “missingMessage ”

When the source file could not be found, an error message will be displayed. Insted of the default error message, which is for the most user not really helpful, you can define a more detailed message with instructions what todo when this secret is missing. More defailed explainations can be found under secrets.

The source part defines on where the secret can be obtained from

The key defines from which file the secret will be loaded from. So if the key is auth then webdev will try to look for a file that starts with auth. So valid filenames would be auth.json etc.

The groupd defines the sub folder in which webdev will look for the file defined with source.key

When wedev was able to find the secret, then we define in this part on how to handle this secret. Either file or envVar needs to be defined.

This defines the file in which the secret should be put within your project.

The value is not relevant, if this is present, then the secret file will be read and the env vars will be made vailable in the shell.

target.expectedSecrets Since v0.3.2

Section titled “target.expectedSecrets ”

This only works together with the attribute missingMessage to further provide helpful informations for the user to add the secret. It defines a list of secrets that the file should contain, so that workspace can work correctly. More defailed explainations can be found under secrets.

target.expectedVars Since v0.3.2

Section titled “target.expectedVars ”

This only works together with the attribute missingMessage to further provide helpful informations for the user to add the secret. It defines a list of environment variables that the file should contain, so that workspace can work correctly. More defailed explainations can be found under secrets.