[s2i build] how to customize output image tag ?

Solution In Progress - Updated -

Issue

  • In xpaas example templates (eg. eap64-basic-s2i.json), the tag of output imagestream s2i buildConfiguration is always "latest".
    eg:
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${APPLICATION_NAME}:latest"
                    }

In a template we can use a template parameter, but this parameter value will be hard-coded in the buildConfiguration, and will be the same for all build process.

How can we have another tag, which can be different on each build ?
For example, can we have a tag linked to version number of the application ?

Is there a way to push a parameter to a build process, parameter that can be used for the imagestream tag ?

  • I made some tests with the Jenkins sample job .. and it shows real opportunities.
    I have to step back to build the full puzzle.

One more question : how can we use binary build/deploy through Jenkins ?
(how to do something like "oc start-build numberguess-bin --from-dir=/tmp/numberguess-bin")

  • Using the oc command available within the jenkins image for binary builds, forces that these binary packages should be inside the jenkins pod/container ... not really satisfactory.
    Did I forget something else ?

Environment

  • Openshift Enterprise 3.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.