Version control as source to gitlab

0 votes

We are using the gitblit version control system, but we're interested in Gitlab CICD plugins. Right now we want test it out before we make the decision to move the entire project onto the gitlabCI. So, for now we'd like to use gitlabCI but keeping gitblit the source for it.

Is there any way to do this ? I have already tried importing project but it creates a new repo in gitlab and cuts the relation with gitblit.

Apr 23, 2018 in Git & GitHub by ffdfd
• 5,550 points
1,439 views

1 answer to this question.

0 votes

The steps I'm going to tell you are a bit advance, so bear with me

  • Create a gitlab repository and define the build steps you want in the .gitlab-ci.yml file
  • Now, add a git clone gitblit-repository-name command to your .gitlab-ci.yml before_script to use your gitblit code in gitlabCI
  • Use triggers to run the pipeline when something is pushed to GitBlit by adding a hook in GitBlit that sends a POST request to Gitlab
  • add triggers to execute the pipeline so that whenever anything is pushed to gitblit it sends a post request to gitlab. this can be done using a hook in gitblit

You could use a post request resembling this:

curl --request POST \
     --form token=TOKEN \
     --form ref=master \
     https://myGitlab/api/v4/projects/1/trigger/pipeline
answered Apr 23, 2018 by ajs3033
• 7,300 points

Related Questions In Git & GitHub

0 votes
1 answer

What all does a version control like git allow us to do?

Version control basically keeps a track of ...READ MORE

answered Feb 16, 2019 in Git & GitHub by Mariam
931 views
0 votes
1 answer

How to forcefully commit a file to Git even if the file is ruled as unchanged?

This is simple, just follow the below ...READ MORE

answered Jul 11, 2018 in Git & GitHub by Sophie may
• 10,620 points
14,211 views
0 votes
1 answer

How to roll back to previous version in Git?

Hi@akhtar, You can roll back your previous version ...READ MORE

answered Apr 29, 2020 in Git & GitHub by MD
• 95,460 points
1,109 views
0 votes
1 answer

How to remove files from git repository as well as users system?

Hi@akhtar, The git rm command deletes the file ...READ MORE

answered Nov 19, 2020 in Git & GitHub by MD
• 95,460 points
796 views
0 votes
1 answer

How to reset or revert a file to a specific version?

Hi@akhtar, To revert a specific file to that ...READ MORE

answered Dec 22, 2020 in Git & GitHub by MD
• 95,460 points
595 views
0 votes
1 answer

How to remove version tracking from a project cloned from git?

Hi@akhtar, All the data Git uses for information ...READ MORE

answered Jan 4, 2021 in Git & GitHub by MD
• 95,460 points
1,053 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,062 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP