Open dtschan opened 3 years ago
Implement unit test for openshiftStartBuild step which tests:
Works whether oc is in PATH or not
If fromDir is provided:
oc start-build --from-dir=${fromDir} bc/${buildConfigName}
Else if fromFile is provided:
oc start-build --from-file=${fromFile} bc/${buildConfigName}
Else
oc start-build bc/${buildConfigName}
Executes oc logs -f ${build} to wait for the build to complete, where build is the build object type and name returned by oc start-build.
oc logs -f ${build}
oc start-build
Fails the Jenkins build when the OpenShift build fails, i.e. the builds object .status.phase field is Failed.
.status.phase
Failed
First tests implemented with #43
Implement unit test for openshiftStartBuild step which tests:
Works whether oc is in PATH or not
If fromDir is provided:
oc start-build --from-dir=${fromDir} bc/${buildConfigName}
Else if fromFile is provided:
oc start-build --from-file=${fromFile} bc/${buildConfigName}
Else
oc start-build bc/${buildConfigName}
Executes
oc logs -f ${build}
to wait for the build to complete, where build is the build object type and name returned byoc start-build
.Fails the Jenkins build when the OpenShift build fails, i.e. the builds object
.status.phase
field isFailed
.