Commit f7669bde authored by Philippe Caseiro's avatar Philippe Caseiro
Browse files

Adding Jenkinsfile for CI testing

parent b6cd32f3
pipeline {
agent {
dockerfile {
filename 'Dockerfile'
dir 'ci'
}
}
triggers {
gitlab(
triggerOnPush: true,
triggerOnMergeRequest: true,
branchFilterType: 'All',
cancelPendingBuildsOnUpdate: false
)
}
options {
gitLabConnection('Gitlab MIM')
gitlabBuilds(builds: ['Linting documentation'])
}
stages {
stage('Building Zephir application') {
steps {
script {
try {
sh './compose/zephir-compose --clone --base src --helpers -- up --build -d'
updateGitlabCommitStatus name: STAGE_NAME, state: 'success'
} catch (Exception e) {
currentBuild.result = 'UNSTABLE'
updateGitlabCommitStatus name: STAGE_NAME, state: 'failed'
}
}
}
}
}
post {
always {
rocketSend (
avatar: 'http://195.221.237.17/static/b5f67753/images/headshot.png',
message: """
${env.JOB_NAME}/${env.BUILD_ID}: ${currentBuild.currentResult}
${env.RUN_DISPLAY_URL}
@here
""".stripIndent(),
rawMessage: true
)
emailext (
subject: "[${currentBuild.currentResult}] - ${env.JOB_NAME}/${env.BUILD_NUMBER}",
body: """
${env.RUN_DISPLAY_URL}
""".stripIndent(),
recipientProviders: [developers(), requestor()],
)
}
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment