-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prioritize the command line argument `--use-lxd` over the environment variable `SNAPCRAFT_BUILD_ENVIRONMENT=host`. Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
- Loading branch information
Showing
3 changed files
with
172 additions
and
11 deletions.
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
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,29 @@ | ||
summary: Test --use-lxd takes priority over environment variables | ||
systems: | ||
- ubuntu-22.04* | ||
|
||
prepare: | | ||
snapcraft init | ||
restore: | | ||
rm -rf ./*.snap | ||
execute: | | ||
export SNAPCRAFT_BUILD_ENVIRONMENT="host" | ||
snapcraft pull --use-lxd | ||
if [[ -d parts ]]; then | ||
echo "snapcraft did not run inside a lxd instance" | ||
exit 1 | ||
fi | ||
unset SNAPCRAFT_BUILD_ENVIRONMENT | ||
export SNAPCRAFT_MANAGED_MODE=1 | ||
snapcraft pull --use-lxd | ||
if [[ -d parts ]]; then | ||
echo "snapcraft did not run inside a lxd instance" | ||
exit 1 | ||
fi |
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