You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi everyone, I would like to ask you a few questions (hoping I'm not totally off the mark).
We have a little "CICD" and I have to improve it. I'm a junior so I'm a little bit confused with some informations I've found.
Indeed, we have a simple system : git, test servers and a production server.
We have configured pipelines in order to be able to launch our unit tests and then trigger the delivery of the files to the server concerned (the delivery in production is totally manual for the moment).
During the merge in the branch corresponding to the concerned server, the steps are the following:
- the unit tests are launched as this :
- once this step is over, a bash script is called
- this bash script allows to update the git repository and the dependencies (npm and composer in particular). So this command is launched :
My questions are :
Is it possible to do these steps without having the .git file on the concerned server ?
Is it recommended or not to use git in a CICD ?
Is it possible to run unit tests without installing php unit (via composer) ?
Thanks for your time :)
1. Git uses the .git folder to manage the containing folder as a git repository. This folder is used to mark the folder as managed by git and to hold all metadata relevant to the repo: HEAD commit hash, branches' hashes, etc'. The .git folder is created usually upon `git init` (creating new repo locally) or `git clone` (cloning a repo from a remote server). To answer your question, if you don't have the .git folder locally, it means you have to clone the repo you wish to build. If you do have the .git folder, it usually means that you just need to pull the latest changes and checkout the relevant branch for the build. The latter is usually faster (no need to clone the repo), and the first option is a bit more stable as you don't relay nor affected by current state of the build directory.
2. It depends on your requirements from the CICD and your preferred methodology. Many teams generate the version during the build and then commit & push it back into the repository. Some teams/organizations object using git directly during the build as it allows developers to commit & push code w/o going through pull request.
3. If installing php-unit has to be via composer - I don't know. However, the php-unit is a dependency, and as such, you can either fetch & install it during build time or run your builds on servers/containers which already include this dependency.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.