Skip to content

Conversation

@driazati
Copy link
Member

@driazati driazati commented Mar 10, 2022

This doesn't change any functionality but cleans up how we define things in CI by factoring out the common steps into a function. There are several instances were we weren't marking things skipped consistently or applying timeouts, so this should make that easier. There are also some random style changes to make groovylint happy

cc @areusch

@driazati driazati force-pushed the clean_jenkins branch 4 times, most recently from 9d24a61 to d9d2c70 Compare March 10, 2022 23:38
@driazati driazati changed the title [wip] Clean up Jenkinsfile [ci] Clean up Jenkinsfile Mar 11, 2022
@driazati driazati marked this pull request as ready for review March 11, 2022 00:41
@driazati driazati requested a review from a team as a code owner March 11, 2022 00:41
@github-actions github-actions bot requested review from areusch and removed request for a team March 11, 2022 00:42
@areusch
Copy link
Contributor

areusch commented Mar 15, 2022

i think i still prefer the templated approach here, to be honest. while i think that logic like this eases high-level comprehension, it adds another layer of abstraction over what Jenkins is actually doing, so it makes it harder to debug problems:

    if (args.condition) {
      node(args.node_type) {
        ws(per_exec_ws(args.ws_name)) {
          timeout(time: max_time, unit: 'MINUTES') {
            init_git()
            if (args.junit) {
              try {
                args.script()
              } finally {
                junit 'build/pytest-results/*.xml'
              }
            } else {
              args.script()
            }
          }
        }
      }
    } else {
      Utils.markStageSkippedForConditional(args.name)
    }
  }
}

perhaps we could reconsider this as a templated approach once #10425 lands?

@areusch
Copy link
Contributor

areusch commented Mar 15, 2022

er I should have said now that #10425 has landed.

@driazati driazati closed this Mar 16, 2022
@driazati driazati reopened this Mar 16, 2022
@driazati driazati closed this Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants