Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need job helper <create cpio from job.yaml>: create-job-cpio.sh #15

Open
kiddy818 opened this issue Apr 13, 2020 · 0 comments
Open

need job helper <create cpio from job.yaml>: create-job-cpio.sh #15

kiddy818 opened this issue Apr 13, 2020 · 0 comments

Comments

@kiddy818
Copy link

#!/bin/bash -e

: ${LKP_SRC:=/c/lkp-tests}

job_yaml=$1
job_name=${job_yaml##*/}
out_cgz=$(dirname $(realpath $job_yaml))/${job_name%.yaml}.cgz

tmp_dir=/tmp/$$
lkp_dir=$tmp_dir/lkp/scheduled

mkdir -p $lkp_dir
cp $job_yaml $lkp_dir
$LKP_SRC/sbin/job2sh $job_yaml -o $lkp_dir/${job_name%.yaml}.sh

cd $tmp_dir
find lkp | cpio --quiet -o -H newc | gzip > $out_cgz

rm -fr $tmp_dir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant