diff --git a/apertis-image-sdk.yaml b/apertis-image-sdk.yaml index 411826520fadf7227e65b7757ef607498f90d6b5..9c96fd4b37f712af7fe3594d6895917c63dbad11 100644 --- a/apertis-image-sdk.yaml +++ b/apertis-image-sdk.yaml @@ -14,14 +14,18 @@ {{ $sampleappscheckout := or .sampleappscheckout "disabled" }} {{ $devrootpack := or .devrootpack "disabled" }} +{{- $unpack := or .unpack "true" }} + architecture: {{ $architecture }} actions: +{{- if eq $unpack "true" }} - action: unpack description: Unpack {{ $ospack }} compression: gz file: {{ $ospack }}.tar.gz +{{- end }} # Add multimedia demo pack # Provide URL via '-t demopack:"https://images.apertis.org/media/multimedia-demo.tar.gz"' diff --git a/apertis-image-uboot.yaml b/apertis-image-uboot.yaml index 3ddfdbcac6fac6d17b7cc5eb6b0419abe63b5c86..1b1a8fb27c7251f4518b9a18a1d89d24cd242bdb 100644 --- a/apertis-image-uboot.yaml +++ b/apertis-image-uboot.yaml @@ -13,13 +13,17 @@ {{ $demopack := "disabled" }} {{ end }} +{{- $unpack := or .unpack "true" }} + architecture: {{ $architecture }} actions: +{{- if eq $unpack "true" }} - action: unpack description: Unpack {{ $ospack }} compression: gz file: {{ $ospack }}.tar.gz +{{- end }} # Add multimedia demo pack # Provide URL via '-t demopack:"https://images.apertis.org/media/multimedia-demo.tar.gz"' diff --git a/apertis-image-uefi.yaml b/apertis-image-uefi.yaml index 1f0c48740b3acffbb4a6b104ab119e0e0e3ab871..d6c5189c514d55d7ee33e9ee347729a9fca0392b 100644 --- a/apertis-image-uefi.yaml +++ b/apertis-image-uefi.yaml @@ -13,13 +13,17 @@ {{ $demopack := "disabled" }} {{ end }} +{{- $unpack := or .unpack "true" }} + architecture: {{ $architecture }} actions: +{{- if eq $unpack "true" }} - action: unpack description: Unpack {{ $ospack }} compression: gz file: {{ $ospack }}.tar.gz +{{- end }} # Add multimedia demo pack # Provide URL via '-t demopack:"https://images.apertis.org/media/multimedia-demo.tar.gz"' diff --git a/apertis-ospack-basesdk.yaml b/apertis-ospack-basesdk.yaml index 1279027844764ef26c8dbfb1c1c48c3fdb624154..5f00902ae7bf9ba84161956dba41b3cf08f97a3e 100644 --- a/apertis-ospack-basesdk.yaml +++ b/apertis-ospack-basesdk.yaml @@ -4,6 +4,7 @@ {{- $suite := or .suite "v2019dev0" -}} {{- $timestamp := or .timestamp "" -}} {{- $ospack := or .ospack (printf "ospack_%s-%s-%s" $suite $architecture $type) -}} +{{- $pack := or .pack "true" -}} architecture: {{ $architecture }} @@ -557,6 +558,7 @@ actions: description: "Drop resolv.conf so the appropriate one gets created at runtime" command: rm "${ROOTDIR}/etc/resolv.conf" +{{- if eq $pack "true" }} - action: run description: "Save installed package status" chroot: false @@ -570,3 +572,4 @@ actions: - action: pack compression: gz file: {{ $ospack }}.tar.gz +{{- end }} diff --git a/apertis-ospack-minimal.yaml b/apertis-ospack-minimal.yaml index ba947f4e96d14800514bf04cff21144aa1153a36..2e503d49077002e154c2b5803489f93a60b35568 100644 --- a/apertis-ospack-minimal.yaml +++ b/apertis-ospack-minimal.yaml @@ -5,6 +5,7 @@ {{- $timestamp := or .timestamp "" -}} {{- $ospack := or .ospack (printf "ospack_%s-%s-%s" $suite $architecture $type) -}} {{- $lxc := or .lxc "enabled" -}} +{{- $pack := or .pack "true" -}} architecture: {{ $architecture }} @@ -174,6 +175,7 @@ actions: description: "Drop resolv.conf so the appropriate one gets created at runtime" command: rm "${ROOTDIR}/etc/resolv.conf" +{{- if eq $pack "true" }} - action: run description: "Save installed package status" chroot: false @@ -187,3 +189,4 @@ actions: - action: pack compression: gz file: {{ $ospack }}.tar.gz +{{- end }} diff --git a/apertis-ospack-sdk.yaml b/apertis-ospack-sdk.yaml index f693cd1c56bc05f0830096cbe8f477a21ffda160..cda451ddf78c279a7c3f1975cfd5cbae87ae5d63 100644 --- a/apertis-ospack-sdk.yaml +++ b/apertis-ospack-sdk.yaml @@ -5,6 +5,7 @@ {{- $timestamp := or .timestamp "" -}} {{- $ospack := or .ospack (printf "ospack_%s-%s-%s" $suite $architecture $type) -}} {{- $lxc := or .lxc "enabled" -}} +{{- $pack := or .pack "true" }} architecture: {{ $architecture }} @@ -759,6 +760,7 @@ actions: description: "Drop resolv.conf so the appropriate one gets created at runtime" command: rm "${ROOTDIR}/etc/resolv.conf" +{{- if eq $pack "true" }} - action: run description: "Save installed package status" chroot: false @@ -772,3 +774,4 @@ actions: - action: pack compression: gz file: {{ $ospack }}.tar.gz +{{- end }} diff --git a/apertis-ospack-target.yaml b/apertis-ospack-target.yaml index 90e658541875b40a494a2988d039f6153fe8a5c0..468965e398a8d20d7a9b708ab60c1d31f88a7a48 100644 --- a/apertis-ospack-target.yaml +++ b/apertis-ospack-target.yaml @@ -6,6 +6,7 @@ {{- $ospack := or .ospack (printf "ospack_%s-%s-%s" $suite $architecture $type) -}} {{- $ivitools := or .ivitools "enabled" -}} {{- $lxc := or .lxc "disabled" -}} +{{- $pack := or .pack "true" -}} architecture: {{ $architecture }} @@ -283,6 +284,7 @@ actions: description: "Drop resolv.conf so the appropriate one gets created at runtime" command: rm "${ROOTDIR}/etc/resolv.conf" +{{- if eq $pack "true" }} - action: run description: "Save installed package status" chroot: false @@ -296,3 +298,4 @@ actions: - action: pack compression: gz file: {{ $ospack }}.tar.gz +{{- end }} diff --git a/apertis-ostree-commit.yaml b/apertis-ostree-commit.yaml index 473f8711d636a0341ff8f3b03e54faa26a89cf26..341882c72e7aff329fb48fadf8e2368d4c201d1d 100644 --- a/apertis-ostree-commit.yaml +++ b/apertis-ostree-commit.yaml @@ -9,12 +9,15 @@ {{ $image := or .image (printf "apertis-ostree-%s-%s-%s" $suite $type $architecture) }} {{ $ostree := or .ostree "repo" }} {{ $message := or .message "Update" }} +{{- $unpack := or .unpack "true" }} architecture: {{ $architecture }} actions: +{{- if eq $unpack "true" }} - action: unpack file: {{ $ospack }}.tar.gz +{{- end }} - action: overlay description: "Install ostree feature" diff --git a/apertis-sample-image-development.yaml b/apertis-sample-image-development.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f8524d20d4af7ce12c1414a1636626dea74d6d6e --- /dev/null +++ b/apertis-sample-image-development.yaml @@ -0,0 +1,31 @@ +{{- $architecture := "armhf" }} +{{- $type := "minimal" }} +{{- $mirror := "https://repositories.apertis.org/apertis/" }} +{{- $suite := "v2019dev0" }} +{{- $timestamp := "00000000.0" }} +{{- $image := (printf "apertis-sample-development-%s-%s-%s_%s" $suite $type $architecture $timestamp) }} + +architecture: {{ $architecture }} + +actions: + - action: recipe + description: Create ospack for {{ $suite }} {{ $type }} {{ $architecture }} + recipe: apertis-ospack-{{ $type }}.yaml + variables: + type: {{ $type }} + mirror: {{ $mirror }} + suite: {{ $suite }} + timestamp: {{ $timestamp }} + pack: false + + # Package up everything in a image + - action: recipe + description: Create image {{ $image }} for {{ $suite }} {{ $type }} {{ $architecture }} + recipe: apertis-image-uboot.yaml + variables: + type: {{ $type }} + mirror: {{ $mirror }} + suite: {{ $suite }} + timestamp: {{ $timestamp }} + image: {{ $image }} + unpack: false diff --git a/apertis-sample-image-production.yaml b/apertis-sample-image-production.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1b6dc1341a31616ee5255bed6b525a0d511f8830 --- /dev/null +++ b/apertis-sample-image-production.yaml @@ -0,0 +1,64 @@ +{{- $architecture := "armhf" }} +{{- $type := "minimal" }} +{{- $mirror := "https://repositories.apertis.org/apertis/" }} +{{- $suite := "v2019dev0" }} +{{- $timestamp := "00000000.0" }} +{{- $image := (printf "apertis-sample-production-%s-%s-%s_%s" $suite $type $architecture $timestamp) }} + +{{ $board := "uboot" }} +{{ $osname := "apertis" }} +{{ $branch := (printf "%s/%s/%s-%s/%s" $osname $suite $architecture $board $type) }} +{{ $ostree := "repo" }} +{{ $repourl := (printf "${ARTIFACTDIR}/%s" $ostree) }} + +architecture: {{ $architecture }} + +actions: + - action: run + description: Create local OSTree repository + chroot: false + command: ostree init --mode archive --repo=${ARTIFACTDIR}/{{ $ostree }} + + # Create base rootfs + - action: recipe + description: Create ospack for {{ $suite }} {{ $type }} {{ $architecture }} + recipe: apertis-ospack-{{ $type }}.yaml + variables: + type: {{ $type }} + mirror: {{ $mirror }} + suite: {{ $suite }} + timestamp: {{ $timestamp }} + pack: false + + # Adapt and commit OSTree based on rootfs created during previous action + - action: recipe + description: OSTree commit for {{ $suite }} {{ $type }} {{ $architecture }} + recipe: apertis-ostree-commit.yaml + variables: + type: {{ $type }} + suite: {{ $suite }} + timestamp: {{ $timestamp }} + board: {{ $board }} + branch: {{ $branch }} + image: {{ $image }} + ostree: {{ $ostree }} + unpack: false + + # Reset the rootfs to allow to deploy OSTree from a clean rootfs + - action: run + description: Reset rootfs before deploying OSTree + chroot: false + command: find ${ROOTDIR} -maxdepth 1 -mindepth 1 -exec rm -rf {} \; + + # Package up everything in a image + - action: recipe + description: Create image {{ $image }} for {{ $suite }} {{ $type }} {{ $architecture }} + recipe: apertis-ostree-image-uboot.yaml + variables: + type: {{ $type }} + suite: {{ $suite }} + image: {{ $image }} + board: {{ $board }} + repourl: {{ $repourl }} + branch: {{ $branch }} + ostree: {{ $ostree }} diff --git a/apertis-sample-image-sdk.yaml b/apertis-sample-image-sdk.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c65fd4272871a62da2906aba9aba142b51a0e82d --- /dev/null +++ b/apertis-sample-image-sdk.yaml @@ -0,0 +1,35 @@ +{{- $architecture := "amd64" }} +{{- $type := "basesdk" }} +{{- $mirror := "https://repositories.apertis.org/apertis/" }} +{{- $suite := "v2019dev0" }} +{{- $timestamp := "00000000.0" }} +{{- $image := (printf "apertis-sample-sdk-%s-%s-%s_%s" $suite $type $architecture $timestamp) }} + +{{- $devrootpack := or .devrootpack "disabled" }} + +architecture: {{ $architecture }} + +actions: + # Create base rootfs for the Base SDK + - action: recipe + description: Create ospack for {{ $suite }} {{ $type }} {{ $architecture }} + recipe: apertis-ospack-{{ $type }}.yaml + variables: + type: {{ $type }} + mirror: {{ $mirror }} + suite: {{ $suite }} + timestamp: {{ $timestamp }} + pack: false + + # Package up everything in a image for VirtualBox + - action: recipe + description: Create image {{ $image }} for {{ $suite }} {{ $type }} {{ $architecture }} + recipe: apertis-image-sdk.yaml + variables: + type: {{ $type }} + mirror: {{ $mirror }} + suite: {{ $suite }} + timestamp: {{ $timestamp }} + image: {{ $image }} + devrootpack: {{ $devrootpack }} + unpack: false