Set default parameters and secrets for Software Templates
Use the Scaffolder defaultEnvironment configuration to provide default parameters and secrets to Software Templates. Centralizing these values reduces template complexity and prevents individual templates from duplicating common configuration.
- Example of an
app-config.yamlconfigured for default parameters and secrets -
scaffolder: defaultEnvironment: parameters: githubOrg: my-org defaultOwner: platform-team secrets: GITHUB_TOKEN: ${GITHUB_TOKEN}
Default parameters are isolated in their own context to avoid naming conflicts.
Default parameters are accessible through ${{ environment.parameters.* }} in templates.
- Example of default parameters configuration for application deployment
-
spec: parameters: - title: Project details required: - name properties: name: title: Name type: string description: Unique name for the new repository. steps: - id: fetch-base name: Fetch skeleton action: fetch:template input: url: ./skeleton values: name: ${{ parameters.name }} # Resolves to frontend input value owner: ${{ environment.parameters.defaultOwner }} # Resolves to defaultEnvironment.parameters.defaultOwner
Default secrets are resolved from environment variables and accessible via ${{ environment.secrets.* }} in template actions.
- Example of a default secret configuration
-
spec: parameters: - title: Project details required: - name properties: name: title: Name type: string description: Unique name for the new repository. steps: - id: publish name: Publish to GitHub action: publish:github input: allowedHosts: ['github.com'] description: ${{ parameters.name }} repoUrl: github.com?owner=${{ environment.parameters.githubOrg }}&repo=${{ parameters.name }} token: ${{ environment.secrets.GITHUB_TOKEN }} # Resolves to defaultEnvironment.secrets.GITHUB_TOKEN
Secrets are automatically masked in logs and are available only to backend actions. They are not exposed to the frontend.