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 Atul
• 5,530 points

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 \
answered Apr 23, 2018 by ajs3033
• 7,280 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
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
• 9,940 points
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 in Git & GitHub by MD
• 41,300 points
0 votes
1 answer

Can I programmatically access gitlab secrets hash?

The newer versions of gitlab do support ...READ MORE

answered Mar 29, 2018 in Git & GitHub by DareDev
• 6,850 points
0 votes
1 answer

How to do a re-merge into another branch in git

Seems like you want to rebase your ...READ MORE

answered May 7, 2018 in Git & GitHub by DareDev
• 6,850 points
0 votes
1 answer
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
0 votes
1 answer