From 9fb3cfce0196f3ce1f05aa68f2f5cad1bdd2235f Mon Sep 17 00:00:00 2001 From: Nana Janashia Date: Sun, 21 Mar 2021 08:53:32 +0000 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8d467ab..d90f787 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,15 +3,23 @@ // Reference the GitLab connection name from your Jenkins Global configuration (https://JENKINS_URL/configure, GitLab section) properties([gitLabConnection('test-gitlab-hook')]) -node { - checkout scm // Jenkins will clone the appropriate git branch, no env vars needed - - // Further build steps happen here -} +properties([ + gitLabConnection('test-gitlab-hook'), + pipelineTriggers([ + [ + $class : 'GitLabPushTrigger', + triggerOnPush : true, + triggerOnMergeRequest: true, + ] + ]) +]) pipeline { agent any stages { + stage('Checkout') { + checkout scm + } stage('test') { steps { script {