Skip to content
This repository was archived by the owner on Dec 15, 2020. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

GIT

In this example we show you how you can easily access information in git. This example only works if you have a git project. If you have connected your gerrit/github project to InfraBox then InfraBox will clone your repository. You can access your repo inside a job like you would to it on your local machine. So you can simply use git commands to i.e. find out which files have been changed by the last commit:

git diff-tree --no-commit-id --name-only -r HEAD

Make sure you copy the entire git repo into your image in your Dockerfile:

COPY . /my-git-repo

Per default InfraBox does not clone the full repository, but only the most recent commits. If you need the entire repository you may configure this in your job definition. See the Repository Configuration Documentation for a explanation about the options.