Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/org/istio/testutils/Utilities.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package org.istio.testutils

// Updates Pull Request
def updatePullRequest(flow, success = false) {
if (!getParam('UPDATE_PR', false)) return
def state, message
switch (flow) {
case 'run':
Expand All @@ -22,6 +23,18 @@ def updatePullRequest(flow, success = false) {
state: state)
}

def runStage(stage) {
stageToRun = getParam('STAGE', 'ALL')
if (this.stageToRun == 'ALL') {
// Stage starting with '_' should be called explicitly
if (stage.startsWith('_')) {
return false
}
return true
}
return stageToRun == stage
}

// Check parameter value and fails if null or empty
static def failIfNullOrEmpty(value, message) {
if (value == null || value == '') {
Expand Down