Skip to content

Commit

Permalink
ci: pre-commit stage within Jenkins (#32839)
Browse files Browse the repository at this point in the history
(cherry picked from commit a659f8b)
  • Loading branch information
v1v authored and mergify[bot] committed Aug 26, 2022
1 parent ecdd50e commit f95b21f
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 runLinting() {
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 f95b21f

Please sign in to comment.