pipeline {
agent {
- kubernetes agentsetup(containers: 'java8')
+ kubernetes agentsetup(containers: 'java8,kaniko')
}
options {
disableConcurrentBuilds()
stage('Main') {
steps {
sh """
- mvn install
+ #No longer building the code since cling-core is no longer
+ #maintained
+ #mvn install
(
cd site
mvn -N -Ddistrib=/data/www/http.upnpmonitor.wamblee.org/ site site:deploy
)
"""
+ container('kaniko') {
+ sh """
+ echo 'Hello world'
+ /kaniko/executor --dockerfile Dockerfile \
+ --cache=true \
+ --cache-ttl=100000h \
+ --context \$( pwd ) \
+ --destination cat.wamblee.org/rockyrocks:${env.BRANCH_NAME}
+ """
+ }
}
}
}
+ post {
+ changed {
+ mail to: "jenkins@wamblee.org",
+ subject: "jenkins build:${currentBuild.currentResult}: ${env.JOB_NAME}",
+ body: "${currentBuild.currentResult}: Job ${env.JOB_NAME}\nMore Info can be found here: ${env.BUILD_URL}"
+ }
+ }
}