Answer the question
In order to leave comments, you need to log in
Jenkins Pipeline - where do you store your Jenkinsfile?
Hello
gentlemen, I have a question. Hope you share your experience.
We start new projects with all kinds of automation of the release process, as well as everyday routines.
Therefore, there are several Jenkins-pipelines files. Two files Jenkins-feature and Jenkins-release belong to the project, there are also several common ones that just lie in a separate repository.
[b]Question: How and where do you store your Jenkinsfile-s? For some reason, I want to load all the pipelines into one repository and that's it. So that there is no part in the project, and part is not. Yes, and it seems that the project is one thing, but how we release it is a little different ... But on the other hand, in many examples, the Jenkinsfile is in the root directory of the project ... [/b]
Pros: if Jenkinsfile is in the project, we save one step. Jenkins Pipeline automatically pulls the project.
Cons: you need to additionally pull the project and a few more, which are quite difficult to explain
stage('Project Checkout Stage') {
steps {
stepInfo("${PROJECT}/${REPOSITORY}/${BRANCH} Checkout Stage START")
git url: 'https://scm/${PROJECT}/${REPOSITORY}.git', branch: '${BRANCH}', credentialsId: 'bla'
stepInfo("${PROJECT}/${REPOSITORY}/${BRANCH} Checkout END")
}
}
Answer the question
In order to leave comments, you need to log in
We store all Jenkins files in a separate repository. Each job has its own file.
Already in the file we write what to upload from and how to collect
. There are no special minuses. One more request to the repository? Well, so-so "minus"
From the pluses - versioning of the jenkins file and safety
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question