refactor: work with new docker lib
ci/woodpecker/push/docs Pipeline was successful
Details
ci/woodpecker/push/lint Pipeline was successful
Details
ci/woodpecker/push/arch Pipeline was successful
Details
ci/woodpecker/push/build Pipeline was successful
Details
ci/woodpecker/push/test Pipeline was successful
Details
ci/woodpecker/push/man Pipeline was successful
Details
ci/woodpecker/push/docker Pipeline was successful
Details
ci/woodpecker/push/deploy Pipeline was successful
Details
ci/woodpecker/push/docs Pipeline was successful
Details
ci/woodpecker/push/lint Pipeline was successful
Details
ci/woodpecker/push/arch Pipeline was successful
Details
ci/woodpecker/push/build Pipeline was successful
Details
ci/woodpecker/push/test Pipeline was successful
Details
ci/woodpecker/push/man Pipeline was successful
Details
ci/woodpecker/push/docker Pipeline was successful
Details
ci/woodpecker/push/deploy Pipeline was successful
Details
parent
b5ff50066b
commit
5176266ca1
|
@ -99,7 +99,7 @@ fn (mut m ImageManager) clean_old_images() {
|
||||||
// wasn't deleted. Therefore, we move the index over. If the function
|
// wasn't deleted. Therefore, we move the index over. If the function
|
||||||
// returns true, the array's length has decreased by one so we don't
|
// returns true, the array's length has decreased by one so we don't
|
||||||
// move the index.
|
// move the index.
|
||||||
dd.remove_image(m.images[image][i]) or {
|
dd.image_remove(m.images[image][i]) or {
|
||||||
// The image was removed by an external event
|
// The image was removed by an external event
|
||||||
if err.code() == 404 {
|
if err.code() == 404 {
|
||||||
m.images[image].delete(i)
|
m.images[image].delete(i)
|
||||||
|
|
|
@ -57,7 +57,7 @@ pub fn create_build_image(base_image string) !string {
|
||||||
image_tag := if image_parts.len > 1 { image_parts[1] } else { 'latest' }
|
image_tag := if image_parts.len > 1 { image_parts[1] } else { 'latest' }
|
||||||
|
|
||||||
// We pull the provided image
|
// We pull the provided image
|
||||||
dd.pull_image(image_name, image_tag)!
|
dd.image_pull(image_name, image_tag)!
|
||||||
|
|
||||||
id := dd.container_create(c)!.id
|
id := dd.container_create(c)!.id
|
||||||
// id := docker.create_container(c)!
|
// id := docker.create_container(c)!
|
||||||
|
@ -79,7 +79,7 @@ pub fn create_build_image(base_image string) !string {
|
||||||
// TODO also add the base image's name into the image name to prevent
|
// TODO also add the base image's name into the image name to prevent
|
||||||
// conflicts.
|
// conflicts.
|
||||||
tag := time.sys_mono_now().str()
|
tag := time.sys_mono_now().str()
|
||||||
image := dd.create_image_from_container(id, 'vieter-build', tag)!
|
image := dd.image_from_container(id, 'vieter-build', tag)!
|
||||||
dd.container_remove(id)!
|
dd.container_remove(id)!
|
||||||
|
|
||||||
return image.id
|
return image.id
|
||||||
|
|
|
@ -26,7 +26,7 @@ fn build(conf Config, target_id int, force bool) ! {
|
||||||
dd.close() or {}
|
dd.close() or {}
|
||||||
}
|
}
|
||||||
|
|
||||||
dd.remove_image(image_id)!
|
dd.image_remove(image_id)!
|
||||||
|
|
||||||
println('Uploading logs to Vieter...')
|
println('Uploading logs to Vieter...')
|
||||||
c.add_build_log(target.id, res.start_time, res.end_time, build_arch, res.exit_code,
|
c.add_build_log(target.id, res.start_time, res.end_time, build_arch, res.exit_code,
|
||||||
|
|
|
@ -269,6 +269,6 @@ fn (mut d Daemon) clean_old_base_images() {
|
||||||
// wasn't deleted. Therefore, we move the index over. If the function
|
// wasn't deleted. Therefore, we move the index over. If the function
|
||||||
// returns true, the array's length has decreased by one so we don't
|
// returns true, the array's length has decreased by one so we don't
|
||||||
// move the index.
|
// move the index.
|
||||||
dd.remove_image(d.builder_images[i]) or { i += 1 }
|
dd.image_remove(d.builder_images[i]) or { i += 1 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue