osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/38358?usp=email )
Change subject: jobs/build-kernels-testenv: add build-kernel-none ......................................................................
jobs/build-kernels-testenv: add build-kernel-none
Create a dummy output/linux file, that the jobs generated by ttcn3-testsuites-testenv can copy (via copyartifact) when setting the kernel to "none".
Without this, the ttcn3-testsuites-testenv.yml would need to become more complex, as it is not possible in jenkins job builder templates to only do the copyartifact block conditionally if kernel != "none".
Another solution would be using shell logic like the following:
if [ "$KERNEL" != "none" ]; then wget -q -O .linux "https://jenkins.osmocom.org/..." fi
But this has the disadvantage that jenkins is not aware of the file and therefore we cannot track easily which linux kernel build was used in the job. With the copyartifact method, we can click on "See Fingerprints" and find which job built the kernel. Example: https://jenkins.osmocom.org/jenkins/job/ttcn3-ggsn-test-kernel-net-next/147/...
Change-Id: I0b2367558a2b73c06267bc65f17cfcc224f35002 --- M jobs/build-kernels-testenv.yml 1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/58/38358/1
diff --git a/jobs/build-kernels-testenv.yml b/jobs/build-kernels-testenv.yml index 20dfc0f..cde1706 100644 --- a/jobs/build-kernels-testenv.yml +++ b/jobs/build-kernels-testenv.yml @@ -81,3 +81,27 @@ wrappers: - ansicolor: colormap: xterm + +- job: + name: 'build-kernel-none' + project-type: freestyle + defaults: global + description: | + Dummy job to allow specifying "none" as kernel in + <a href="https://gitea.osmocom.org/osmocom/osmo-ci/src/branch/master/jobs/ttcn3-testsuites-testenv.yml">ttcn3-testsuites-testenv.yml</a>. + node: "osmocom-master" + builders: + - shell: |- + mkdir output + echo "dummy from build-kernel-none jenkins job" > output/linux + publishers: + - archive: + allow-empty: false + artifacts: output/**/* + case-sensitive: true + default-excludes: true + fingerprint: false + only-if-success: false + properties: + - build-discarder: + num-to-keep: 10