Bamboo builder task - bamboo

I am a newbie for CI & now start using Bamboo server for continuous integration. I've just get running Bamboo server and set first plan. I set the task for source checkout. Now I am trying to add automated build for my app.
For now app is just simple console based example running both at windows and linux. I have makefile associated with app to build it and then I run .exe (win) or ./ (linux) manually.
Now I want to set the "Builder task" (script task), how do I automatize it building it with Bamboo?

Yes, you have to add "Script task" and call your makefile to build your application in it. You also would need to define an Artifact - providing relative path to your .exe file. (Artifacts tab within your job configuration, more info here) so you can download your .exe file when the build is finished.

Depends on where you bamboo is running
If the Bamboo is on linux machine , just script task would be enough . To build it on windows environment as well , you need to have windows agent or use winexe to call it remotely .

Related

Gitlab CE Continuous Integration build node/angular app and deploy dist folder to server

I've spent countless hours trying to understand how to do this correctly.
I have a nodejs application with angular front-end which are both contained in the same project.
I would simply like to have Gitlab CE CI build the project and then copy the resulting dist folder and package.json file to the production server and restart
I have a shared gitlab runner setup and was able to successfully configure the ssh runner.
Using the Gitlab runner ssh I was able to copy the entire project to the production server but cannot get it to build (plus I really don't want to have all files on the server, just the production required files.
what am I missing. do you use a docker runner with a node image to build the project and they scp files to the production server?
Any guidance would greatly be appreciated.
Yes, I think you already state the solution.
I would recommend looking into Job Artifacts to build your application in a Docker-based build job and upload the production files as an artifact.
The next job could then deploy (by scp or ssh+wget/curl) the artifact files to your production server and restart the webserver.

Triggering Jenkins after TFS build

I was wondering if it is possible for Jenkins to be notified after TFS finishes a build.
I'm trying to make a system where, after the TFS build, Jenkins is used to run automated selenium tests.
Thanks in advance!
You have a few options:
You could use a GenericTest to trigger Jenkins and include as part of the Build Definition. This also allows your script to communicate pass/fail information back to the build.
You could just include an InvokeProcess workflow activity to trigger Jenkins. The process would be similar to this or this.
Or you could use a tool that would trigger after a Team Build has finished. Normally people would use tools that then deploy stuff. Most of these tools trigger a Powershell script at some point, which would allow you to trigger the test run:
Octopus Deploy
TFS Deployer

Jenkins CI - java.exe child process hangs after job is done

I have following problem: on my Jenkins 1.438 I have job with maven 3 application. When I run it, sometimes after build is completed successfully Jenkins child process - java.exe - still hangs in the system. It also holds a handle to POM file and when I run my job again i get error that POM file cannot be deleted and build fails. Does anyone know how to fix this? Jenkins runs on Windows Server 2008
We experienced the same problem with Jenkins (on a Linux server).
I'm not sure if you can achieve this with Powershell in Windows server (or use windows-port of bash etc), but for example we start and stop our builds in Jenkins with seperated starter and stopper shell scripts. The point: start script saves the PID of the java process being started into a text file, and the stop script reads it and kills after a given amount of time.

Build and deploy specific revision number with TeamCity

I'm just getting to grips with TeamCity and MSDeploy and have deployment to a dev environment triggered by SVN commit working nicely. The question I have is in terms of releasing to a test environment; I want to do this on demand and based on a specific revision number. What's the best way to configure a TeamCity build based on a user-defined revision?
You can use Run Custom Build Dialog in the TeamCity, and customize there Changes to include parameter, where you need to specify actually SVN revision to build.
Take a look on Pin functionality in TeamCity. You can pin a certain build and then deploy latest pinned build.
So you have a 'Create development build' task in TeamCity which deploys to dev environment and exposes artefacts. You can create another task in TeamCity that will use artefacts from latest pinned build in 'Create development build' task and deploy to your testing environment.
You can create yet another task that deploys to production latest pinned 'test' build. Rollback can be achieved by simply unpinning last pinned build.
You also have a history of deployed build.

Bamboo Integration

This is my second question on Bamboo (My First One). My understanding after reading suggested info, I need a build tool, like nAnt or MSbuild to write a script that gets the source code and builds it (I am working on a .net 3.5 with silverlight project). After, when deploying, I need to write scripts to move my files to the diff servers. Please tell me whether I am going in the right direction or not. Can I use ant, maven, bash scripts to do the same with a .net project?
Yes, that is true:
Bamboo is the central management server which coordinates all work
Bamboo itself has interfaces and plugins for lots of types of work
Bamboo basically needs to first get your source from a source repository (lots of plugins here for a variety of systems)
Then it needs to do the build - that can be done by using MSBuild to build your Visual Studio solution, or it could be a batch file to call your XYZ compiler and linker to create your app - whatever it is you have and use
Once your solution or project is built, you have "artifacts" (build results, e.g. executable app, config files, etc.) lying around
with those results, you can do additional things:
zip them up into a ZIP file and copy them somewhere
run a install builder on them and create an MSI
install them on a test server to make sure everything installs just fine
The sky's the limit! :-)
But in general: Bamboo is just the "orchestrator" - the coordinator. The actual work is done by either direct Bamboo plugins (of which there are plenty), or then you can call external command-line apps by means of a unix script or Windows batch file.
Marc