Jenkins with a Cocos2d-X project - c++

I have just recently moved into developing Cocos2d-X application for Android devices, from native Android application development. I am looking to configure my Cocos2d-X C++/JAVA project in a JENKINS environment.
Has anyone any experience of using JENKINS with cocos2d-X projects ? Any tips on where i can get started ?

You can use the cutom scrip option, for example if you use the cocos2d-x model for build you can build your project with the custom command "make", in adition you can use statically code check, bla, bla, ...
I use too my machine as slave for no put the build environment in the server.

Yes. It depends upon the build tool you are using. I am using Ant with Eclipse. Try to read about building an Android Project from Command Line Using ant or gradle. and there you go,Include "Build Step"-> "Execute shell" in jenkins.
You have to manually check for all dependencies.

Related

How to build a Windows Qt/MSBuild C++ application inside a Jenkins docker container

First of all, I'm completely new in CI.
I am trying to set up a Jenkins to build several C++ projects I am hosting on my own Gitea instance.
The applications I want to add to my Jenkins build pipeline are mostly Qt or MSBuild projects.
I have installed the MSBuild plugin for Jenkins, however I couldn't find a Qt plugin.
Since the Jenkins docker container runs inside a Linux environment and runs on Linux itself too, I couldn't find out how to make Jenkins build MSBuild (.sln) or qt (.pro) projects.
How do I have to configure Jenkins to make it build MSBuild or Qt repositories?
Do I have to create makefile or CMakeLists files?
My goal is to have automated release builds inside my repositories built using my Jenkins docker container running on my Linux machine.
I really couldn't find a useful tutorial or explanation on this.
Thanks a lot in advance.

How to configure my Jenkins to auto build and test my Qt project?

I'm a newer to Qt project,strange to its project structure.
I have used jenkins+git+github+MSBuild+xUnit to build CI for VS project in windows.
Now my job is to configure jenkins so that it can auto build and test my qt project(in Ubuntu).
However,it seems there is few information about "jenkins build Qt project".
I don't know which plugins should I use on jenkins and how to configure them.
Can you show me how to do that?(I use Ubuntu 16.04)
I have read this blog,and try to run that way:
https://www.peter.hartmann.tk/single-post/2015/06/17/Minimal-Continuous-Integration-for-Git-projects-with-Jenkins-and-a-Qt-example
In this blog,it use "qmake && make && make check" to do all the thing(build and test) without installing any plugin.what does this command do?Does it work for all Qt project?
What's more,in Ubuntu,can I pack my Qt project using jenkins?If yes,how to do that?(Windows can pack qt project as .exe file, Ubuntu pack as what kind of file?)
I'll just link to already existing materials, which there's plenty of.
In general there's three main steps in what you want to do:
Trigger Jenkins build after git push: How can I make Jenkins CI with git trigger on pushes to master?. That gives you Jenkins job execution (that at this point does nothing) after each git push automatically.
Pulling changes from SCM - that is a ready step within regular Jenkins project that you just click through.
Building your project - in case of QT project which can be built from command line (Compile a Qt project from command Line) you can add this as a simple shell command build step in Jenkins.
Optionally you can then run tests on the result, store your artifacts after a successful build and/or trigger email notifications on failed builds.
As for storing artifacts - there's a ready plugin for that (https://wiki.jenkins.io/display/JENKINS/Compress+Artifacts+Plugin).

How to build Qt applications using Team Foundation Server 2017

I am currently in the process of migrating a couple of legacy Qt5 projects to a new Team Foundation Server. All projects have been developed for Windows in Visual Studio using the Qt VS AddIn (and thus don't use .pro-files). I would love to use the TFS Build Agent to build these on other platforms (mainly linux).
I have previously done this on other projects using Jenkins and qmake, having platform-dependent settings in the .pro-file.
Is there an established workflow for building VS projects using Qt5 via a TFS Build Server on other platforms?
I don't use TFS but, since TFS Build operates on Visual Studio solutions, it ought to be possible to use the "Linux development with C++" feature of VS2017. Just setup a Linux project in the VS solution and it should build like any other.
Seems you'd like to build Cross-Platform Code in Linux using TFS vNext build system. To build or deploy you'll need at least one agent. The cross platform build agent is support on Ubuntu, Red Hat, and CentOS.
Detail steps please refer this tutorial-- Deploy an agent on Linux. Then simply create the build definition add build task, select the Linux build agent the same as build on windows. More detail step and build configuration you could take a look at this video tutorial-- Building and Deploy Applications In Linux With TFS
In your case, there is not corresponding VS/Qt VS AddIn in your Linux environment. You need to set up your Linux build agent local environment to build your qt5 application successfully, then it's not hard to build through tfs.
Another way is scripting the Linux build process to run over SSH or some other remote protocol, and driving this process from the Windows build agent.

How debug wso2 Emm version 2 java souce code?

I want to do some cutomization to the wso2 mdm-product source code (EMM version 2) : https://github.com/wso2/product-mdm
Indeed, when i made some modification to the source code, i need at least 15 min to build the maven projet with eclipce IDE.
Is there other solution to build project directly on carbon server?
How can we debug project with eclipse IDE on carbon IDE?
Usually, it takes some amount of time to build the WSO2 product-mdm, in your case, 15 minutes looks perfectly normal. I'd recommend building the source code using the terminal as follows.
Navigate to the repository directory
cd [path-to-dir]/product-mdm
Perform a clean Maven Build
mvn clean install
If you're unclear about the building process of WSO2 EMM Repositories, the answer on below question might help you to understand the building order.
How to use and understand wso2 git repositories?
Debugging
Remote debugging the project is easy.
Setup the Eclipse IDE for remote debugging as described in this link,
Debugging With Eclipse
Navigate to "[EMM_HOME]/bin/" folder and run the server in debug mode.
sh ./wso2server.sh -debug [specify-port-here]
eg: sh ./wso2server.sh -debug 5005
Once the server is up, you can start debugging.

TFS Builds using Eclipse CDT from Debian Box

I would like to use TFS Build system from Debian OS, I develop using C++, my IDE is Eclipse CDT. I would like to know if using TFS Build System is possible, if so how? as a side note, My development heavily relies on Boost libraries and QT.
Yes and no. You cannot run TFS builds on Linux. However you can use TFS build to run ANT or Maven, which in turn can be used to build c++.
The build will run on a TFS build agent, which will be a windows machine. Usually a different machine to the TFS server. This can be a VM, your TFS gurus should be able to set this up for you.
To use ANT or Maven you need the TFS build extensions the link is for the TFS 2012 version, however there are extensions for older versions of TFS.
Once you have a build server set up you can use ANT to build your c++ code or Maven.
If I was going to attempt this, I would get the ANT build working on a windows box first, then plumb it in to TFS with the extensions.
However, you might be better off using a more generic build engine such as Jenkins, running on Linux which connects to TFS to retrieve the code.