...
Properties can be used to set flags and values that should change when building on a different machine. This allows local builds to interact with separate databases, worker queues, etc. from production and staging builds. This can also make local builds more lightweight (by setting certain features to only enable in production). Secrets provide similar benefits, but additionally restrict access to critical information such as credentials.
...
Accessing a default value to a property or secret via the Stack Configuration
The easiest way to set the default value of a property or secret is to add it to the stack.properties file.
...
If you want to be able to override a property or secret from the command line (for example, to load properties in a remote build), then you have to modify the integration-tests/pom.xml file
Under the org.codehaus.cargo plugin, you must add a tag of the following form (these tags should already exist and you should merely have to add the leaf tag with your property name):
Code Block | ||||
---|---|---|---|---|
| ||||
<configuration> <!-- Container configuration --> <container> <systemProperties> <org.sagebionetworks.my.property.name>${org.sagebionetworks.my.property.name}</org.sagebionetworks.my.property.name> </systemProperties> </container> <configuration> |
...
Code Block | ||||
---|---|---|---|---|
| ||||
export user=pUser export org_sagebionetworks_stack_iam_id=<id> export org_sagebionetworks_stack_iam_key=<key> export org_sagebionetworks_stackEncryptionKey=<key> export rds_password=<pwd> export github_token=<token> export org_sagebionetworks_my_property_name=myValueForAutomatedBuilds # other properties may be listed... /var/lib/jenkins/workspace/${JOB_NAME}/jenkins_build.sh |
Hierarchy of Properties and Secrets
In progress
Using the stack builder to override properties in prod
...
Page Properties | ||
---|---|---|
| ||
|
...