https://github.com/bzon/openshift-sample-jenkinsci
https://github.com/bzon/openshift-sample-jenkinsci
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bzon/openshift-sample-jenkinsci
- Owner: bzon
- Created: 2016-08-19T09:28:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-16T13:44:53.000Z (almost 10 years ago)
- Last Synced: 2025-01-22T08:28:31.337Z (over 1 year ago)
- Language: Groovy
- Size: 36.1 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# openshift-sample-jenkinsci
# Pre-requisite:
- Ensure that you have properly configured the Gitlab connnection in "Managed Jenkins" named the Gitlab Connection as "ADOP Gitlab".
- Ensure that the spring-petclinic project is pushed in Gitlab.
# SCM Checkout Style for different scenarios
- Checkout from Merge Request and merge with Master
```bash
checkout changelog: true, poll: true, scm: [$class: 'GitSCM', branches: [[name: "origin/${env.gitlabSourceBranch}"]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'PreBuildMerge', options: [fastForwardMode: 'FF', mergeRemote: 'origin', mergeStrategy: 'default', mergeTarget: "${env.gitlabTargetBranch}"]]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'adop-jenkins-master', name: 'origin', url: "${scmURL}"]]]
```
- Checkout from Push and merge with Master
```bash
checkout changelog: true, poll: true, scm: [$class: 'GitSCM', branches: [[name: "origin/${env.gitlabSourceBranch}"]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'PreBuildMerge', options: [fastForwardMode: 'FF', mergeRemote: 'origin', mergeStrategy: 'default', mergeTarget: "master"]]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'adop-jenkins-master', name: 'origin', url: "${scmURL}"]]]
```
- Checkout from Push
```bash
checkout([$class: 'GitSCM', branches: [[name: 'origin/${gitlabSourceBranch}']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'adop-jenkins-master', name: 'origin', refspec: '+refs/heads/*:refs/remotes/origin/* ', url: "${scmURL}" ]]])
```