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
279 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,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 in Git & GitHub by Mariam
152 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
• 9,870 points
55 views
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,810 points
74 views
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,810 points
208 views
0 votes
1 answer
0 votes
1 answer

Trying to analyse Sonarqube from Drone.io in Github PRs

Just try the below steps.The DRONE_PULL_REQUEST environment variable has ...READ MORE

answered Jun 27, 2018 in Git & GitHub by shubham
• 6,890 points
223 views
+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,380 points
242 views
0 votes
1 answer