Skip to content

Commit

Permalink
fix 'enable'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Dubman committed Apr 9, 2021
1 parent f351292 commit dd78c68
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 12 additions & 1 deletion .ci/examples/job_matrix_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,15 @@ steps:
run: |
hostname
env
- name: step4-disabled
enable: false
run: |
hostname
env
- name: step5-enabled
enable: true
run: |
hostname
env
6 changes: 3 additions & 3 deletions src/com/mellanox/cicd/Matrix.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ def stringToList(selector) {

def check_skip_stage(image, config, title, oneStep, axis) {

def stepEnabled = getConfigVal(config, ['enable'], true, true, oneStep, true) + ''
def stepEnabled = getConfigVal(config, ['enable'], true, true, oneStep, true).toString()

if (stepEnabled == 'false') {
if (!stepEnabled.toBoolean()) {
config.logger.trace(2, "Step '${oneStep.name}' is disabled in project yaml file, skipping")
return true
}
Expand Down Expand Up @@ -680,7 +680,7 @@ spec:

@NonCPS
def replaceVars(vars, str) {
def res = str
def res = str.toString()

for (def entry in entrySet(vars)) {

Expand Down

0 comments on commit dd78c68

Please sign in to comment.