Advertisement
argamanza

Untitled

May 12th, 2019
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.74 KB | None | 0 0
  1. pipeline {
  2.     agent any
  3.  
  4.  
  5.     options {
  6.       gitLabConnection('gitlab')
  7.     }
  8.     triggers {
  9.         gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')
  10.     }
  11.  
  12.     stages {
  13.         stage('Build') {
  14.             steps {
  15.                 echo 'Building..'
  16.             }
  17.         }
  18.         stage('Test') {
  19.             steps {
  20.                 echo 'Testing..'
  21.             }
  22.         }
  23.         stage('Deploy') {
  24.             steps {
  25.                 echo 'Deploying....'
  26.             }
  27.         }
  28.     }
  29.  
  30.     post {
  31.       failure {
  32.         updateGitlabCommitStatus name: 'build', state: 'failed'
  33.       }
  34.       success {
  35.         updateGitlabCommitStatus name: 'build', state: 'success'
  36.       }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement