Setup Git for CICD
Last updated
Last updated
Step 1: Create a account in Gitlab using email address. We can use free as well. Provide a repository name with permission.
Step 2: Clone the repository with SSH which helps to edit the code easily using different IDE.
Step 3: Open the folder in VS code and starting writng a script in .gitlab-ci.yml. In the following script I am using docker to build a CI/CD pipeline. In order to use a docker we need to have docker in docker hub and create a Dockerfile folder. Include image with version and mention port number in dockerfile.
Step 4: Once you done with your code you can commit and push into a git. It will automatically start running CICD pipeline in gitlab. We can see the pipeline under CICD menu.
If you want to see the log of pipeline, We can see that logs under jobs.