Skip to content

[1.0.7] untilEach watch closure fails to watch Build with Docker source and postCommit hook #140

Description

@arnaud-deprez

Hi,

I could reproduce it on Openshift v3.9.0 (minishift) with the default jenkins (jenkins-client-plugin:1.0.7)

It might be related to #130 but I'm not sure.

Typically, I have in my jenkins pipeline a script like:

openshift.withCluster() {
  openshift.withProject(project) {
    def build = openshift.process(readFile("$image/openshift/build-template.yml"))
    def buildDockerConfig = openshift.apply(build).narrow('bc')
    echo "Start building docker image: $image"
    def buildSelector = buildDockerConfig.startBuild("--from-dir=$image")
    timeout(time: 10, unit: 'MINUTES') {
      buildSelector.untilEach(1) {
        return it.object().status.phase == "Complete"
      }
    }
  }
}

While this is working with regular openshift docker build strategy, it fails if I add a postCommit hook.

When it fails, I got a:

java.lang.InterruptedException: sleep interrupted

Any idea ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions