Skip to content

Commit

Permalink
ci: pre-commit stage within Jenkins (#32839) (#32880)
Browse files Browse the repository at this point in the history
(cherry picked from commit a659f8b)

Co-authored-by: Victor Martinez <[email protected]>
  • Loading branch information
mergify[bot] and v1v authored Aug 26, 2022
1 parent fe210d4 commit d9e8e47
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 28 deletions.
1 change: 0 additions & 1 deletion .github/workflows/opentelemetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ on:
- x-pack-metricbeat
- x-pack-osquerybeat
- x-pack-packetbeat
- pre-commit
- check-default
- check-docs
types: [completed]
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/pre-commit.yml

This file was deleted.

12 changes: 12 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,21 @@ def runChecks() {
mapParallelTasks["${k}"] = v
}
}
// Run pre-commit within the current node and in Jenkins
// hence there is no need to use docker login in the GitHub actions
// some docker images are hosted in an internal docker registry.
mapParallelTasks['pre-commit'] = runPreCommit()
parallel(mapParallelTasks)
}

def runPreCommit() {
return {
withGithubNotify(context: 'Check pre-commit', tab: 'tests') {
preCommit(commit: "${GIT_BASE_COMMIT}", junit: true)
}
}
}

def runBuildAndTest(Map args = [:]) {
def filterStage = args.get('filterStage', 'mandatory')
deleteDir()
Expand Down

0 comments on commit d9e8e47

Please sign in to comment.