FYI I just renamed the dir:
root@crystal /srv/cci# mv config build-config
Thanks, Fengguang
On Sat, Dec 19, 2020 at 11:16:32AM +0800, Cao Xueliang wrote:
pls ignored this patch.
Thanks, Xueliang
On Sat, Dec 19, 2020 at 11:13:16AM +0800, Cao Xueliang wrote:
When build-pkg job has config in job.yaml need support cci/config dir read and write.
Signed-off-by: Cao Xueliang caoxl78320@163.com
container/result-webdav/start | 1 + src/lib/job.cr | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/container/result-webdav/start b/container/result-webdav/start index bbbbb24..a719806 100755 --- a/container/result-webdav/start +++ b/container/result-webdav/start @@ -21,6 +21,7 @@ cmd=( -v /etc/localtime:/etc/localtime:ro -v /srv/result/:/srv/result/ -v /srv/initrd/:/srv/initrd/
- -v /srv/cci/config/:/srv/cci/config/ result-webdav
)
diff --git a/src/lib/job.cr b/src/lib/job.cr index a23475d..85159f5 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -233,18 +233,27 @@ class Job set_upload_dirs() end
- def set_upload_dirs
- def get_package_dir
- if @hash["cci-makepkg"]? or @hash["cci-depends"]? or @hash["build-pkg"]?
common_dir = "#{os_mount}/#{os}/#{os_arch}/#{os_version}"
- end
- if @hash["cci-makepkg"]?
package_dir = ",/initrd/pkg"
elsif @hash["cci-depends"]?package_dir = ",/initrd/pkg/#{common_dir}/#{@hash["cci-makepkg"]["benchmark"]}"
package_dir = ",/initrd/deps"
elsif @hash["build-pkg"]?package_dir = ",/initrd/deps/#{common_dir}/#{@hash["cci-depends"]["benchmark"]}"
package_dir = ",/initrd/build-pkg"
package_dir = ",/initrd/build-pkg/#{common_dir}/#{@hash["pkgbuild_repo"].split("/")[-1]}"
else package_dir = "" endpackage_dir += ",/cci/config" if @hash["config"]?
- self["upload_dirs"] = "#{result_root}#{package_dir}"
return package_dir
end
def set_upload_dirs
self["upload_dirs"] = "#{result_root}#{get_package_dir}" end
private def set_result_service
-- 2.23.0