| |
@@ -174,7 +174,7 @@
|
| |
echo "Deleting project ${projectName}..."
|
| |
projectSelector.delete()
|
| |
timeout(time: 5, unit: 'MINUTES') {
|
| |
- while(openshift.selector('project', projectName).count() == 1) {
|
| |
+ while(projectsSelector.names().contains("project/" + projectName)) {
|
| |
echo "Project ${projectName} is still available, waiting"
|
| |
sleep(time:2, unit:"SECONDS")
|
| |
}
|
| |
Using count() on project which does not exist returns exception because
user is forbidden to access the project resource - it is not possible to
detect if project does not exist or user does not have access to
project.
Checking list of available project instead counting project. Selector is
dynamically updated each call.