generated from canonical/starbase
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: render build secrets in the Application
This feature is gated behind a feature flag so the concrete applications must set `enable_build_secrets` to True. When this is done, during the loading of the project the application will also render the HOST_SECRET directives. This is currently only supported in destructive mode.
- Loading branch information
Showing
5 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
tests/integration/data/build-secrets/secret-source-folder/source-file.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
A source file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: build-secrets | ||
description: A project with build-time secrets | ||
version: git | ||
base: ["ubuntu", "22.04"] | ||
|
||
parts: | ||
my-part: | ||
plugin: dump | ||
source: $(HOST_SECRET:echo ${HOST_SOURCE_FOLDER})-folder | ||
build-environment: | ||
- SECRET_VAR: $(HOST_SECRET:echo ${HOST_SECRET_VAR}) | ||
override-build: | | ||
craftctl default | ||
echo "Dumping SECRET_VAR: ${SECRET_VAR}" | ||
echo ${SECRET_VAR} >> ${CRAFT_PART_INSTALL}/build-file.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters