All of lore.kernel.org
 help / color / mirror / Atom feed
* [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system
@ 2022-01-06 11:16 Alice Ferrazzi
  2022-01-06 11:16 ` [isar-cip-core][PATCH 1/4] Add cip-core-image-kernelci Alice Ferrazzi
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Alice Ferrazzi @ 2022-01-06 11:16 UTC (permalink / raw)
  To: cip-dev; +Cc: Alice Ferrazzi

This patch series add a new image with settings for 
KernelCI.

This new image is called cip-core-image-kernelci and is 
based on isar-cip-core general image with some changes 
needed for make it work with KernelCI and taken from
KernelCI image base settings.
The cip-core-image-kernelci images are built by GitlabCI
and uploaded to KernelCI production fileserver.
https://storage.kernelci.org/images/rootfs/cip/

These patches are already integrated in the
isar-cip-core:alicef/kernelci_master_refactor repository branch 
and are generating the images that are currently 
used by KernelCI.

cip-core-image-kernelci as been tested and are
already used in KernelCI production with good results.
https://linux.kernelci.org/test/job/stable-rc/branch/queue%2F5.14/kernel/v5.14.17-9-g9f7eecaa70b3/plan/baseline-cip-nfs/

Alice Ferrazzi (4):
  Add cip-core-image-kernelci
  Add dmesg filter needed for lava test result
  Add script deploy-kernelci.py for upload the cip-core-image-kernelci
  enable cip-core-image-kernelci

 .gitlab-ci.yml                                | 40 +++++++++++++-
 kas/opt/kernelci.yml                          | 16 ++++++
 .../images/cip-core-image-kernelci.bb         | 16 ++++++
 .../files/99-silent-printk.conf               |  1 +
 .../kernelci-customizations/files/dmesg.sh    | 23 ++++++++
 .../kernelci-customizations/files/ethernet    | 23 ++++++++
 .../kernelci-customizations/files/postinst    | 34 ++++++++++++
 .../kernelci-customizations.bb                | 35 ++++++++++++
 scripts/deploy-kernelci.py                    | 55 +++++++++++++++++++
 9 files changed, 242 insertions(+), 1 deletion(-)
 create mode 100644 kas/opt/kernelci.yml
 create mode 100644 recipes-core/images/cip-core-image-kernelci.bb
 create mode 100644 recipes-core/kernelci-customizations/files/99-silent-printk.conf
 create mode 100644 recipes-core/kernelci-customizations/files/dmesg.sh
 create mode 100644 recipes-core/kernelci-customizations/files/ethernet
 create mode 100644 recipes-core/kernelci-customizations/files/postinst
 create mode 100644 recipes-core/kernelci-customizations/kernelci-customizations.bb
 create mode 100755 scripts/deploy-kernelci.py

-- 
2.33.1



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [isar-cip-core][PATCH 1/4] Add cip-core-image-kernelci
  2022-01-06 11:16 [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Alice Ferrazzi
@ 2022-01-06 11:16 ` Alice Ferrazzi
  2022-01-06 14:01   ` Jan Kiszka
  2022-01-06 11:16 ` [isar-cip-core][PATCH 2/4] Add dmesg filter needed for lava test result Alice Ferrazzi
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Alice Ferrazzi @ 2022-01-06 11:16 UTC (permalink / raw)
  To: cip-dev; +Cc: Alice Ferrazzi

This image is currently used by KernelCI production for testing purpose.
The purpose of this image is that KernelCI need to be able to autologin
without password and to detect the login shell using special characters.
Currently added are the default settings used by KernelCI images.

Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
---
 kas/opt/kernelci.yml                          | 16 +++++++++
 .../images/cip-core-image-kernelci.bb         | 16 +++++++++
 .../files/99-silent-printk.conf               |  1 +
 .../kernelci-customizations/files/ethernet    | 23 +++++++++++++
 .../kernelci-customizations/files/postinst    | 34 +++++++++++++++++++
 .../kernelci-customizations.bb                | 34 +++++++++++++++++++
 6 files changed, 124 insertions(+)
 create mode 100644 kas/opt/kernelci.yml
 create mode 100644 recipes-core/images/cip-core-image-kernelci.bb
 create mode 100644 recipes-core/kernelci-customizations/files/99-silent-printk.conf
 create mode 100644 recipes-core/kernelci-customizations/files/ethernet
 create mode 100644 recipes-core/kernelci-customizations/files/postinst
 create mode 100644 recipes-core/kernelci-customizations/kernelci-customizations.bb

diff --git a/kas/opt/kernelci.yml b/kas/opt/kernelci.yml
new file mode 100644
index 0000000..9c67864
--- /dev/null
+++ b/kas/opt/kernelci.yml
@@ -0,0 +1,16 @@
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Toshiba Corporation, 2020
+# Copyright (c) Cybertrust Japan Co., Ltd., 2021
+#
+# Authors:
+#  Venkata Pyla <venkata.pyla@toshiba-tsip.com>
+#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
+#
+# SPDX-License-Identifier: MIT
+#
+header:
+  version: 10
+
+target: cip-core-image-kernelci
diff --git a/recipes-core/images/cip-core-image-kernelci.bb b/recipes-core/images/cip-core-image-kernelci.bb
new file mode 100644
index 0000000..479c14c
--- /dev/null
+++ b/recipes-core/images/cip-core-image-kernelci.bb
@@ -0,0 +1,16 @@
+#
+# A reference image for KernelCI
+#
+# Copyright (c) Cybertrust Japan Co., Ltd., 2021
+#
+# Authors:
+#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+inherit image
+
+DESCRIPTION = "CIP Core image for KernelCI"
+
+IMAGE_INSTALL += "kernelci-customizations"
diff --git a/recipes-core/kernelci-customizations/files/99-silent-printk.conf b/recipes-core/kernelci-customizations/files/99-silent-printk.conf
new file mode 100644
index 0000000..ad24d3a
--- /dev/null
+++ b/recipes-core/kernelci-customizations/files/99-silent-printk.conf
@@ -0,0 +1 @@
+kernel.printk = 3 4 1 3
diff --git a/recipes-core/kernelci-customizations/files/ethernet b/recipes-core/kernelci-customizations/files/ethernet
new file mode 100644
index 0000000..fa47d1a
--- /dev/null
+++ b/recipes-core/kernelci-customizations/files/ethernet
@@ -0,0 +1,23 @@
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Jan Kiszka <jan.kiszka@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+allow-hotplug eth0
+allow-hotplug enp0s2
+allow-hotplug enp2s0
+
+# used on BBB
+iface eth0 inet dhcp
+
+# used on qemu-amd64
+iface enp0s2 inet dhcp
+
+# used on simatic-ipc227e
+iface enp2s0 inet dhcp
diff --git a/recipes-core/kernelci-customizations/files/postinst b/recipes-core/kernelci-customizations/files/postinst
new file mode 100644
index 0000000..7ae30e8
--- /dev/null
+++ b/recipes-core/kernelci-customizations/files/postinst
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2019
+# Copyright (c) Cybertrust Japan Co., Ltd., 2021
+#
+# Authors:
+#  Jan Kiszka <jan.kiszka@siemens.com>
+#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+echo "CIP Core Demo & Test Image" > /etc/issue
+
+# permit root login without password
+echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
+echo "PermitEmptyPasswords yes" >> /etc/ssh/sshd_config
+passwd root -d
+
+# serial getty service for autologin
+mkdir -p /etc/systemd/system/serial-getty@.service.d/
+echo "[Service]" > /etc/systemd/system/serial-getty@.service.d/override.conf
+echo "ExecStart=" >> /etc/systemd/system/serial-getty@.service.d/override.conf
+echo "ExecStart=-/sbin/agetty --autologin root --keep-baud 115200,38400,9600 %I $TERM" >> /etc/systemd/system/serial-getty@.service.d/override.conf
+
+# set the profile for KernelCI
+echo "PS1='\$(pwd) # '" > /root/.profile
+echo "cd /" >> /root/.profile
+
+HOSTNAME=demo
+echo "$HOSTNAME" > /etc/hostname
+echo "127.0.0.1 $HOSTNAME" >> /etc/hosts
diff --git a/recipes-core/kernelci-customizations/kernelci-customizations.bb b/recipes-core/kernelci-customizations/kernelci-customizations.bb
new file mode 100644
index 0000000..dca0891
--- /dev/null
+++ b/recipes-core/kernelci-customizations/kernelci-customizations.bb
@@ -0,0 +1,34 @@
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2019
+# Copyright (c) Cybertrust Japan Co., Ltd., 2021
+#
+# Authors:
+#  Jan Kiszka <jan.kiszka@siemens.com>
+#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+inherit dpkg-raw
+
+DESCRIPTION = "CIP Core image demo & customizations"
+
+SRC_URI = " \
+    file://postinst \
+    file://ethernet \
+    file://99-silent-printk.conf"
+
+DEPENDS += "sshd-regen-keys"
+
+DEBIAN_DEPENDS = " \
+    ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys"
+
+do_install() {
+  install -v -d ${D}/etc/network/interfaces.d
+  install -v -m 644 ${WORKDIR}/ethernet ${D}/etc/network/interfaces.d/
+
+  install -v -d ${D}/etc/sysctl.d
+  install -v -m 644 ${WORKDIR}/99-silent-printk.conf ${D}/etc/sysctl.d/
+}
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [isar-cip-core][PATCH 2/4] Add dmesg filter needed for lava test result
  2022-01-06 11:16 [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Alice Ferrazzi
  2022-01-06 11:16 ` [isar-cip-core][PATCH 1/4] Add cip-core-image-kernelci Alice Ferrazzi
@ 2022-01-06 11:16 ` Alice Ferrazzi
  2022-01-06 11:16 ` [isar-cip-core][PATCH 3/4] Add script deploy-kernelci.py for upload the cip-core-image-kernelci Alice Ferrazzi
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: Alice Ferrazzi @ 2022-01-06 11:16 UTC (permalink / raw)
  To: cip-dev; +Cc: Alice Ferrazzi

KernelCI is using a dmesg filter script for checking dmesg
logs result with lava.
Adding the script to the cip-core-image-kernelci.

Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
---
 .../kernelci-customizations/files/dmesg.sh    | 23 +++++++++++++++++++
 .../kernelci-customizations.bb                |  1 +
 2 files changed, 24 insertions(+)
 create mode 100644 recipes-core/kernelci-customizations/files/dmesg.sh

diff --git a/recipes-core/kernelci-customizations/files/dmesg.sh b/recipes-core/kernelci-customizations/files/dmesg.sh
new file mode 100644
index 0000000..3b096e1
--- /dev/null
+++ b/recipes-core/kernelci-customizations/files/dmesg.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+
+if [ "$KERNELCI_LAVA" = "y" ]; then
+    alias test-result='lava-test-case'
+else
+    alias test-result='echo'
+fi
+
+for level in crit alert emerg; do
+    dmesg --level=$level --notime -x -k > dmesg.$level
+    test -s dmesg.$level && res=fail || res=pass
+    count=$(cat dmesg.$level | wc -l)
+    cat dmesg.$level
+    test-result \
+        $level \
+        --result $res \
+        --measurement $count \
+        --units lines
+done
+
+exit 0
diff --git a/recipes-core/kernelci-customizations/kernelci-customizations.bb b/recipes-core/kernelci-customizations/kernelci-customizations.bb
index dca0891..c3f677c 100644
--- a/recipes-core/kernelci-customizations/kernelci-customizations.bb
+++ b/recipes-core/kernelci-customizations/kernelci-customizations.bb
@@ -18,6 +18,7 @@ DESCRIPTION = "CIP Core image demo & customizations"
 SRC_URI = " \
     file://postinst \
     file://ethernet \
+    file://dmesg.sh \
     file://99-silent-printk.conf"
 
 DEPENDS += "sshd-regen-keys"
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [isar-cip-core][PATCH 3/4] Add script deploy-kernelci.py for upload the cip-core-image-kernelci
  2022-01-06 11:16 [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Alice Ferrazzi
  2022-01-06 11:16 ` [isar-cip-core][PATCH 1/4] Add cip-core-image-kernelci Alice Ferrazzi
  2022-01-06 11:16 ` [isar-cip-core][PATCH 2/4] Add dmesg filter needed for lava test result Alice Ferrazzi
@ 2022-01-06 11:16 ` Alice Ferrazzi
  2022-01-06 11:16 ` [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci Alice Ferrazzi
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: Alice Ferrazzi @ 2022-01-06 11:16 UTC (permalink / raw)
  To: cip-dev; +Cc: Alice Ferrazzi

The cip-core-image-kernelci need to be uploaded to the KernelCI
production storage for been used by KernelCI.
This script use the KernelCI API for uploading the
cip-core-image-kernelci to the production storage.
The images are uploaded in the following link:
https://storage.kernelci.org/images/rootfs/cip/

Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
---
 scripts/deploy-kernelci.py | 55 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100755 scripts/deploy-kernelci.py

diff --git a/scripts/deploy-kernelci.py b/scripts/deploy-kernelci.py
new file mode 100755
index 0000000..5a8adca
--- /dev/null
+++ b/scripts/deploy-kernelci.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+import subprocess
+import requests
+import os
+import sys
+import time
+from urllib.parse import urljoin
+
+cdate=time.strftime("%Y%m%d")
+api="https://api.kernelci.org/upload"
+token=os.getenv("KERNELCI_TOKEN")
+
+release=sys.argv[1]
+target=sys.argv[2]
+extension=sys.argv[3]
+
+rootfs_filename="cip-core-image-kernelci-cip-core-"+release+"-"+target+".tar.gz"
+initrd_filename="cip-core-image-kernelci-cip-core-"+release+"-"+target+"-initrd.img"
+initrd_gz_filename="cip-core-image-kernelci-cip-core-"+release+"-"+target+"-initrd.img.gz"
+
+input_dir="build/tmp/deploy/images/"+target
+upload_path="/images/rootfs/cip/"+cdate+"/"+target+"/"
+upload_path_latest="/images/rootfs/cip/latest/"+target+"/"
+rootfs=input_dir+"/"+rootfs_filename
+initrd=input_dir+"/"+initrd_filename
+
+def upload_file(api, token, path, input_file, input_filename):
+    headers = {
+        'Authorization': token,
+    }
+    data = {
+        'path': path,
+    }
+    files = {
+        'file': (input_filename, open(input_file, 'rb').read()),
+    }
+    url = urljoin(api, 'upload')
+    resp = requests.post(url, headers=headers, data=data, files=files)
+    resp.raise_for_status()
+
+if os.path.exists(rootfs) and os.path.exists(initrd):
+    print("uploading rootfs to KernelCI")
+    upload_file(api, token, upload_path, rootfs, rootfs_filename)
+    print("uploading initrd to KernelCI")
+    upload_file(api, token, upload_path, initrd, initrd_gz_filename)
+    print("uploaded to: https://storage.kernelci.org"+upload_path)
+
+    # Upload latest
+    print("uploading rootfs to KernelCI CIP latest")
+    upload_file(api, token, upload_path_latest, rootfs, rootfs_filename)
+    print("uploading initrd to KernelCI CIP latest")
+    upload_file(api, token, upload_path_latest, initrd, initrd_gz_filename)
+    print("uploaded to: https://storage.kernelci.org"+upload_path_latest)
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci
  2022-01-06 11:16 [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Alice Ferrazzi
                   ` (2 preceding siblings ...)
  2022-01-06 11:16 ` [isar-cip-core][PATCH 3/4] Add script deploy-kernelci.py for upload the cip-core-image-kernelci Alice Ferrazzi
@ 2022-01-06 11:16 ` Alice Ferrazzi
  2022-01-06 14:12   ` Jan Kiszka
  2022-01-06 13:43 ` [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Jan Kiszka
  2022-01-06 14:18 ` Jan Kiszka
  5 siblings, 1 reply; 20+ messages in thread
From: Alice Ferrazzi @ 2022-01-06 11:16 UTC (permalink / raw)
  To: cip-dev; +Cc: Alice Ferrazzi

enable CIP core image KernelCI to be built with gitlab pipeline
and uploaded to the KernelCI storage using KernelCI API.
enable cip-core-image-kernelci to be built for amd64, arm and arm64.

Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
---
 .gitlab-ci.yml | 40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e7db8c1..784343b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,6 +9,7 @@ variables:
   targz: disable
   dtb: none
   deploy: enable
+  deploy_kernelci: disable
 
 stages:
   - build
@@ -37,7 +38,8 @@ default:
     - if [ "${release}" = "bullseye" ]; then base_yaml="${base_yaml}:kas/opt/bullseye.yml"; fi;
     - echo "Building ${base_yaml}"
     - kas build ${base_yaml}
-    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi
+    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi;
+    - if [ "${deploy_kernelci}" = "enable" ]; then scripts/deploy-kernelci.py ${release} ${target} ${extension} ${dtb}; fi
 
 # base image
 build:simatic-ipc227e-base:
@@ -77,6 +79,18 @@ build:qemu-amd64-base:
     wic_targz: disable
     targz: enable
 
+build:qemu-amd64-base-kernelci:
+  extends:
+    - .build_base
+  variables:
+    target: qemu-amd64
+    extension: kernelci
+    use_rt: disable
+    wic_targz: disable
+    targz: enable
+    deploy: disable
+    deploy_kernelci: enable
+
 build:qemu-arm64-base:
   extends:
     - .build_base
@@ -87,6 +101,18 @@ build:qemu-arm64-base:
     wic_targz: disable
     targz: enable
 
+build:qemu-arm64-base-kernelci:
+  extends:
+    - .build_base
+  variables:
+    target: qemu-arm64
+    extension: kernelci
+    use_rt: disable
+    wic_targz: disable
+    targz: enable
+    deploy: disable
+    deploy_kernelci: enable
+
 build:qemu-arm-base:
   extends:
     - .build_base
@@ -97,6 +123,18 @@ build:qemu-arm-base:
     wic_targz: disable
     targz: enable
 
+build:qemu-arm-base-kernelci:
+  extends:
+    - .build_base
+  variables:
+    target: qemu-arm
+    extension: kernelci
+    use_rt: disable
+    wic_targz: disable
+    targz: enable
+    deploy: disable
+    deploy_kernelci: enable
+
 # test
 build:simatic-ipc227e-test:
   extends:
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system
  2022-01-06 11:16 [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Alice Ferrazzi
                   ` (3 preceding siblings ...)
  2022-01-06 11:16 ` [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci Alice Ferrazzi
@ 2022-01-06 13:43 ` Jan Kiszka
  2022-01-06 14:18 ` Jan Kiszka
  5 siblings, 0 replies; 20+ messages in thread
From: Jan Kiszka @ 2022-01-06 13:43 UTC (permalink / raw)
  To: Alice Ferrazzi, cip-dev

On 06.01.22 12:16, Alice Ferrazzi wrote:
> This patch series add a new image with settings for 
> KernelCI.
> 
> This new image is called cip-core-image-kernelci and is 
> based on isar-cip-core general image with some changes 
> needed for make it work with KernelCI and taken from
> KernelCI image base settings.
> The cip-core-image-kernelci images are built by GitlabCI
> and uploaded to KernelCI production fileserver.
> https://storage.kernelci.org/images/rootfs/cip/
> 
> These patches are already integrated in the
> isar-cip-core:alicef/kernelci_master_refactor repository branch 
> and are generating the images that are currently 
> used by KernelCI.
> 
> cip-core-image-kernelci as been tested and are
> already used in KernelCI production with good results.
> https://linux.kernelci.org/test/job/stable-rc/branch/queue%2F5.14/kernel/v5.14.17-9-g9f7eecaa70b3/plan/baseline-cip-nfs/
> 
> Alice Ferrazzi (4):
>   Add cip-core-image-kernelci
>   Add dmesg filter needed for lava test result
>   Add script deploy-kernelci.py for upload the cip-core-image-kernelci
>   enable cip-core-image-kernelci
> 
>  .gitlab-ci.yml                                | 40 +++++++++++++-
>  kas/opt/kernelci.yml                          | 16 ++++++
>  .../images/cip-core-image-kernelci.bb         | 16 ++++++
>  .../files/99-silent-printk.conf               |  1 +
>  .../kernelci-customizations/files/dmesg.sh    | 23 ++++++++
>  .../kernelci-customizations/files/ethernet    | 23 ++++++++
>  .../kernelci-customizations/files/postinst    | 34 ++++++++++++
>  .../kernelci-customizations.bb                | 35 ++++++++++++
>  scripts/deploy-kernelci.py                    | 55 +++++++++++++++++++
>  9 files changed, 242 insertions(+), 1 deletion(-)
>  create mode 100644 kas/opt/kernelci.yml
>  create mode 100644 recipes-core/images/cip-core-image-kernelci.bb
>  create mode 100644 recipes-core/kernelci-customizations/files/99-silent-printk.conf
>  create mode 100644 recipes-core/kernelci-customizations/files/dmesg.sh
>  create mode 100644 recipes-core/kernelci-customizations/files/ethernet
>  create mode 100644 recipes-core/kernelci-customizations/files/postinst
>  create mode 100644 recipes-core/kernelci-customizations/kernelci-customizations.bb
>  create mode 100755 scripts/deploy-kernelci.py
> 

This is v2 of https://lists.cip-project.org/g/cip-dev/message/7264,
right? Please flag that in the future.

What is the delta?

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 1/4] Add cip-core-image-kernelci
  2022-01-06 11:16 ` [isar-cip-core][PATCH 1/4] Add cip-core-image-kernelci Alice Ferrazzi
@ 2022-01-06 14:01   ` Jan Kiszka
  2022-01-07 10:16     ` Alice Ferrazzi
  0 siblings, 1 reply; 20+ messages in thread
From: Jan Kiszka @ 2022-01-06 14:01 UTC (permalink / raw)
  To: Alice Ferrazzi, cip-dev

On 06.01.22 12:16, Alice Ferrazzi wrote:
> This image is currently used by KernelCI production for testing purpose.
> The purpose of this image is that KernelCI need to be able to autologin
> without password and to detect the login shell using special characters.
> Currently added are the default settings used by KernelCI images.
> 
> Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> ---
>  kas/opt/kernelci.yml                          | 16 +++++++++
>  .../images/cip-core-image-kernelci.bb         | 16 +++++++++
>  .../files/99-silent-printk.conf               |  1 +
>  .../kernelci-customizations/files/ethernet    | 23 +++++++++++++
>  .../kernelci-customizations/files/postinst    | 34 +++++++++++++++++++
>  .../kernelci-customizations.bb                | 34 +++++++++++++++++++
>  6 files changed, 124 insertions(+)
>  create mode 100644 kas/opt/kernelci.yml
>  create mode 100644 recipes-core/images/cip-core-image-kernelci.bb
>  create mode 100644 recipes-core/kernelci-customizations/files/99-silent-printk.conf
>  create mode 100644 recipes-core/kernelci-customizations/files/ethernet
>  create mode 100644 recipes-core/kernelci-customizations/files/postinst
>  create mode 100644 recipes-core/kernelci-customizations/kernelci-customizations.bb
> 
> diff --git a/kas/opt/kernelci.yml b/kas/opt/kernelci.yml
> new file mode 100644
> index 0000000..9c67864
> --- /dev/null
> +++ b/kas/opt/kernelci.yml
> @@ -0,0 +1,16 @@
> +#
> +# CIP Core, generic profile
> +#
> +# Copyright (c) Toshiba Corporation, 2020
> +# Copyright (c) Cybertrust Japan Co., Ltd., 2021
> +#
> +# Authors:
> +#  Venkata Pyla <venkata.pyla@toshiba-tsip.com>
> +#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +header:
> +  version: 10
> +
> +target: cip-core-image-kernelci
> diff --git a/recipes-core/images/cip-core-image-kernelci.bb b/recipes-core/images/cip-core-image-kernelci.bb
> new file mode 100644
> index 0000000..479c14c
> --- /dev/null
> +++ b/recipes-core/images/cip-core-image-kernelci.bb
> @@ -0,0 +1,16 @@
> +#
> +# A reference image for KernelCI
> +#
> +# Copyright (c) Cybertrust Japan Co., Ltd., 2021
> +#
> +# Authors:
> +#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +inherit image
> +
> +DESCRIPTION = "CIP Core image for KernelCI"
> +
> +IMAGE_INSTALL += "kernelci-customizations"
> diff --git a/recipes-core/kernelci-customizations/files/99-silent-printk.conf b/recipes-core/kernelci-customizations/files/99-silent-printk.conf
> new file mode 100644
> index 0000000..ad24d3a
> --- /dev/null
> +++ b/recipes-core/kernelci-customizations/files/99-silent-printk.conf
> @@ -0,0 +1 @@
> +kernel.printk = 3 4 1 3
> diff --git a/recipes-core/kernelci-customizations/files/ethernet b/recipes-core/kernelci-customizations/files/ethernet
> new file mode 100644
> index 0000000..fa47d1a
> --- /dev/null
> +++ b/recipes-core/kernelci-customizations/files/ethernet
> @@ -0,0 +1,23 @@
> +#
> +# CIP Core, generic profile
> +#
> +# Copyright (c) Siemens AG, 2019
> +#
> +# Authors:
> +#  Jan Kiszka <jan.kiszka@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +allow-hotplug eth0
> +allow-hotplug enp0s2
> +allow-hotplug enp2s0
> +
> +# used on BBB
> +iface eth0 inet dhcp
> +
> +# used on qemu-amd64
> +iface enp0s2 inet dhcp
> +
> +# used on simatic-ipc227e
> +iface enp2s0 inet dhcp
> diff --git a/recipes-core/kernelci-customizations/files/postinst b/recipes-core/kernelci-customizations/files/postinst
> new file mode 100644
> index 0000000..7ae30e8
> --- /dev/null
> +++ b/recipes-core/kernelci-customizations/files/postinst
> @@ -0,0 +1,34 @@
> +#!/bin/sh
> +#
> +# CIP Core, generic profile
> +#
> +# Copyright (c) Siemens AG, 2019
> +# Copyright (c) Cybertrust Japan Co., Ltd., 2021
> +#
> +# Authors:
> +#  Jan Kiszka <jan.kiszka@siemens.com>
> +#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +echo "CIP Core Demo & Test Image" > /etc/issue
> +
> +# permit root login without password
> +echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
> +echo "PermitEmptyPasswords yes" >> /etc/ssh/sshd_config
> +passwd root -d
> +
> +# serial getty service for autologin
> +mkdir -p /etc/systemd/system/serial-getty@.service.d/
> +echo "[Service]" > /etc/systemd/system/serial-getty@.service.d/override.conf
> +echo "ExecStart=" >> /etc/systemd/system/serial-getty@.service.d/override.conf
> +echo "ExecStart=-/sbin/agetty --autologin root --keep-baud 115200,38400,9600 %I $TERM" >> /etc/systemd/system/serial-getty@.service.d/override.conf
> +
> +# set the profile for KernelCI
> +echo "PS1='\$(pwd) # '" > /root/.profile
> +echo "cd /" >> /root/.profile
> +
> +HOSTNAME=demo
> +echo "$HOSTNAME" > /etc/hostname
> +echo "127.0.0.1 $HOSTNAME" >> /etc/hosts
> diff --git a/recipes-core/kernelci-customizations/kernelci-customizations.bb b/recipes-core/kernelci-customizations/kernelci-customizations.bb
> new file mode 100644
> index 0000000..dca0891
> --- /dev/null
> +++ b/recipes-core/kernelci-customizations/kernelci-customizations.bb
> @@ -0,0 +1,34 @@
> +#
> +# CIP Core, generic profile
> +#
> +# Copyright (c) Siemens AG, 2019
> +# Copyright (c) Cybertrust Japan Co., Ltd., 2021
> +#
> +# Authors:
> +#  Jan Kiszka <jan.kiszka@siemens.com>
> +#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +inherit dpkg-raw
> +
> +DESCRIPTION = "CIP Core image demo & customizations"
> +
> +SRC_URI = " \
> +    file://postinst \
> +    file://ethernet \
> +    file://99-silent-printk.conf"
> +
> +DEPENDS += "sshd-regen-keys"
> +
> +DEBIAN_DEPENDS = " \
> +    ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys"
> +
> +do_install() {
> +  install -v -d ${D}/etc/network/interfaces.d
> +  install -v -m 644 ${WORKDIR}/ethernet ${D}/etc/network/interfaces.d/
> +
> +  install -v -d ${D}/etc/sysctl.d
> +  install -v -m 644 ${WORKDIR}/99-silent-printk.conf ${D}/etc/sysctl.d/
> +}

This is duplicating the default customization package, IIUC, for the
purpose of adding further things. And you already miss some things due
to this (WIRELESS_FIRMWARE_PACKAGE, INSTALL_WIRELESS_TOOLS).

How about installing both and carrying in kernelci-customization only
the delta? Or at least reuse artifacts from customizations package, e.g.
via symlinks?

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci
  2022-01-06 11:16 ` [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci Alice Ferrazzi
@ 2022-01-06 14:12   ` Jan Kiszka
  2022-01-07 10:02     ` Alice Ferrazzi
  0 siblings, 1 reply; 20+ messages in thread
From: Jan Kiszka @ 2022-01-06 14:12 UTC (permalink / raw)
  To: Alice Ferrazzi, cip-dev

On 06.01.22 12:16, Alice Ferrazzi wrote:
> enable CIP core image KernelCI to be built with gitlab pipeline
> and uploaded to the KernelCI storage using KernelCI API.
> enable cip-core-image-kernelci to be built for amd64, arm and arm64.
> 
> Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> ---
>  .gitlab-ci.yml | 40 +++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 39 insertions(+), 1 deletion(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index e7db8c1..784343b 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -9,6 +9,7 @@ variables:
>    targz: disable
>    dtb: none
>    deploy: enable
> +  deploy_kernelci: disable
>  
>  stages:
>    - build
> @@ -37,7 +38,8 @@ default:
>      - if [ "${release}" = "bullseye" ]; then base_yaml="${base_yaml}:kas/opt/bullseye.yml"; fi;
>      - echo "Building ${base_yaml}"
>      - kas build ${base_yaml}
> -    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi
> +    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi;
> +    - if [ "${deploy_kernelci}" = "enable" ]; then scripts/deploy-kernelci.py ${release} ${target} ${extension} ${dtb}; fi

Does gitlab-ci forces us to add that closing ; to the last-but-one
command? If so, better add it to the new from the beginning.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system
  2022-01-06 11:16 [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Alice Ferrazzi
                   ` (4 preceding siblings ...)
  2022-01-06 13:43 ` [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Jan Kiszka
@ 2022-01-06 14:18 ` Jan Kiszka
  2022-01-07  9:57   ` Alice Ferrazzi
  5 siblings, 1 reply; 20+ messages in thread
From: Jan Kiszka @ 2022-01-06 14:18 UTC (permalink / raw)
  To: Alice Ferrazzi, cip-dev

On 06.01.22 12:16, Alice Ferrazzi wrote:
> This patch series add a new image with settings for 
> KernelCI.
> 
> This new image is called cip-core-image-kernelci and is 
> based on isar-cip-core general image with some changes 
> needed for make it work with KernelCI and taken from
> KernelCI image base settings.
> The cip-core-image-kernelci images are built by GitlabCI
> and uploaded to KernelCI production fileserver.
> https://storage.kernelci.org/images/rootfs/cip/
> 
> These patches are already integrated in the
> isar-cip-core:alicef/kernelci_master_refactor repository branch 
> and are generating the images that are currently 
> used by KernelCI.
> 
> cip-core-image-kernelci as been tested and are
> already used in KernelCI production with good results.
> https://linux.kernelci.org/test/job/stable-rc/branch/queue%2F5.14/kernel/v5.14.17-9-g9f7eecaa70b3/plan/baseline-cip-nfs/
> 

Thanks a lot for enabling this!

One meta-question: How does this image relate to what happens to a
standard image when adding kas/opt/test.yml? Does
kas/opt/kernelci.yml:kas/opt/test.yml make sense? Or should the former
actually include the latter?

These things you may ask yourself when try to add the image also to our
Kconfig menu ("kas-container menu"). That would be nice to have for a v3
as well, but more important is sorting out the option relationships.

Thanks,
Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system
  2022-01-06 14:18 ` Jan Kiszka
@ 2022-01-07  9:57   ` Alice Ferrazzi
  2022-01-07 10:10     ` Jan Kiszka
  0 siblings, 1 reply; 20+ messages in thread
From: Alice Ferrazzi @ 2022-01-07  9:57 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: cip-dev

On Thu, Jan 6, 2022 at 11:18 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 06.01.22 12:16, Alice Ferrazzi wrote:
> > This patch series add a new image with settings for
> > KernelCI.
> >
> > This new image is called cip-core-image-kernelci and is
> > based on isar-cip-core general image with some changes
> > needed for make it work with KernelCI and taken from
> > KernelCI image base settings.
> > The cip-core-image-kernelci images are built by GitlabCI
> > and uploaded to KernelCI production fileserver.
> > https://storage.kernelci.org/images/rootfs/cip/
> >
> > These patches are already integrated in the
> > isar-cip-core:alicef/kernelci_master_refactor repository branch
> > and are generating the images that are currently
> > used by KernelCI.
> >
> > cip-core-image-kernelci as been tested and are
> > already used in KernelCI production with good results.
> > https://linux.kernelci.org/test/job/stable-rc/branch/queue%2F5.14/kernel/v5.14.17-9-g9f7eecaa70b3/plan/baseline-cip-nfs/
> >
>
> Thanks a lot for enabling this!
>
> One meta-question: How does this image relate to what happens to a
> standard image when adding kas/opt/test.yml? Does
> kas/opt/kernelci.yml:kas/opt/test.yml make sense? Or should the former
> actually include the latter?

Currently it doesn't make too much sense to add such testing packages.
CIP kernel image testing is done using ad-hoc images with a KernelCI
built version of the
testing packages for having a common base and better compare results
with other kernels.
cip-core-image-kernelci is currently tested as booting image with
dmesg checks for each kernel (but still using specific KernelCI
configurations and scripts).
We are currently trying to implement the iec-security test as user
space test that will use cip-core-image-kernelci,
I sent a pull request for implementing the user space test
iec-security but is still in progress.
Because KernelCI testings and test environments differs from CIP
gitlab pipeline test environment,
we have to use a different file and merging both would currently make
such different environments unstable.

I hope that this answer your question.

> These things you may ask yourself when try to add the image also to our
> Kconfig menu ("kas-container menu"). That would be nice to have for a v3
> as well, but more important is sorting out the option relationships.

cip-core-image-kernelci are build using gitlab pipeline and there is
currently no benefit to have such
images manual build.

Thanks,
Alice

-- 
======================================
Cybertrust Japan Co.,Ltd.
Alice Ferrazzi
alice.ferrazzi@miraclelinux.com
======================================


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci
  2022-01-06 14:12   ` Jan Kiszka
@ 2022-01-07 10:02     ` Alice Ferrazzi
  2022-01-07 10:07       ` Jan Kiszka
  0 siblings, 1 reply; 20+ messages in thread
From: Alice Ferrazzi @ 2022-01-07 10:02 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: cip-dev

On Thu, Jan 6, 2022 at 11:12 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 06.01.22 12:16, Alice Ferrazzi wrote:
> > enable CIP core image KernelCI to be built with gitlab pipeline
> > and uploaded to the KernelCI storage using KernelCI API.
> > enable cip-core-image-kernelci to be built for amd64, arm and arm64.
> >
> > Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> > ---
> >  .gitlab-ci.yml | 40 +++++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 39 insertions(+), 1 deletion(-)
> >
> > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> > index e7db8c1..784343b 100644
> > --- a/.gitlab-ci.yml
> > +++ b/.gitlab-ci.yml
> > @@ -9,6 +9,7 @@ variables:
> >    targz: disable
> >    dtb: none
> >    deploy: enable
> > +  deploy_kernelci: disable
> >
> >  stages:
> >    - build
> > @@ -37,7 +38,8 @@ default:
> >      - if [ "${release}" = "bullseye" ]; then base_yaml="${base_yaml}:kas/opt/bullseye.yml"; fi;
> >      - echo "Building ${base_yaml}"
> >      - kas build ${base_yaml}
> > -    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi
> > +    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi;
> > +    - if [ "${deploy_kernelci}" = "enable" ]; then scripts/deploy-kernelci.py ${release} ${target} ${extension} ${dtb}; fi
>
> Does gitlab-ci forces us to add that closing ; to the last-but-one
> command? If so, better add it to the new from the beginning.
>

I'm just following the syntax that is already there.
The gitlab-ci.yml file syntax preceding my commit is also doing same
thing of adding that closing ; to the last-but-one command.
You can check it here
https://gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/.gitlab-ci.yml#L40

Thanks,
Alice

-- 
======================================
Cybertrust Japan Co.,Ltd.
Alice Ferrazzi
alice.ferrazzi@miraclelinux.com
======================================


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci
  2022-01-07 10:02     ` Alice Ferrazzi
@ 2022-01-07 10:07       ` Jan Kiszka
  2022-01-07 10:23         ` Alice Ferrazzi
  0 siblings, 1 reply; 20+ messages in thread
From: Jan Kiszka @ 2022-01-07 10:07 UTC (permalink / raw)
  To: Alice Ferrazzi; +Cc: cip-dev

On 07.01.22 11:02, Alice Ferrazzi wrote:
> On Thu, Jan 6, 2022 at 11:12 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> On 06.01.22 12:16, Alice Ferrazzi wrote:
>>> enable CIP core image KernelCI to be built with gitlab pipeline
>>> and uploaded to the KernelCI storage using KernelCI API.
>>> enable cip-core-image-kernelci to be built for amd64, arm and arm64.
>>>
>>> Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
>>> ---
>>>  .gitlab-ci.yml | 40 +++++++++++++++++++++++++++++++++++++++-
>>>  1 file changed, 39 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
>>> index e7db8c1..784343b 100644
>>> --- a/.gitlab-ci.yml
>>> +++ b/.gitlab-ci.yml
>>> @@ -9,6 +9,7 @@ variables:
>>>    targz: disable
>>>    dtb: none
>>>    deploy: enable
>>> +  deploy_kernelci: disable
>>>
>>>  stages:
>>>    - build
>>> @@ -37,7 +38,8 @@ default:
>>>      - if [ "${release}" = "bullseye" ]; then base_yaml="${base_yaml}:kas/opt/bullseye.yml"; fi;
>>>      - echo "Building ${base_yaml}"
>>>      - kas build ${base_yaml}
>>> -    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi
>>> +    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi;
>>> +    - if [ "${deploy_kernelci}" = "enable" ]; then scripts/deploy-kernelci.py ${release} ${target} ${extension} ${dtb}; fi
>>
>> Does gitlab-ci forces us to add that closing ; to the last-but-one
>> command? If so, better add it to the new from the beginning.
>>
> 
> I'm just following the syntax that is already there.
> The gitlab-ci.yml file syntax preceding my commit is also doing same
> thing of adding that closing ; to the last-but-one command.
> You can check it here
> https://gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/.gitlab-ci.yml#L40
> 

Then, if the closing semicolon is needed, add it to the new line as well
to avoid having to touch that when adding the next one.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system
  2022-01-07  9:57   ` Alice Ferrazzi
@ 2022-01-07 10:10     ` Jan Kiszka
  2022-01-07 10:20       ` Alice Ferrazzi
       [not found]       ` <CANgtXuPc0_27ZCR7au1e-C3y+-7De-nZQ2ddmjKAinT7Cm09_A@mail.gmail.com>
  0 siblings, 2 replies; 20+ messages in thread
From: Jan Kiszka @ 2022-01-07 10:10 UTC (permalink / raw)
  To: Alice Ferrazzi; +Cc: cip-dev

On 07.01.22 10:57, Alice Ferrazzi wrote:
> On Thu, Jan 6, 2022 at 11:18 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> On 06.01.22 12:16, Alice Ferrazzi wrote:
>>> This patch series add a new image with settings for
>>> KernelCI.
>>>
>>> This new image is called cip-core-image-kernelci and is
>>> based on isar-cip-core general image with some changes
>>> needed for make it work with KernelCI and taken from
>>> KernelCI image base settings.
>>> The cip-core-image-kernelci images are built by GitlabCI
>>> and uploaded to KernelCI production fileserver.
>>> https://storage.kernelci.org/images/rootfs/cip/
>>>
>>> These patches are already integrated in the
>>> isar-cip-core:alicef/kernelci_master_refactor repository branch
>>> and are generating the images that are currently
>>> used by KernelCI.
>>>
>>> cip-core-image-kernelci as been tested and are
>>> already used in KernelCI production with good results.
>>> https://linux.kernelci.org/test/job/stable-rc/branch/queue%2F5.14/kernel/v5.14.17-9-g9f7eecaa70b3/plan/baseline-cip-nfs/
>>>
>>
>> Thanks a lot for enabling this!
>>
>> One meta-question: How does this image relate to what happens to a
>> standard image when adding kas/opt/test.yml? Does
>> kas/opt/kernelci.yml:kas/opt/test.yml make sense? Or should the former
>> actually include the latter?
> 
> Currently it doesn't make too much sense to add such testing packages.
> CIP kernel image testing is done using ad-hoc images with a KernelCI
> built version of the
> testing packages for having a common base and better compare results
> with other kernels.
> cip-core-image-kernelci is currently tested as booting image with
> dmesg checks for each kernel (but still using specific KernelCI
> configurations and scripts).
> We are currently trying to implement the iec-security test as user
> space test that will use cip-core-image-kernelci,
> I sent a pull request for implementing the user space test
> iec-security but is still in progress.
> Because KernelCI testings and test environments differs from CIP
> gitlab pipeline test environment,
> we have to use a different file and merging both would currently make
> such different environments unstable.
> 
> I hope that this answer your question.

Ok, we just need to keep an eye on target configs and options that deal
with "testing" so that things are consistent and intuitive.

> 
>> These things you may ask yourself when try to add the image also to our
>> Kconfig menu ("kas-container menu"). That would be nice to have for a v3
>> as well, but more important is sorting out the option relationships.
> 
> cip-core-image-kernelci are build using gitlab pipeline and there is
> currently no benefit to have such
> images manual build.
> 

So, the case that a test fails on kernel CI and someone want to
reproduce the image that triggered this does not exist? One would rather
build a regular image for the target then?

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 1/4] Add cip-core-image-kernelci
  2022-01-06 14:01   ` Jan Kiszka
@ 2022-01-07 10:16     ` Alice Ferrazzi
  0 siblings, 0 replies; 20+ messages in thread
From: Alice Ferrazzi @ 2022-01-07 10:16 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: cip-dev

On Thu, Jan 6, 2022 at 11:01 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 06.01.22 12:16, Alice Ferrazzi wrote:
> > This image is currently used by KernelCI production for testing purpose.
> > The purpose of this image is that KernelCI need to be able to autologin
> > without password and to detect the login shell using special characters.
> > Currently added are the default settings used by KernelCI images.
> >
> > Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> > ---
> >  kas/opt/kernelci.yml                          | 16 +++++++++
> >  .../images/cip-core-image-kernelci.bb         | 16 +++++++++
> >  .../files/99-silent-printk.conf               |  1 +
> >  .../kernelci-customizations/files/ethernet    | 23 +++++++++++++
> >  .../kernelci-customizations/files/postinst    | 34 +++++++++++++++++++
> >  .../kernelci-customizations.bb                | 34 +++++++++++++++++++
> >  6 files changed, 124 insertions(+)
> >  create mode 100644 kas/opt/kernelci.yml
> >  create mode 100644 recipes-core/images/cip-core-image-kernelci.bb
> >  create mode 100644 recipes-core/kernelci-customizations/files/99-silent-printk.conf
> >  create mode 100644 recipes-core/kernelci-customizations/files/ethernet
> >  create mode 100644 recipes-core/kernelci-customizations/files/postinst
> >  create mode 100644 recipes-core/kernelci-customizations/kernelci-customizations.bb
> >
> > diff --git a/kas/opt/kernelci.yml b/kas/opt/kernelci.yml
> > new file mode 100644
> > index 0000000..9c67864
> > --- /dev/null
> > +++ b/kas/opt/kernelci.yml
> > @@ -0,0 +1,16 @@
> > +#
> > +# CIP Core, generic profile
> > +#
> > +# Copyright (c) Toshiba Corporation, 2020
> > +# Copyright (c) Cybertrust Japan Co., Ltd., 2021
> > +#
> > +# Authors:
> > +#  Venkata Pyla <venkata.pyla@toshiba-tsip.com>
> > +#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> > +#
> > +# SPDX-License-Identifier: MIT
> > +#
> > +header:
> > +  version: 10
> > +
> > +target: cip-core-image-kernelci
> > diff --git a/recipes-core/images/cip-core-image-kernelci.bb b/recipes-core/images/cip-core-image-kernelci.bb
> > new file mode 100644
> > index 0000000..479c14c
> > --- /dev/null
> > +++ b/recipes-core/images/cip-core-image-kernelci.bb
> > @@ -0,0 +1,16 @@
> > +#
> > +# A reference image for KernelCI
> > +#
> > +# Copyright (c) Cybertrust Japan Co., Ltd., 2021
> > +#
> > +# Authors:
> > +#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> > +#
> > +# SPDX-License-Identifier: MIT
> > +#
> > +
> > +inherit image
> > +
> > +DESCRIPTION = "CIP Core image for KernelCI"
> > +
> > +IMAGE_INSTALL += "kernelci-customizations"
> > diff --git a/recipes-core/kernelci-customizations/files/99-silent-printk.conf b/recipes-core/kernelci-customizations/files/99-silent-printk.conf
> > new file mode 100644
> > index 0000000..ad24d3a
> > --- /dev/null
> > +++ b/recipes-core/kernelci-customizations/files/99-silent-printk.conf
> > @@ -0,0 +1 @@
> > +kernel.printk = 3 4 1 3
> > diff --git a/recipes-core/kernelci-customizations/files/ethernet b/recipes-core/kernelci-customizations/files/ethernet
> > new file mode 100644
> > index 0000000..fa47d1a
> > --- /dev/null
> > +++ b/recipes-core/kernelci-customizations/files/ethernet
> > @@ -0,0 +1,23 @@
> > +#
> > +# CIP Core, generic profile
> > +#
> > +# Copyright (c) Siemens AG, 2019
> > +#
> > +# Authors:
> > +#  Jan Kiszka <jan.kiszka@siemens.com>
> > +#
> > +# SPDX-License-Identifier: MIT
> > +#
> > +
> > +allow-hotplug eth0
> > +allow-hotplug enp0s2
> > +allow-hotplug enp2s0
> > +
> > +# used on BBB
> > +iface eth0 inet dhcp
> > +
> > +# used on qemu-amd64
> > +iface enp0s2 inet dhcp
> > +
> > +# used on simatic-ipc227e
> > +iface enp2s0 inet dhcp
> > diff --git a/recipes-core/kernelci-customizations/files/postinst b/recipes-core/kernelci-customizations/files/postinst
> > new file mode 100644
> > index 0000000..7ae30e8
> > --- /dev/null
> > +++ b/recipes-core/kernelci-customizations/files/postinst
> > @@ -0,0 +1,34 @@
> > +#!/bin/sh
> > +#
> > +# CIP Core, generic profile
> > +#
> > +# Copyright (c) Siemens AG, 2019
> > +# Copyright (c) Cybertrust Japan Co., Ltd., 2021
> > +#
> > +# Authors:
> > +#  Jan Kiszka <jan.kiszka@siemens.com>
> > +#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> > +#
> > +# SPDX-License-Identifier: MIT
> > +#
> > +
> > +echo "CIP Core Demo & Test Image" > /etc/issue
> > +
> > +# permit root login without password
> > +echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
> > +echo "PermitEmptyPasswords yes" >> /etc/ssh/sshd_config
> > +passwd root -d
> > +
> > +# serial getty service for autologin
> > +mkdir -p /etc/systemd/system/serial-getty@.service.d/
> > +echo "[Service]" > /etc/systemd/system/serial-getty@.service.d/override.conf
> > +echo "ExecStart=" >> /etc/systemd/system/serial-getty@.service.d/override.conf
> > +echo "ExecStart=-/sbin/agetty --autologin root --keep-baud 115200,38400,9600 %I $TERM" >> /etc/systemd/system/serial-getty@.service.d/override.conf
> > +
> > +# set the profile for KernelCI
> > +echo "PS1='\$(pwd) # '" > /root/.profile
> > +echo "cd /" >> /root/.profile
> > +
> > +HOSTNAME=demo
> > +echo "$HOSTNAME" > /etc/hostname
> > +echo "127.0.0.1 $HOSTNAME" >> /etc/hosts
> > diff --git a/recipes-core/kernelci-customizations/kernelci-customizations.bb b/recipes-core/kernelci-customizations/kernelci-customizations.bb
> > new file mode 100644
> > index 0000000..dca0891
> > --- /dev/null
> > +++ b/recipes-core/kernelci-customizations/kernelci-customizations.bb
> > @@ -0,0 +1,34 @@
> > +#
> > +# CIP Core, generic profile
> > +#
> > +# Copyright (c) Siemens AG, 2019
> > +# Copyright (c) Cybertrust Japan Co., Ltd., 2021
> > +#
> > +# Authors:
> > +#  Jan Kiszka <jan.kiszka@siemens.com>
> > +#  Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> > +#
> > +# SPDX-License-Identifier: MIT
> > +#
> > +
> > +inherit dpkg-raw
> > +
> > +DESCRIPTION = "CIP Core image demo & customizations"
> > +
> > +SRC_URI = " \
> > +    file://postinst \
> > +    file://ethernet \
> > +    file://99-silent-printk.conf"
> > +
> > +DEPENDS += "sshd-regen-keys"
> > +
> > +DEBIAN_DEPENDS = " \
> > +    ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys"
> > +
> > +do_install() {
> > +  install -v -d ${D}/etc/network/interfaces.d
> > +  install -v -m 644 ${WORKDIR}/ethernet ${D}/etc/network/interfaces.d/
> > +
> > +  install -v -d ${D}/etc/sysctl.d
> > +  install -v -m 644 ${WORKDIR}/99-silent-printk.conf ${D}/etc/sysctl.d/
> > +}
>
> This is duplicating the default customization package, IIUC, for the
> purpose of adding further things. And you already miss some things due
> to this (WIRELESS_FIRMWARE_PACKAGE, INSTALL_WIRELESS_TOOLS).
>
> How about installing both and carrying in kernelci-customization only
> the delta? Or at least reuse artifacts from customizations package, e.g.
> via symlinks?

KernelCI enviroment and gitlab-ci eviroment are mostly different.
Changes on the symlink could possibly broke the KernelCI testing
image or the gitlab-ci image.
KernelCI working workflow is to have different files and porting changes
manually so that we can be sure it doesn't create problems and revert
on necessity.


Thanks,
Alicef

-- 
======================================
Cybertrust Japan Co.,Ltd.
Alice Ferrazzi
alice.ferrazzi@miraclelinux.com
======================================


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system
  2022-01-07 10:10     ` Jan Kiszka
@ 2022-01-07 10:20       ` Alice Ferrazzi
       [not found]       ` <CANgtXuPc0_27ZCR7au1e-C3y+-7De-nZQ2ddmjKAinT7Cm09_A@mail.gmail.com>
  1 sibling, 0 replies; 20+ messages in thread
From: Alice Ferrazzi @ 2022-01-07 10:20 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: cip-dev

On Fri, Jan 7, 2022 at 7:11 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 07.01.22 10:57, Alice Ferrazzi wrote:
> > On Thu, Jan 6, 2022 at 11:18 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> >>
> >> On 06.01.22 12:16, Alice Ferrazzi wrote:
> >>> This patch series add a new image with settings for
> >>> KernelCI.
> >>>
> >>> This new image is called cip-core-image-kernelci and is
> >>> based on isar-cip-core general image with some changes
> >>> needed for make it work with KernelCI and taken from
> >>> KernelCI image base settings.
> >>> The cip-core-image-kernelci images are built by GitlabCI
> >>> and uploaded to KernelCI production fileserver.
> >>> https://storage.kernelci.org/images/rootfs/cip/
> >>>
> >>> These patches are already integrated in the
> >>> isar-cip-core:alicef/kernelci_master_refactor repository branch
> >>> and are generating the images that are currently
> >>> used by KernelCI.
> >>>
> >>> cip-core-image-kernelci as been tested and are
> >>> already used in KernelCI production with good results.
> >>> https://linux.kernelci.org/test/job/stable-rc/branch/queue%2F5.14/kernel/v5.14.17-9-g9f7eecaa70b3/plan/baseline-cip-nfs/
> >>>
> >>
> >> Thanks a lot for enabling this!
> >>
> >> One meta-question: How does this image relate to what happens to a
> >> standard image when adding kas/opt/test.yml? Does
> >> kas/opt/kernelci.yml:kas/opt/test.yml make sense? Or should the former
> >> actually include the latter?
> >
> > Currently it doesn't make too much sense to add such testing packages.
> > CIP kernel image testing is done using ad-hoc images with a KernelCI
> > built version of the
> > testing packages for having a common base and better compare results
> > with other kernels.
> > cip-core-image-kernelci is currently tested as booting image with
> > dmesg checks for each kernel (but still using specific KernelCI
> > configurations and scripts).
> > We are currently trying to implement the iec-security test as user
> > space test that will use cip-core-image-kernelci,
> > I sent a pull request for implementing the user space test
> > iec-security but is still in progress.
> > Because KernelCI testings and test environments differs from CIP
> > gitlab pipeline test environment,
> > we have to use a different file and merging both would currently make
> > such different environments unstable.
> >
> > I hope that this answer your question.
>
> Ok, we just need to keep an eye on target configs and options that deal
> with "testing" so that things are consistent and intuitive.
>
> >
> >> These things you may ask yourself when try to add the image also to our
> >> Kconfig menu ("kas-container menu"). That would be nice to have for a v3
> >> as well, but more important is sorting out the option relationships.
> >
> > cip-core-image-kernelci are build using gitlab pipeline and there is
> > currently no benefit to have such
> > images manual build.
> >
>
> So, the case that a test fails on kernel CI and someone want to
> reproduce the image that triggered this does not exist? One would rather
> build a regular image for the target then?
>

Why not just using the pre made image from
https://storage.kernelci.org/images/rootfs/cip/
for reproducing errors ?

Thanks,
Alicef

-- 
======================================
Cybertrust Japan Co.,Ltd.
Alice Ferrazzi
alice.ferrazzi@miraclelinux.com
======================================


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system
       [not found]       ` <CANgtXuPc0_27ZCR7au1e-C3y+-7De-nZQ2ddmjKAinT7Cm09_A@mail.gmail.com>
@ 2022-01-07 10:22         ` Jan Kiszka
  0 siblings, 0 replies; 20+ messages in thread
From: Jan Kiszka @ 2022-01-07 10:22 UTC (permalink / raw)
  To: Alice Ferrazzi, cip-dev

On 07.01.22 11:19, Alice Ferrazzi wrote:
> On Fri, Jan 7, 2022 at 7:11 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> On 07.01.22 10:57, Alice Ferrazzi wrote:
>>> On Thu, Jan 6, 2022 at 11:18 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>>>
>>>> On 06.01.22 12:16, Alice Ferrazzi wrote:
>>>>> This patch series add a new image with settings for
>>>>> KernelCI.
>>>>>
>>>>> This new image is called cip-core-image-kernelci and is
>>>>> based on isar-cip-core general image with some changes
>>>>> needed for make it work with KernelCI and taken from
>>>>> KernelCI image base settings.
>>>>> The cip-core-image-kernelci images are built by GitlabCI
>>>>> and uploaded to KernelCI production fileserver.
>>>>> https://storage.kernelci.org/images/rootfs/cip/
>>>>>
>>>>> These patches are already integrated in the
>>>>> isar-cip-core:alicef/kernelci_master_refactor repository branch
>>>>> and are generating the images that are currently
>>>>> used by KernelCI.
>>>>>
>>>>> cip-core-image-kernelci as been tested and are
>>>>> already used in KernelCI production with good results.
>>>>> https://linux.kernelci.org/test/job/stable-rc/branch/queue%2F5.14/kernel/v5.14.17-9-g9f7eecaa70b3/plan/baseline-cip-nfs/
>>>>>
>>>>
>>>> Thanks a lot for enabling this!
>>>>
>>>> One meta-question: How does this image relate to what happens to a
>>>> standard image when adding kas/opt/test.yml? Does
>>>> kas/opt/kernelci.yml:kas/opt/test.yml make sense? Or should the former
>>>> actually include the latter?
>>>
>>> Currently it doesn't make too much sense to add such testing packages.
>>> CIP kernel image testing is done using ad-hoc images with a KernelCI
>>> built version of the
>>> testing packages for having a common base and better compare results
>>> with other kernels.
>>> cip-core-image-kernelci is currently tested as booting image with
>>> dmesg checks for each kernel (but still using specific KernelCI
>>> configurations and scripts).
>>> We are currently trying to implement the iec-security test as user
>>> space test that will use cip-core-image-kernelci,
>>> I sent a pull request for implementing the user space test
>>> iec-security but is still in progress.
>>> Because KernelCI testings and test environments differs from CIP
>>> gitlab pipeline test environment,
>>> we have to use a different file and merging both would currently make
>>> such different environments unstable.
>>>
>>> I hope that this answer your question.
>>
>> Ok, we just need to keep an eye on target configs and options that deal
>> with "testing" so that things are consistent and intuitive.
>>
>>>
>>>> These things you may ask yourself when try to add the image also to our
>>>> Kconfig menu ("kas-container menu"). That would be nice to have for a v3
>>>> as well, but more important is sorting out the option relationships.
>>>
>>> cip-core-image-kernelci are build using gitlab pipeline and there is
>>> currently no benefit to have such
>>> images manual build.
>>>
>>
>> So, the case that a test fails on kernel CI and someone want to
>> reproduce the image that triggered this does not exist? One would rather
>> build a regular image for the target then?
>>
> 
> Why not just using the pre made image from
> https://storage.kernelci.org/images/rootfs/cip/
> for reproducing errors ?

Fine, as long as you do not need to adjust things in it afterwards.
Granted, such cases will be less common.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci
  2022-01-07 10:07       ` Jan Kiszka
@ 2022-01-07 10:23         ` Alice Ferrazzi
  2022-01-07 11:18           ` Jan Kiszka
  0 siblings, 1 reply; 20+ messages in thread
From: Alice Ferrazzi @ 2022-01-07 10:23 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: cip-dev

On Fri, Jan 7, 2022 at 7:07 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 07.01.22 11:02, Alice Ferrazzi wrote:
> > On Thu, Jan 6, 2022 at 11:12 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> >>
> >> On 06.01.22 12:16, Alice Ferrazzi wrote:
> >>> enable CIP core image KernelCI to be built with gitlab pipeline
> >>> and uploaded to the KernelCI storage using KernelCI API.
> >>> enable cip-core-image-kernelci to be built for amd64, arm and arm64.
> >>>
> >>> Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> >>> ---
> >>>  .gitlab-ci.yml | 40 +++++++++++++++++++++++++++++++++++++++-
> >>>  1 file changed, 39 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> >>> index e7db8c1..784343b 100644
> >>> --- a/.gitlab-ci.yml
> >>> +++ b/.gitlab-ci.yml
> >>> @@ -9,6 +9,7 @@ variables:
> >>>    targz: disable
> >>>    dtb: none
> >>>    deploy: enable
> >>> +  deploy_kernelci: disable
> >>>
> >>>  stages:
> >>>    - build
> >>> @@ -37,7 +38,8 @@ default:
> >>>      - if [ "${release}" = "bullseye" ]; then base_yaml="${base_yaml}:kas/opt/bullseye.yml"; fi;
> >>>      - echo "Building ${base_yaml}"
> >>>      - kas build ${base_yaml}
> >>> -    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi
> >>> +    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi;
> >>> +    - if [ "${deploy_kernelci}" = "enable" ]; then scripts/deploy-kernelci.py ${release} ${target} ${extension} ${dtb}; fi
> >>
> >> Does gitlab-ci forces us to add that closing ; to the last-but-one
> >> command? If so, better add it to the new from the beginning.
> >>
> >
> > I'm just following the syntax that is already there.
> > The gitlab-ci.yml file syntax preceding my commit is also doing same
> > thing of adding that closing ; to the last-but-one command.
> > You can check it here
> > https://gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/.gitlab-ci.yml#L40
> >
>
> Then, if the closing semicolon is needed, add it to the new line as well
> to avoid having to touch that when adding the next one.

sorry I'm not understanding what you want me to do.
The closing semicolon is needed to the last-but-one command.
Adding it to the last command break the script.

-- 
Thanks,
Alicef

======================================
Cybertrust Japan Co.,Ltd.
Alice Ferrazzi
alice.ferrazzi@miraclelinux.com
======================================


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci
  2022-01-07 10:23         ` Alice Ferrazzi
@ 2022-01-07 11:18           ` Jan Kiszka
  2022-01-07 13:40             ` Alice Ferrazzi
  0 siblings, 1 reply; 20+ messages in thread
From: Jan Kiszka @ 2022-01-07 11:18 UTC (permalink / raw)
  To: Alice Ferrazzi; +Cc: cip-dev

On 07.01.22 11:23, Alice Ferrazzi wrote:
> On Fri, Jan 7, 2022 at 7:07 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> On 07.01.22 11:02, Alice Ferrazzi wrote:
>>> On Thu, Jan 6, 2022 at 11:12 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>>>
>>>> On 06.01.22 12:16, Alice Ferrazzi wrote:
>>>>> enable CIP core image KernelCI to be built with gitlab pipeline
>>>>> and uploaded to the KernelCI storage using KernelCI API.
>>>>> enable cip-core-image-kernelci to be built for amd64, arm and arm64.
>>>>>
>>>>> Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
>>>>> ---
>>>>>  .gitlab-ci.yml | 40 +++++++++++++++++++++++++++++++++++++++-
>>>>>  1 file changed, 39 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
>>>>> index e7db8c1..784343b 100644
>>>>> --- a/.gitlab-ci.yml
>>>>> +++ b/.gitlab-ci.yml
>>>>> @@ -9,6 +9,7 @@ variables:
>>>>>    targz: disable
>>>>>    dtb: none
>>>>>    deploy: enable
>>>>> +  deploy_kernelci: disable
>>>>>
>>>>>  stages:
>>>>>    - build
>>>>> @@ -37,7 +38,8 @@ default:
>>>>>      - if [ "${release}" = "bullseye" ]; then base_yaml="${base_yaml}:kas/opt/bullseye.yml"; fi;
>>>>>      - echo "Building ${base_yaml}"
>>>>>      - kas build ${base_yaml}
>>>>> -    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi
>>>>> +    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi;
>>>>> +    - if [ "${deploy_kernelci}" = "enable" ]; then scripts/deploy-kernelci.py ${release} ${target} ${extension} ${dtb}; fi
>>>>
>>>> Does gitlab-ci forces us to add that closing ; to the last-but-one
>>>> command? If so, better add it to the new from the beginning.
>>>>
>>>
>>> I'm just following the syntax that is already there.
>>> The gitlab-ci.yml file syntax preceding my commit is also doing same
>>> thing of adding that closing ; to the last-but-one command.
>>> You can check it here
>>> https://gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/.gitlab-ci.yml#L40
>>>
>>
>> Then, if the closing semicolon is needed, add it to the new line as well
>> to avoid having to touch that when adding the next one.
> 
> sorry I'm not understanding what you want me to do.
> The closing semicolon is needed to the last-but-one command.
> Adding it to the last command break the script.
> 

Are you really sure about the closing semicolon?

https://gitlab.com/jan-kiszka/ci-test/-/jobs/1951623081
https://gitlab.com/jan-kiszka/ci-test/-/blob/semicolon/.gitlab-ci.yml

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci
  2022-01-07 11:18           ` Jan Kiszka
@ 2022-01-07 13:40             ` Alice Ferrazzi
  2022-01-07 13:46               ` Jan Kiszka
  0 siblings, 1 reply; 20+ messages in thread
From: Alice Ferrazzi @ 2022-01-07 13:40 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: cip-dev

On Fri, Jan 7, 2022 at 8:18 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>
> On 07.01.22 11:23, Alice Ferrazzi wrote:
> > On Fri, Jan 7, 2022 at 7:07 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> >>
> >> On 07.01.22 11:02, Alice Ferrazzi wrote:
> >>> On Thu, Jan 6, 2022 at 11:12 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
> >>>>
> >>>> On 06.01.22 12:16, Alice Ferrazzi wrote:
> >>>>> enable CIP core image KernelCI to be built with gitlab pipeline
> >>>>> and uploaded to the KernelCI storage using KernelCI API.
> >>>>> enable cip-core-image-kernelci to be built for amd64, arm and arm64.
> >>>>>
> >>>>> Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
> >>>>> ---
> >>>>>  .gitlab-ci.yml | 40 +++++++++++++++++++++++++++++++++++++++-
> >>>>>  1 file changed, 39 insertions(+), 1 deletion(-)
> >>>>>
> >>>>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> >>>>> index e7db8c1..784343b 100644
> >>>>> --- a/.gitlab-ci.yml
> >>>>> +++ b/.gitlab-ci.yml
> >>>>> @@ -9,6 +9,7 @@ variables:
> >>>>>    targz: disable
> >>>>>    dtb: none
> >>>>>    deploy: enable
> >>>>> +  deploy_kernelci: disable
> >>>>>
> >>>>>  stages:
> >>>>>    - build
> >>>>> @@ -37,7 +38,8 @@ default:
> >>>>>      - if [ "${release}" = "bullseye" ]; then base_yaml="${base_yaml}:kas/opt/bullseye.yml"; fi;
> >>>>>      - echo "Building ${base_yaml}"
> >>>>>      - kas build ${base_yaml}
> >>>>> -    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi
> >>>>> +    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi;
> >>>>> +    - if [ "${deploy_kernelci}" = "enable" ]; then scripts/deploy-kernelci.py ${release} ${target} ${extension} ${dtb}; fi
> >>>>
> >>>> Does gitlab-ci forces us to add that closing ; to the last-but-one
> >>>> command? If so, better add it to the new from the beginning.
> >>>>
> >>>
> >>> I'm just following the syntax that is already there.
> >>> The gitlab-ci.yml file syntax preceding my commit is also doing same
> >>> thing of adding that closing ; to the last-but-one command.
> >>> You can check it here
> >>> https://gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/.gitlab-ci.yml#L40
> >>>
> >>
> >> Then, if the closing semicolon is needed, add it to the new line as well
> >> to avoid having to touch that when adding the next one.
> >
> > sorry I'm not understanding what you want me to do.
> > The closing semicolon is needed to the last-but-one command.
> > Adding it to the last command break the script.
> >
>
> Are you really sure about the closing semicolon?
>
> https://gitlab.com/jan-kiszka/ci-test/-/jobs/1951623081
> https://gitlab.com/jan-kiszka/ci-test/-/blob/semicolon/.gitlab-ci.yml

you are right. I just checked my pipeline backlog and found that some
months ago,
I just checked for both without ; and not the case of both having it.
Still we are changing the syntax already present and used.
is it ok to use a new syntax? if is ok I can send a revision.

Thanks,
Alicef
-- 
======================================
Cybertrust Japan Co.,Ltd.
Alice Ferrazzi
alice.ferrazzi@miraclelinux.com
======================================


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci
  2022-01-07 13:40             ` Alice Ferrazzi
@ 2022-01-07 13:46               ` Jan Kiszka
  0 siblings, 0 replies; 20+ messages in thread
From: Jan Kiszka @ 2022-01-07 13:46 UTC (permalink / raw)
  To: Alice Ferrazzi; +Cc: cip-dev

On 07.01.22 14:40, Alice Ferrazzi wrote:
> On Fri, Jan 7, 2022 at 8:18 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> On 07.01.22 11:23, Alice Ferrazzi wrote:
>>> On Fri, Jan 7, 2022 at 7:07 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>>>
>>>> On 07.01.22 11:02, Alice Ferrazzi wrote:
>>>>> On Thu, Jan 6, 2022 at 11:12 PM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>>>>>
>>>>>> On 06.01.22 12:16, Alice Ferrazzi wrote:
>>>>>>> enable CIP core image KernelCI to be built with gitlab pipeline
>>>>>>> and uploaded to the KernelCI storage using KernelCI API.
>>>>>>> enable cip-core-image-kernelci to be built for amd64, arm and arm64.
>>>>>>>
>>>>>>> Signed-off-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
>>>>>>> ---
>>>>>>>  .gitlab-ci.yml | 40 +++++++++++++++++++++++++++++++++++++++-
>>>>>>>  1 file changed, 39 insertions(+), 1 deletion(-)
>>>>>>>
>>>>>>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
>>>>>>> index e7db8c1..784343b 100644
>>>>>>> --- a/.gitlab-ci.yml
>>>>>>> +++ b/.gitlab-ci.yml
>>>>>>> @@ -9,6 +9,7 @@ variables:
>>>>>>>    targz: disable
>>>>>>>    dtb: none
>>>>>>>    deploy: enable
>>>>>>> +  deploy_kernelci: disable
>>>>>>>
>>>>>>>  stages:
>>>>>>>    - build
>>>>>>> @@ -37,7 +38,8 @@ default:
>>>>>>>      - if [ "${release}" = "bullseye" ]; then base_yaml="${base_yaml}:kas/opt/bullseye.yml"; fi;
>>>>>>>      - echo "Building ${base_yaml}"
>>>>>>>      - kas build ${base_yaml}
>>>>>>> -    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi
>>>>>>> +    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG}; fi;
>>>>>>> +    - if [ "${deploy_kernelci}" = "enable" ]; then scripts/deploy-kernelci.py ${release} ${target} ${extension} ${dtb}; fi
>>>>>>
>>>>>> Does gitlab-ci forces us to add that closing ; to the last-but-one
>>>>>> command? If so, better add it to the new from the beginning.
>>>>>>
>>>>>
>>>>> I'm just following the syntax that is already there.
>>>>> The gitlab-ci.yml file syntax preceding my commit is also doing same
>>>>> thing of adding that closing ; to the last-but-one command.
>>>>> You can check it here
>>>>> https://gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/.gitlab-ci.yml#L40
>>>>>
>>>>
>>>> Then, if the closing semicolon is needed, add it to the new line as well
>>>> to avoid having to touch that when adding the next one.
>>>
>>> sorry I'm not understanding what you want me to do.
>>> The closing semicolon is needed to the last-but-one command.
>>> Adding it to the last command break the script.
>>>
>>
>> Are you really sure about the closing semicolon?
>>
>> https://gitlab.com/jan-kiszka/ci-test/-/jobs/1951623081
>> https://gitlab.com/jan-kiszka/ci-test/-/blob/semicolon/.gitlab-ci.yml
> 
> you are right. I just checked my pipeline backlog and found that some
> months ago,
> I just checked for both without ; and not the case of both having it.
> Still we are changing the syntax already present and used.
> is it ok to use a new syntax? if is ok I can send a revision.
> 

I've sent a patch that removes the superfluous semicolons, you were on
CC. Just rebase on top and follow that new pattern.

Thanks,
Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-01-07 13:47 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06 11:16 [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Alice Ferrazzi
2022-01-06 11:16 ` [isar-cip-core][PATCH 1/4] Add cip-core-image-kernelci Alice Ferrazzi
2022-01-06 14:01   ` Jan Kiszka
2022-01-07 10:16     ` Alice Ferrazzi
2022-01-06 11:16 ` [isar-cip-core][PATCH 2/4] Add dmesg filter needed for lava test result Alice Ferrazzi
2022-01-06 11:16 ` [isar-cip-core][PATCH 3/4] Add script deploy-kernelci.py for upload the cip-core-image-kernelci Alice Ferrazzi
2022-01-06 11:16 ` [isar-cip-core][PATCH 4/4] enable cip-core-image-kernelci Alice Ferrazzi
2022-01-06 14:12   ` Jan Kiszka
2022-01-07 10:02     ` Alice Ferrazzi
2022-01-07 10:07       ` Jan Kiszka
2022-01-07 10:23         ` Alice Ferrazzi
2022-01-07 11:18           ` Jan Kiszka
2022-01-07 13:40             ` Alice Ferrazzi
2022-01-07 13:46               ` Jan Kiszka
2022-01-06 13:43 ` [isar-cip-core][PATCH 0/4] Add cip-core-image-kernelci building and uploading system Jan Kiszka
2022-01-06 14:18 ` Jan Kiszka
2022-01-07  9:57   ` Alice Ferrazzi
2022-01-07 10:10     ` Jan Kiszka
2022-01-07 10:20       ` Alice Ferrazzi
     [not found]       ` <CANgtXuPc0_27ZCR7au1e-C3y+-7De-nZQ2ddmjKAinT7Cm09_A@mail.gmail.com>
2022-01-07 10:22         ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.