- There should be curl in the system to verify the URLs
- Set the variables, set proxy depending on IP of the Jenkins slave. We had slaves within a certain subnet which needs proxy for them to be able to connect to our Git repositories.
- Perform connection checks
- Proceed with clone if project is not yet existing in the machine, update if already existing
- Create backup of successful clone/update
#Throwback: A batch script to clone or update Project from a Git repository
Background:The use-case behind this was that we could not checkout our project from Git repository in Jenkins for reasons I could not remember. I'm just publishing this here as an archive for future reference in case I encounter something of the same nature.
0 comments:
Post a Comment