Update Jenkinsfile
This commit is contained in:
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@@ -3,15 +3,23 @@
|
|||||||
// Reference the GitLab connection name from your Jenkins Global configuration (https://JENKINS_URL/configure, GitLab section)
|
// Reference the GitLab connection name from your Jenkins Global configuration (https://JENKINS_URL/configure, GitLab section)
|
||||||
properties([gitLabConnection('test-gitlab-hook')])
|
properties([gitLabConnection('test-gitlab-hook')])
|
||||||
|
|
||||||
node {
|
properties([
|
||||||
checkout scm // Jenkins will clone the appropriate git branch, no env vars needed
|
gitLabConnection('test-gitlab-hook'),
|
||||||
|
pipelineTriggers([
|
||||||
// Further build steps happen here
|
[
|
||||||
}
|
$class : 'GitLabPushTrigger',
|
||||||
|
triggerOnPush : true,
|
||||||
|
triggerOnMergeRequest: true,
|
||||||
|
]
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
stages {
|
stages {
|
||||||
|
stage('Checkout') {
|
||||||
|
checkout scm
|
||||||
|
}
|
||||||
stage('test') {
|
stage('test') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
|
|||||||
Reference in New Issue
Block a user