pls ignored this patch.
Thanks, Xueliang
On Sat, Dec 19, 2020 at 02:02:49PM +0800, Cao Xueliang wrote:
When build-pkg job has config in job.yaml need support cci/build-config dir write.
Signed-off-by: Cao Xueliang caoxl78320@163.com
container/result-webdav/start | 1 + src/lib/job.cr | 25 ++++++++++++++++++++----- 2 files changed, 21 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..d5e8ad5 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -233,18 +233,33 @@ class Job set_upload_dirs() end
- def set_upload_dirs
- def get_package_dir
- if @hash["cci-makepkg"]? || @hash["cci-depends"]? || @hash["build-pkg"]?
mount_type = os_mount == "cifs" ? "nfs" : os_mount.dup
common_dir = "#{mount_type}/#{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"
if @hash["pkgbuild_repo"].to_s =~ /(packages|community)\/\//
package_name = @hash["pkgbuild_repo"].to_s.split("/")[-2]
else
package_name = @hash["pkgbuild_repo"].to_s.split("/")[-1]
end
package_dir = ",/initrd/build-pkg/#{common_dir}/#{package_name}"
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