mirror of
https://github.com/valitydev/wazuh-docker.git
synced 2024-11-06 01:35:18 +00:00
27dc788514
* Add o365 script * Add Jenkinsfile
42 lines
995 B
Groovy
42 lines
995 B
Groovy
#!groovy
|
|
// -*- mode: groovy -*-
|
|
|
|
build('wazuh-docker', 'docker-host') {
|
|
checkoutRepo()
|
|
loadBuildUtils()
|
|
|
|
def pipeDefault
|
|
def withWsCache
|
|
runStage('load pipeline') {
|
|
env.JENKINS_LIB = "build_utils/jenkins_lib"
|
|
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
|
|
withWsCache = load("${env.JENKINS_LIB}/withWsCache.groovy")
|
|
}
|
|
|
|
pipeDefault() {
|
|
runStage('build wazuh image') {
|
|
sh "cd wazuh && make build_image"
|
|
}
|
|
runStage('build kibana image') {
|
|
sh "cd kibana && make build_image"
|
|
}
|
|
try {
|
|
if (masterlikeBranch()) {
|
|
runStage('push wazuh image') {
|
|
sh "cd wazuh && make push_image"
|
|
}
|
|
runStage('push kibana image') {
|
|
sh "cd kibana && make push_image"
|
|
}
|
|
}
|
|
} finally {
|
|
runStage('rm wazuh local image') {
|
|
sh 'cd wazuh && make rm_local_image'
|
|
}
|
|
runStage('rm kibana local image') {
|
|
sh 'cd kibana && make rm_local_image'
|
|
}
|
|
}
|
|
}
|
|
}
|