On Thu, Nov 19, 2020 at 08:47:14AM +0800, Yu Chuan wrote:
[Why] We can only generate the rootfs of dailybuild, so decouple the code related to dailybuild.
[How] Use 'iso_url_file' as a switch.
- If this field is specified, so generate the rootfs of dailybuild;
- If not, generate the rootfs of the official iso of the target version.
Signed-off-by: Yu Chuan 13186087857@163.com
jobs/iso2rootfs.yaml | 4 +++- tests/iso2rootfs | 24 +++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/jobs/iso2rootfs.yaml b/jobs/iso2rootfs.yaml index d4f0ffc0e80c..4e8729997a00 100644 --- a/jobs/iso2rootfs.yaml +++ b/jobs/iso2rootfs.yaml @@ -2,7 +2,6 @@ suite: iso2rootfs category: benchmark iso2rootfs: iso2rootfs_cgz:
- iso_url_file: iso_os: iso_arch: iso_version:
@@ -12,6 +11,9 @@ iso2rootfs: initrd_http_host: initrd_http_port:
- # dailybuild related fields
- iso_url_file:
- # submit test yaml related fields test_yaml: test_os:
diff --git a/tests/iso2rootfs b/tests/iso2rootfs index 9c71b8427d90..d42c38909f68 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -44,7 +44,6 @@ check_yaml_vars() "os_arch" "os_version" "iso2rootfs_cgz"
"iso_os" "iso_arch" "iso_version""iso_url_file"
@@ -149,8 +148,6 @@ mount_rootfs()
get_cache_iso_checksum() {
- mount_rootfs
- CHECKSUM_FILE_CACHE="${ROOTFS_LOCAL_PATH}/${iso_version}-latest.sha256sum" [ ! -f "${CHECKSUM_FILE_CACHE}" ] || SHA256SUM_CACHE=$(awk '{print $1}' "$CHECKSUM_FILE_CACHE")
@@ -243,7 +240,10 @@ config_iso2rootfs() pre_works() { check_yaml_vars
- check_sha256sum_update
- mount_rootfs
- [ -n "${iso_url_file}" ] && check_sha256sum_update
Here iso_url_file is not obviously related to dailybuild scene, so can: iso_url_file => dailybuild_iso_url_file
Thanks, Xijian