-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
environment: error when build-for arch variable cannot be evaluated (#…
…4332) For core20 snaps, if the project variable `SNAPCRAFT_ARCH_BUILD_FOR` or `SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR` cannot be determined and is used in a snapcraft.yaml file, then an error is raised. Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
- Loading branch information
Showing
20 changed files
with
327 additions
and
34 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
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
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
18 changes: 18 additions & 0 deletions
18
...ead/cross-compile/environment-errors/snaps/build-for-multi-arch-error/snap/snapcraft.yaml
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,18 @@ | ||
name: build-for-multi-arch-error | ||
base: core20 | ||
version: '1.0' | ||
summary: test | ||
description: Using SNAPCRAFT_ARCH_BUILD_FOR should raise an error for multi-arch builds. | ||
grade: stable | ||
confinement: strict | ||
|
||
architectures: | ||
- build-on: amd64 | ||
run-on: [amd64, armhf] | ||
|
||
environment: | ||
SNAPCRAFT_ARCH_BUILD_FOR: ${SNAPCRAFT_ARCH_BUILD_FOR} | ||
|
||
parts: | ||
my-part: | ||
plugin: nil |
18 changes: 18 additions & 0 deletions
18
...s-compile/environment-errors/snaps/build-for-multi-arch-triplet-error/snap/snapcraft.yaml
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,18 @@ | ||
name: build-for-multi-arch-triplet-error | ||
base: core20 | ||
version: '1.0' | ||
summary: test | ||
description: Using SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR should raise an error for multi-arch builds. | ||
grade: stable | ||
confinement: strict | ||
|
||
architectures: | ||
- build-on: amd64 | ||
run-on: [amd64, armhf] | ||
|
||
environment: | ||
SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR: ${SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR} | ||
|
||
parts: | ||
my-part: | ||
plugin: nil |
17 changes: 17 additions & 0 deletions
17
tests/spread/cross-compile/environment-errors/snaps/build-for-part-error/snap/snapcraft.yaml
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,17 @@ | ||
name: build-for-part-error | ||
base: core20 | ||
version: '1.0' | ||
summary: test | ||
description: Using SNAPCRAFT_ARCH_BUILD_FOR inside a part definition should raise an error if the arch cannot be determined. | ||
grade: stable | ||
confinement: strict | ||
|
||
architectures: | ||
- build-on: amd64 | ||
run-on: [amd64, armhf] | ||
|
||
parts: | ||
my-part: | ||
plugin: nil | ||
override-pull: | ||
echo ${SNAPCRAFT_ARCH_BUILD_FOR} |
17 changes: 17 additions & 0 deletions
17
...d/cross-compile/environment-errors/snaps/build-for-part-triplet-error/snap/snapcraft.yaml
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,17 @@ | ||
name: build-for-part-triplet-error | ||
base: core20 | ||
version: '1.0' | ||
summary: test | ||
description: Using SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR inside a part definition should raise an error if the arch cannot be determined. | ||
grade: stable | ||
confinement: strict | ||
|
||
architectures: | ||
- build-on: amd64 | ||
run-on: [amd64, armhf] | ||
|
||
parts: | ||
my-part: | ||
plugin: nil | ||
override-pull: | ||
echo ${SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR} |
18 changes: 18 additions & 0 deletions
18
...d/cross-compile/environment-errors/snaps/build-for-unknown-arch-error/snap/snapcraft.yaml
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,18 @@ | ||
name: build-for-unknown-arch-error | ||
base: core20 | ||
version: '1.0' | ||
summary: test | ||
description: Using SNAPCRAFT_ARCH_BUILD_FOR should raise an error when the build-for arch is unknown. | ||
grade: stable | ||
confinement: strict | ||
|
||
architectures: | ||
- build-on: amd64 | ||
run-on: badvalue | ||
|
||
environment: | ||
SNAPCRAFT_ARCH_BUILD_FOR: ${SNAPCRAFT_ARCH_BUILD_FOR} | ||
|
||
parts: | ||
my-part: | ||
plugin: nil |
18 changes: 18 additions & 0 deletions
18
...compile/environment-errors/snaps/build-for-unknown-arch-triplet-error/snap/snapcraft.yaml
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,18 @@ | ||
name: build-for-unknown-arch-triplet-error | ||
base: core20 | ||
version: '1.0' | ||
summary: test | ||
description: Using SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR should raise an error when the build-for arch is unknown. | ||
grade: stable | ||
confinement: strict | ||
|
||
architectures: | ||
- build-on: amd64 | ||
run-on: badvalue | ||
|
||
environment: | ||
SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR: ${SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR} | ||
|
||
parts: | ||
my-part: | ||
plugin: nil |
Oops, something went wrong.