-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make ODS pipeline configurable for MRO #97
Comments
Plan sounds good 👍 |
Implemented first version which allows me to run following Jenkinsfile for testing: def final projectId = 'project13'
def final componentId = 'component123'
def final credentialsId = "${projectId}-cd-cd-user-with-password"
def sharedLibraryRepository
def dockerRegistry
def multiRepoBuild
node {
sharedLibraryRepository = env.SHARED_LIBRARY_REPOSITORY
dockerRegistry = env.DOCKER_REGISTRY
multiRepoBuild = !!env.MULTI_REPO_BUILD
}
library identifier: 'ods-library@production', retriever: modernSCM(
[$class: 'GitSCMSource',
remote: sharedLibraryRepository,
credentialsId: credentialsId])
def configMap = [
image: "${dockerRegistry}/cd/jenkins-slave-golang",
projectId: projectId,
componentId: componentId,
branchToEnvironmentMapping: [
'master': 'test',
'*': 'dev'
]
]
if (multiRepoBuild) {
configMap.displayNameUpdateEnabled = false
configMap.localCheckoutEnabled = false
configMap.bitbucketNotificationEnabled = false
configMap.ciSkipEnabled = false
configMap.cloneSourceEnv = false
}
odsPipeline(configMap) { context ->
//...
} |
Assumption ist that a MRO sets an environment variable called MULTI_REPO_BUILD |
Hmm - what do you think about hiding all of this inside the shared lib? You can read the environment variables inside (we only read |
Yes, I think in that direction, too. My only counter argument is that in
this case we access a "magic variable" (MULTI_REPO_BUILD) that does not
exist in ODS at the moment.
Am Mi., 17. Juli 2019 um 17:19 Uhr schrieb Michael Sauter <
notifications@github.com>:
… Hmm - what do you think about hiding all of this inside the shared lib?
You can read the environment variables inside (we only read
SHARED_LIBRARY_REPOSITORY and DOCKER_REGISTRY because we need them before
we have the shared lib), and then you can disable inside the lib. That way,
we do not need to touch all the Jenkinsfiles out there and we do not need
to have all this extra code in each file, making it hard to update.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#97?email_source=notifications&email_token=AALWPCXENP6OCRJWP2IDON3P742AHA5CNFSM4IEAG3J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2EWQ2Q#issuecomment-512321642>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALWPCQSNZ6D6IHFQCRJVKTP742AHANCNFSM4IEAG3JQ>
.
|
I'm okay with that. Maybe allow to also "enable MRO mode" by setting an option. |
@michaelsauter Found a solution that both is possible |
@michaelsauter @metmajer @tjaeschke how do we handle branch to environment mapping in MRO builds? Options:
|
+1 for option 2 |
I'd also let the orchestrating pipeline control where things should be deployed. |
Implemented option 2 |
Implemented approach: Assumptions, Limitations, Deviations
MRO build configuration
|
If I understand correctly, this has been merged by now by another PR. Closing this - @ungerts reopen if you think this is not completed yet. |
Co-authored-by: Martin Etmajer <martin.etmajer@boehringer-ingelheim.com>
Multi repository orchestration (MRO) requires to checkout an ODS component/repository
within a top level pipeline and to load/execute its Jenkinsfile dynamically. Example:
In order to allow orchestration the ODS pipeline should be more configurable:
are send by the top level pipeline.
Jenkinsfile and should not overwrite the build's display name.
PoC (working in progress) can be found here: https://github.com/ungerts/ods-jenkins-shared-library/tree/experimental/mro
The text was updated successfully, but these errors were encountered: