mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 10:07:12 +00:00
tests: explicitly cache cloud-init files
We were not building or caching the .seed.iso target, causing make to re-create the image, as seen in the make --debug --dry-run output: ``` Updating goal targets.... File ubuntu-cloud-24.04.user-data does not exist. Must remake target ubuntu-cloud-24.04.user-data. echo "${USER_DATA}" | tee ubuntu-cloud-24.04.user-data Successfully remade target file ubuntu-cloud-24.04.user-data. File ubuntu-cloud-24.04.meta-data does not exist. Must remake target ubuntu-cloud-24.04.meta-data. echo "${META_DATA}" | tee ubuntu-cloud-24.04.meta-data Successfully remade target file ubuntu-cloud-24.04.meta-data. Prerequisite ubuntu-cloud-24.04.user-data is newer than target ubuntu-cloud-24.04.seed.iso. Prerequisite ubuntu-cloud-24.04.meta-data is newer than target ubuntu-cloud-24.04.seed.iso. Must remake target ubuntu-cloud-24.04.seed.iso. /usr/bin/genisoimage \ -input-charset utf-8 \ -output ubuntu-cloud-24.04.seed.iso \ -volid CIDATA \ -joliet \ -rock \ -graft-points \ user-data=ubuntu-cloud-24.04.user-data \ meta-data=ubuntu-cloud-24.04.meta-data Successfully remade target file ubuntu-cloud-24.04.seed.iso. Prerequisite ubuntu-cloud-24.04.seed.iso is newer than target ubuntu-cloud-24.04.x86_64.qcow2. ``` Build and cache the cloud-init seed iso to prevent that. Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
This commit is contained in:
parent
b3ce87af23
commit
4cfeb4a9ad
@ -203,12 +203,12 @@ coverity:
|
|||||||
# when files are not cached correctly by the runner, causing the build section
|
# when files are not cached correctly by the runner, causing the build section
|
||||||
# below to always do hevy-duty work.
|
# below to always do hevy-duty work.
|
||||||
- printf '\e[0K%s:%s:%s[collapsed=true]\r\e[0K%s\n' section_start "$(date +%s)" prepare_image_dry_run "Prepare image (dry run)"
|
- printf '\e[0K%s:%s:%s[collapsed=true]\r\e[0K%s\n' section_start "$(date +%s)" prepare_image_dry_run "Prepare image (dry run)"
|
||||||
- image-garden make --dry-run --debug "$GARDEN_SYSTEM.$ARCH.run"
|
- image-garden make --dry-run --debug "$GARDEN_SYSTEM.$ARCH.run" "$GARDEN_SYSTEM.$ARCH.qcow2" "$GARDEN_SYSTEM.seed.iso" "$GARDEN_SYSTEM.user-data" "$GARDEN_SYSTEM.meta-data"
|
||||||
- printf '\e[0K%s:%s:%s\r\e[0K\n' section_end "$(date +%s)" prepare_image_dry_run
|
- printf '\e[0K%s:%s:%s\r\e[0K\n' section_end "$(date +%s)" prepare_image_dry_run
|
||||||
script:
|
script:
|
||||||
# Prepare the image, for real.
|
# Prepare the image, for real.
|
||||||
- printf '\e[0K%s:%s:%s[collapsed=true]\r\e[0K%s\n' section_start "$(date +%s)" prepare_image "Prepare image"
|
- printf '\e[0K%s:%s:%s[collapsed=true]\r\e[0K%s\n' section_start "$(date +%s)" prepare_image "Prepare image"
|
||||||
- image-garden make "$GARDEN_SYSTEM.$ARCH.run"
|
- image-garden make "$GARDEN_SYSTEM.$ARCH.run" "$GARDEN_SYSTEM.$ARCH.qcow2" "$GARDEN_SYSTEM.seed.iso" "$GARDEN_SYSTEM.user-data" "$GARDEN_SYSTEM.meta-data"
|
||||||
- printf '\e[0K%s:%s:%s\r\e[0K\n' section_end "$(date +%s)" prepare_image
|
- printf '\e[0K%s:%s:%s\r\e[0K\n' section_end "$(date +%s)" prepare_image
|
||||||
cache:
|
cache:
|
||||||
# Cache the base image (pre-customization).
|
# Cache the base image (pre-customization).
|
||||||
@ -230,6 +230,9 @@ coverity:
|
|||||||
when: always
|
when: always
|
||||||
paths:
|
paths:
|
||||||
- $GARDEN_SYSTEM.*
|
- $GARDEN_SYSTEM.*
|
||||||
|
- $GARDEN_SYSTEM.seed.iso
|
||||||
|
- $GARDEN_SYSTEM.meta-data
|
||||||
|
- $GARDEN_SYSTEM.user-data
|
||||||
|
|
||||||
# This job builds and caches the image that the job below looks at.
|
# This job builds and caches the image that the job below looks at.
|
||||||
image-ubuntu-cloud-24.04-x86_64:
|
image-ubuntu-cloud-24.04-x86_64:
|
||||||
@ -244,6 +247,7 @@ image-ubuntu-cloud-24.04-x86_64:
|
|||||||
changes:
|
changes:
|
||||||
paths:
|
paths:
|
||||||
- .image-garden.mk
|
- .image-garden.mk
|
||||||
|
- .gitlab-ci.yml
|
||||||
compare_to: "refs/heads/master"
|
compare_to: "refs/heads/master"
|
||||||
|
|
||||||
.spread-x86_64:
|
.spread-x86_64:
|
||||||
@ -265,7 +269,7 @@ image-ubuntu-cloud-24.04-x86_64:
|
|||||||
# when files are not cached correctly by the runner, causing the build section
|
# when files are not cached correctly by the runner, causing the build section
|
||||||
# below to always do hevy-duty work.
|
# below to always do hevy-duty work.
|
||||||
- printf '\e[0K%s:%s:%s[collapsed=true]\r\e[0K%s\n' section_start "$(date +%s)" prepare_image_dry_run "Prepare image (dry run)"
|
- printf '\e[0K%s:%s:%s[collapsed=true]\r\e[0K%s\n' section_start "$(date +%s)" prepare_image_dry_run "Prepare image (dry run)"
|
||||||
- image-garden make --dry-run --debug "$GARDEN_SYSTEM.$ARCH.run"
|
- image-garden make --dry-run --debug "$GARDEN_SYSTEM.$ARCH.run" "$GARDEN_SYSTEM.$ARCH.qcow2" "$GARDEN_SYSTEM.seed.iso" "$GARDEN_SYSTEM.user-data" "$GARDEN_SYSTEM.meta-data"
|
||||||
- printf '\e[0K%s:%s:%s\r\e[0K\n' section_end "$(date +%s)" prepare_image_dry_run
|
- printf '\e[0K%s:%s:%s\r\e[0K\n' section_end "$(date +%s)" prepare_image_dry_run
|
||||||
# Install the selected revision of spread.
|
# Install the selected revision of spread.
|
||||||
- printf '\e[0K%s:%s:%s[collapsed=true]\r\e[0K%s\n' section_start "$(date +%s)" install_spread "Installing spread..."
|
- printf '\e[0K%s:%s:%s[collapsed=true]\r\e[0K%s\n' section_start "$(date +%s)" install_spread "Installing spread..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user