jenkinsci / jenkinsci/gitlab-plugin
Gitlab integration with Jenkins for pipeline as code
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 615
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 10
Description
Its not an Issue but kind of help required to implement the plugin. Currently, I am using a Jenkins file for my pipeline.
import hudson.model.*
import hudson.EnvVars
@Library('pipeline-library')_
stage('Tag SVN') {
node('build01') {
if ("${env.TagBuild}" == 'true'){
bat 'svn copy -r HEAD %RepoURL% %RepoTagsURL%/%RepoTagName% -m "Tagging at Revision"'
}
}
}
stage('Checkout') {
node('build01') {
if ("${env.Build_APP}" == 'true') {
ws('c:\\Dev') {
svnCheckout('${RepoURL}')
}
}
}
}
stage('Build and Import DAR') {
node('build01') {
if ("${env.Build_APP}" == 'true') {
visBuild3("C:\\Dev\\scripts\\Component.bld")
}
}
}
stage('Deploy') {
node('build01') {
if ("${env.Build_Common}" == 'true') {
script {
env.buildNumber = "${TagVersion}.Build${env.BUILD_NUMBER}_${ComponentTagName}"
env.packageid = "Applications/common/${env.buildNumber}"
}
xldDeploy serverCredentials: 'username', environmentId: 'Environments/AWS/Dev_Test_Envs/SysTest1/SysTest1_WildFly', packageId: env.packageid
}
}
}
}
It is working perfectly. Currently, I am using groovy to checkout code from SVN.
svnCheckout('${RepoURL}')
But I want to make this working for Gitlab. I have gone through a lot of documentation but everywhere they have integrated for freestyle project, not for the pipeline as code.
I found this document a little bit helpful but It confused me with so many options.
https://github.com/jenkinsci/gitlab-plugin#global-plugin-configuration
I am looking to start with the simple flow I want to trigger a build whenever I do commit on the git project and get the status of the Jenkins build. Could some please help me if you have any such article or guide me from where should I start?
Contributor guide
Assessment
This issue has not been assessed yet.