##// END OF EJS Templates
Added tag v1.3.0 for changeset 5e6d0e24a5d2
Added tag v1.3.0 for changeset 5e6d0e24a5d2

File last commit:

r14:ab28d6aa054e v1.2.1 default
r20:bda3064b1cec default
Show More
bundle.md
57 lines | 1.4 KiB | text/x-minidsrc | MarkdownLexer

Creating bundle from images

NAME

Save set of images to the single archive.

SYNOPSIS

plugins {
    // task types and base extension
    id "org.implab.gradle-container-base"
}

container {
    cliCmd = "podman"
}

// create configuration
configurations {
    bundleImages {
        canBeResolved = true
        canBeConsumed = false
    }
}

// add dependencies to the project
dependencies {
    bundleImages project(":images:foo"), project(":images:bar")
}

// create task to export bundle
task bundle(type: SaveImage) {
    // add image refs from artifacts
    imageRefs configurations.bundleImages

    // add image name
    exportImages.add "nginx:latest"
}

DESCRIPTION

To create an archive with images the task of type SaveImage can be used. This task has the following properties:

Property Description
archiveFileName The file name of the bundle archive, defaults to {archiveBaseName}-{archiveVersion}-{archiveClassifier}.{archiveExtension}.
archiveBaseName The base name of the archive, defaults to {project.group}-{project.name}.
archiveVersion The archive version, defaults to {project.version}.
exportImages A set of image names to include in the bundle.
Method Description
imageRefs(FileCollection) Adds a set of files with image refs to add to the bundle.
imageRef(File) Adds an image name from the file with image reference.