how to connect gitlab with openProject - linux

Hello I have a requirement is it posible to connect somehow gitlab with openproject?
I have seen this https://www.openproject.org/news/57-openproject-github-integration-plugin-released
but not sure if it will help somehow with gitlab

In the past, you could connect most git repositories to a project, so you could also connect those on GitLab. However, the git proper integration seems to be broken for some time now.
The GitHub integration plugin you mentioned will not work with GitLab though, as their web hook APIs will probably differ.
You probably should elaborate your question and put it on one of the OpenProject boards.

Related

Continous deployement to server

I'm building a personal blog website with express.I hosted it on ec2 and also hosted another version at digital ocean .But when it comes to updating my code (like i am changing a few lines or adding or removing a new feature) i have to remove all the files and re-upload and again run it.When i was using www.heroku.com it was easy like git push heroku master.How can i do similar with ec2 or digital ocean server?.(I'm using pem file to login to server)
I recommend looking at Code Pipeline tutorials. You can use this AWS Service to build a CI/CD use case. See:
CodePipeline tutorials
As SMAC mentioned in the comments, you're looking for a CI/CD solution essentially. Heroku does a nice job of automating that for you, as do several other products out in the market. Depending on what Git provider you're using, GitHub and GitLab both provide a native solution (GitHub actions vs GitLab CI).
I'd recommend you combine that with something like AWS's ElasticBeanstalk to get a simple change/push workflow like you're looking for.

Prevent accepting merge requests on sonar issues

I am using GitLab with SonarQube executed by Jenkins. I want prevent merge requests from being accepted if SonarQube has reported any issues.
Any ideas for Gitlab CE or EE?
Gitlab CI offers two ways to prevent merge requests, if build fails or if there is unresolved discussion.
To start please configure a Jenkins plugin following this tutorial.
Now that you have the gitlab-jenkins-ci integration and gitlab trigerrs the jenkins build you have to enable Only allow merge requests to be merged if the build succeeds in the project settings in gitlab and either install SonarQube build breaker plugin or use the rest api.
The method not involving build breaking would be to use gitlab SonarQube plugin however currently it does not support making comments on merge requests so you'd have to either modify the plugin or make a workaround using the gitlab api.

How would I host deb packages?

I'm currently working on a github project mainly focused on windows users, written in Java. Install4j allows for easy .deb/.rpm etc. package conversion...
We could just ditribute the .deb on the download side, but when looking at gitlab a while ago, I saw, that Gitlab is using packagecloud.io as a hosting service for their packages (usingtheir own domain), so they can be updated using apt-get.
My question is, if there is a free service working just like packagecloud.io (not launchpad or similar with baazar and that advanced stuff) which can either be hosted on our own server or a public server. Or if there even is a downloadable version of packagecloud.io which we could use on our own server.
You can configure Travis CI to run extra commands when the build succeeds. You can put in some conditions, so that the deploy stage will only be run if commit happens to have a tag name. See the deployment documentation to get going.
A number of providers are officially supported, among which PackageCloud.io.
You might find the dpl utility useful, as it assists with writing and testing deployment settings.
Check out OpenRepo: https://github.com/openkilt/openrepo
I think this is what you're asking for. This is a package hosting server that can make packages available for both Debian (APT) and Red Hat (RPM) files.

how to use web hooks on Buildbot (gitlab integration)

I am quite curious to know how do you actually use the buildbot when you have a repo on gitlab.
From what I understand, there is no way to upload the py files, which are triggered by the post-commit hook, so I am not exactly clear how do you tell gitlab to send the changes in the codebase to the buildbot, and how the buildbot knows about these changes sent.
We are planning to switch soon to gitlab, and I am looking ahead to avoid to get stuck when the real fun will begin.
Does anyone have any pointer about the integration and communication between Gitlab and Buildbot?
The info on the official documentation of Buildbot is not really clear; I have read about web hooks but I am not really getting how they work.
There is a Gitlab Hook
They've added a Gitlab Hook. You can use it the same way as the Github one.
The GitLab hook is as simple as GitHub one and it also takes no
options.
c['www'] = dict(...,
change_hook_dialects={ 'gitlab' : True }
)
The main issue is the incompatibility of the github module for Buildbot; once the Gitlab will make possible to have either Gitlab or Github hooks, it will work without problems.
http://feedback.gitlab.com/forums/176466-general/suggestions/3787958-web-hooks-data-posts-should-be-github-compatible
Hope that this will help people looking for info, so they avoid to bang their head on the wall in search of an answer :)

How to set up git and maven to work together?

I'm new to both of these tools, and I'm also very new to Linux system administration, so I apologize ahead of time for what may seem like a total n00b question.
Basically, I'm starting a whole new project from scratch. Yaaay! Exciting! However, I'm a little lost on how to set up the project. I've installed both git and maven on my dev machine and run through some tutorials. I've also set up git on my server, and have successfully pushed code to it and pulled code from it.
So, first question : Is it even a good idea to use git and maven together? Git seems like the best source control system, and Maven seems like the best build system. Are they known to work well together? Or am I needlessly creating trouble for myself at this early (and precarious) stage of the project? I've used ant enough to know that I don't want to use it, and I'm not really a fan of svn, although I'll use it if I have to.
Second question : Given that these two tools work well together, what's the Best Practices way of setting them up? I know that git is "peer-to-peer", although I suppose nothing is stopping you from setting up a single repository for the git user and having all the devs sync up with that repo when it's time to do a build. Is that the right way to go? How about Maven? Maven seems kinda single-user oriented. Like, everybody sets up Maven on their own machine and has their own Maven repo, right? Or wrong? Would it make sense to create a "Maven user" on my server, and have that user do all my builds from the "main" git repo?
Apologies if I'm totally mistaken on how to use these tools. As I said, I'm pretty new to these things. Any help you have is appreciated.
(also, I'm working on Linux, doing Java dev work in Eclipse, using Spring for the framework, mysql for the data store, and Hibernate as an ORM. Don't know of any of that matters)
Thanks!
Q1: Yes, git will work well with any build systems. Usually your VCS is well abstracted with any modern build system. Ensure that you set up your .gitignore file so that you are not tracking any artifacts from builds.
Q2: The best practice is to have an integration branch to build from. While developing, use topic or feature branches. When ready, merge into the integration branch and push that up to the central repository where maven can build from. Google git-flow for more ideas. You generally want a central build server if you are working on a team to ensure you are building on the same machine. This is not the case if you are working alone or maybe just one developer.
Hope this helps.

Resources