18
votes
Accepted
Which SCM tools does Jenkins support?
It supports AccuRev, CVS, Subversion, Git, Mercurial, Perforce, Clearcase and RTC.
For all of them exists a plugin and as you probably already know, Jenkins is not limited to only that list, anyone ...
16
votes
Accepted
Getting a single revision from Git
Shallow clone
You can indeed get a shallow clone out of Git using:
git clone --depth=1 <url>
This will still clone the repo and create a .git folder with the objects, only smaller in size (...
15
votes
Accepted
Where to put ansible-vault password
The idea is to put all our sensitive data [...]
The meaning of "all" in this sentence should be analyzed very carefully before implementing the solution that you plan.
Ansible vault is a very useful ...
14
votes
Accepted
How to resolve merge conflicts in Azure DevOps current UI
Try this solution: Pull Request Merge Conflict Extension. It helps to resolve conflicts inside the pull request page.
13
votes
Accepted
What is the difference between DevOps and GitOps?
GitOps is a technique of using Git to manage infrastructure provisioning and software deployments. This technique uses many of the features of Git such as Pull Requests to manage and trigger ...
11
votes
Accepted
What branching strategies/workflows are available for Git repositories?
The Atlassian website includes a comparison of different workflow strategies available when concerned with Git. More strategies exist, like the one used by Linux Kernel team, but are not relevant to ...
11
votes
Getting a single revision from Git
Don't deploy your git repo. Develop a real deployment methodology. Even if it's as simple as tarring up an archive (= building an artifact with just the necessary files in it to be deployed) of ...
11
votes
How to get rid of develop branch for simplified Git flow
Let's say you take out the master branch (you can rename develop to master to confuse your team if you like later) and simply use tags for releases either on develop or hotfix branches. You took out ...
11
votes
Jenkins shows the job as failed if there is nothing to commit to gitlab
In my automatic jenkins job, launched daily, if there are no changes the git commit command returns 1. That will mark the build as failed. To solve this problem I use these two commands in my shell ...
11
votes
Accepted
Where is the git submodule revision actually stored?
The .gitmodules file just records the path and remote URL to the submodule repository. The commit itself is stored in the tree object. You can query it like this:
git ls-tree <ref> <path>
...
10
votes
Where to put ansible-vault password
We are planning to use ansible vault in our project to prevent leaking passwords or keys in git.
Since you haven't yet implemented anything, you might reconsider this. Using a system like Ansible ...
10
votes
Accepted
Multi-language Monorepo
Monorepos have been getting a lot of attention in recent years since google popularized them. If you aren't on a similar scale as google it might not work out as well for you. I've been in a startup ...
9
votes
Which SCM tools does Jenkins support?
In addition to the list in the previous answer, there is also the plugin that integrates Serena Dimensions CM with Jenkins. Some more details about this plugin (from the linked page):
The plugin ...
9
votes
Git clean/smudge filters for ansible vault secrets
The problem here is caused by the random salt in ansible-vault encryption. You can hack VaultEditor class to pass the salt to it from an argument in ansible-vault. The random salt is generated in lib/...
9
votes
Accepted
Git Files Encryption for Business
There really is no way to take on your problem with git, which is to deny a developer with access to the code (required to work with it) the possibility to steal the code. This is because as soon as ...
8
votes
Accepted
How to get rid of develop branch for simplified Git flow
IMHO the problems you're facing are just a side effect of the poor branch strategy you started with: you're effectively plowing new development on develop (i.e. what converges towards the future ...
8
votes
Accepted
What is the exact use of DETACHED HEAD state in Git?
The "normal" way of working with GIT is by checking out branches. HEAD is a "pointer" to the latest commit in that branch, and GIT will allow you to commit new changes after that ...
7
votes
Accepted
Git & Jenkins: get latest green commit on branch
You don't make any mention of the scripting language you want to use, so I will talk specifically about the HTTP requests to the BitBucket API:
Assumptions
If you have a BitBucket Repository that ...
7
votes
How to create staging servers for multiple git branches?
1) How can I run several different branches on the staging server?
Docker
2) How would I set up the DB evolution system to make sure it always has appropriate DB for each branch?
This depends on ...
7
votes
how to automatically create a subdomain for every pull request
We do this at work.
We have a small server, let's call it the receiver, it's the target of the GitHub webhook events. It runs a small application that parses the payload and incorporates logic around ...
7
votes
Accepted
What git command could be used to check when a remote branch was created?
Note: this answer shows how to find branches that have been *updated* a long time ago, not branches that have been *created* (i.e., spliced off of some parent) a long time ago. I believe this is what ...
7
votes
Accepted
Should developer wait for CI pipeline to complete or start next task after pushing
Sit and watch the pipeline run?
No, that is not how you work efficiently.
Developers push their commits to the source control repository and then the CI/CD pipeline is triggered.
Developers may ...
7
votes
How to resolve merge conflicts in Azure DevOps current UI
I had this problem too, coming from github where you can usually resolve text file changes in browser.
On your local repo, you want to get the latest then reverse-merge, so in your case
// Precursor ...
7
votes
How long is it appropriate to keep old feature branches in git?
Feature branches should stay until the feature is done, once done the branch must be closed/deleted. Establishing this kind of behavior should be a team goal and usually takes some time, it's just ...
7
votes
Accepted
Is it possible to view all changes made on a Git feature branch in Azure Devops?
You're looking for the branch compare functionality. In the list of branches, click the overflow ellipses on your feature branch and select compare branches.
Azure DevOps will diff your branch with ...
6
votes
Getting a single revision from Git
Question is there a way to get a single revision from Git without it's history ?
To get a repository, no there's no way, mainly because there's no 'revision'. Git store commits, which are changes ...
6
votes
Is it possible to autodeploy on every commit in a specific branch using Travis CI and GitHub?
Instead of using Travis' deployment features, build the deployment logic in to your normal "test" script(s). For a PaaS this might be as simple as pushing to another git remote if all tests pass, but ...
6
votes
Accepted
Jenkins shows the job as failed if there is nothing to commit to gitlab
In order to get a success, you need to avoid non-zero exit codes. A simple solution would be to change the last line of your script to git commit -a -m 'Changes pushed by Jenkins' || true, but better ...
6
votes
Accepted
How are you enforcing git behavior, including locally (particularly on Windows)?
To answer the question of how to enforce something locally, you can't without doing some very heavy lifting around managing and enforcing the state of every developers workstation, and I'm usually of ...
6
votes
How to structure DevOps related code and configs in a code repository?
I can answer bout docker, one of the best practice to use docker is to keep the docker file and the compose files in the same repository of the project, so wherever you clone the project you can build ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
git × 186jenkins × 44
azure-devops × 30
gitlab × 20
github × 19
continuous-integration × 17
jenkins-pipeline × 16
deployment × 14
continuous-deployment × 12
docker × 11
jenkins-plugins × 11
bitbucket × 10
azure × 9
cicd × 9
continuous-delivery × 7
release-management × 7
branch × 7
ansible × 6
azure-pipelines × 6
git-hooks × 6
amazon-web-services × 5
release × 5
ssh × 5
scm × 5
windows × 4