Workflow automation: Makefile vs. Ant [closed] - ant

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Whenever I notice that something in my workflow is a repeating task, I try to automate it.
For example the steps necessary to deploy something on a server. It's often a build, followed by a scp and finally some remote setup scripts:
mvn package
scp target/foobar.jar server:
ssh server install-foobar
ssh server './bin/foobar restart'
I tend to write a small Makefile in such cases, which could look like
deploy:
mvn package
scp target/foobar.jar server:
ssh server install-foobar
ssh server './bin/foobar restart'
How do you automate your workflows?
Is Ant the tool of choice? What are the Pros/Cons?

For Java development, I'd say Ant is the default choice.
Pro:
good documentation,
good IDE integration
Lots of third-party extensions and tools
Con:
Somewhat verbose (well, it's yet anothr XML format)
Some things that should be simple aren't (e.g. any kind of looping)
I don't really have any experience using makefiles, so I can't say how they compare. Maybe you should simply use what your developers are more experienced with.

SCons is another good one. And Capistrano seems to be well regarded although I haven't tried it.

I use shell and perl scripts

consider GAnt (http://gant.codehaus.org/). using Groovy's builder, it is much less verbose than an Ant build script

For python I tend to use fabric for the deployment steps and setuptools for any building that is needed (not that usual for me :-)
Fabric understands how to copy files to servers, runing commands on the remote server (both as the standard user and as root).

one of the reasons most build systems are so complex is that folks try and do to much in them. sometimes complementing a build system with a driver-script that takes care of non compilation/linking tasks is a good way to go. There is no single way. Its hard to answer the question without see the project source code structure and all the tasks that need to be done. But you might want to take a look at Rake as it would complement Make, Ant, and Maven

Rake is my choice.

I find Ant and its XML configuration syntax a bit unwieldy and there are some things that should be trivial but are very hard to get in Ant. I prefer for that kind of automation SCons.
There is another tool precisely made to deploy stuff that I used for a bit and was pretty cool, but I forgot its name, maybe somebody else remembers it :).

I use scripts (shell, perl, python) or makefiles. I do not like Ant and SCons

Related

How to build an MSIX from comandline [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
We had understood, MSIX is an interesting, modern alternative to ClickOnce.
Using with GUI runs smoothly. And we want also to use it with Powershell/CMD scripts. (We only want the msix package, no store upload.)
Here is our problem. I have seen the doc from MS (https://learn.microsoft.com/en-us/windows/msix/package/manual-packaging-root) but it is very partial. I have no special with to do, I only want to make the standard export by script instead of GUI.
Please, can anybody give me a better instruction/tutorial to easy create an msix-Package by command line?
Here the steps, I found - and partial questions:
Create Manifest.xml - Good documentation of the content, but where to save it? I use the folder with the *.sln
Generate a Package Resource Index - I find the MakePRI.exe, but hot to use?
Create the package with MakeAppx - who and where to use? Even in standard case I need a mapping.txt. Which files must it contain? All from Manifest? Where I must place the files - Server online or local at PC? Only pictures for icons? Where I must run it? Must it the place with the *.sln or can it be a subfolder? Where have the binaries of my program to be?
Create an app bundle - What must stand in the mapping file here, when I will an app for x86 and x64?
Sign msix - sounds easy - give msix-file and signature as parameter and run
You see, I am very confused. With GUI - MSIX creation is easy. But how to automate it? Can someone help me?
It seems to me that you are on the wrong track here, basically, you are trying to reinvent the wheel and create your own tool that builds MSIX packages.
This doesn't sound very effective to me. We (at Advanced Installer) and other vendors, Microsoft including, have been working for years to build reliable MSIX packaging tools, this is not a 1-month project task that you can start from scratch, without any prior domain knowledge.
What I suspect you need is actually a way to build from the command line a project that you created with Visual Studio, Advanced Installer, InstallShield, or any other tool that can build MSIX packages.
So basically, you need to use the GUI to initially build the project that will generate your MSIX and you can then go on to use the options below to build an MSIX from that project using the command line.
If I am wrong, and you actually need a way to build an MSIX package from scratch from the command line, please update the question with more details so the community can better understand what you are trying to accomplish in order to provide you with useful guidance.
TLDR solution:
So, the first step is for you to build your MSIX project using your tool of preference. From your question, it seems you are only using VS, so you need to use the Windows Application Packaging Project.
Now that you got the .SLN which contains your source code for the application along with your MSIX project, all you need to do is to trigger a build from the command line, using msbuild.
Note. If you are using a third-party tool to build your MSIX, then search for it's documentation, all professional tools have a command-line interface. Here is for example how you can build a project from using Advanced Installer's CLI.

CI tool with code metrics for ruby on rails application

I need to integrate a CI(continues integration)+CD(continuous deployment) tool for my ruby on rails application.
It would be great if it has the following features.
Code metric tool like (metric_fu)
Gitlab,Gitlub for repository managements.
Following are the list of CI tool I'm consider.
https://travis-ci.org/
https://circleci.com/
https://www.shippable.com/
https://www.codeship.io/
https://wiki.jenkins-ci.org
http://cruisecontrolrb.thoughtworks.com/
https://drone.io/
​please help me to compare the feature of these CI tools......
(full disclosure, I work for ThoughtWorks)
I'd replace CruiseControl.rb with http://www.go.cd/ or http://snap-ci.com - ThoughtWorks isn't actively updating CruiseControl.rb since Go CD came out several years ago. Both of the newer tools (also from TW) are designed with CD at their core.
To the main part of your question - With any of the tools you mentioned I'd recommend calling the code metrics tool of your choice as one of the stages, and not relying on the CI/CD tool to have that knowledge natively. Generally speaking, CI/CD servers are used to orchestrate a process that relies on several other tools like build systems, metrics tools, testing tools etc.
Magnum CI should be great for what you need.
It also deploys to Heroku, which hosts Rails apps. So if you want it to run some tests then deploy automatically, it sounds like it could be a good fit!
I found magnum-ci.com recently and feel it suites my entire need.
Hope this may help ROR enthusiastic...

Good alternative for ant for use on jenkins build server

Hy there. I have a number of software projects (also iOS and OSX) which I build with Apache ant`.
Although I quite like Ant it is often too verbose and some things which should be easy are quite tricky or I have to use shell scripts along with ant.
Is there a good alternative for which is extensible, easy to use and should work well on my jenkins build server.
Thanks for your input.
Have a look at Gradle - it's quite different from Ant and may take a little while to get your head around, but I think it's going to be the new standard for build systems. One nice thing is that it has full Ant support under the hood, so you can easily get your existing Ant builds running and then port them to Gradle.
Gareth's answer of Gradle is a good one. But do take a look at what you are doing that is hard with Ant. In my experience, a fair portion of the time its "non-build" stuff. Perhaps leave Ant for the pure build stuff, and use an alternate tool for and deploy or test stuff that's snuck in there.
Although gradle looks very promising I decided to use Rake instead.
I should say that this is a biased decision since I am already using ruby for other parts in my build setup. I found a good Article by Martin Fowler
Another point is that by doing OSX development the platform-independence-aspect of Ant (or Gradle) does not have such a big weight for me.
BTW Besi's Rake answer:
JRuby's Rake+Ant integration seems like a really powerful combo:
http://www.engineyard.com/blog/2010/rake-and-ant-together-a-pick-it-n-stick-it-approach
One big advantange there, it fully supports integration with Ant, allowing step-by-step migration.. which IMHO is only viable strategy for large, existing projects.
Gradle seems similar and while it looks good; I think learning Rake could be a better investment as it's more universal outside of Java.
(The other thing I'm seriously considering is BuildR http://buildr.apache.org, but Jenkins doens't explicitly support it yet, so have to use scripted build steps, which seems less preferable. TODO: a BuildR plugin).

Developing in Ruby on Windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm starting a new job soon where I'm going to be developing in Ruby and Rails on a Windows machine. I haven't used Windows for years, and the likes of Textmate, Git and Bash, are an integral part of the workflow using a Mac.
So, does anybody have any suggestions or recommendations as to the best tools or work strategies to use? Or pitfalls to avoid?
In particular, of course, I'm interested in the best text editor. (I'm seriously thinking about taking the opportunity to learn Vim or Emacs, or whatever the Windows ports are called, but any other thoughts would be welcome.)
Additionally, any ideas of useful plugins, tools or programs would be appreciated.
If you think that I've completely lost my mind, then feel free to tell me too ;-)
cheers !
Ruby and Rails
RubyInstaller for Windows
RubyStack installer for Windows
Rails
Development Environment
IDEs
RubyMine
NetBeans
Aptana RadRails
Text Editors
Sublime Text 2
e (aka TextMate for Windows) (seems to have been abandoned)
Vim/Ruby
bash Environment
Cygwin
Source Control
Git
Helpful Links
Setting Up Rails Development Environment on Windows XP
RubyonWindows Blog
Is Windows a First Class Platform for Ruby?
Related Questions
Why is ruby so much slower on windows?
Limitations in running Ruby/Rails on windows
Will using an IDE with Rails hinder me?
GUI editor for Ruby in Windows
What IDE / Editor do you use for Ruby on Windows?
https://stackoverflow.com/questions/826164/a-definitive-list-of-ides-for-ruby-on-rails
Ruby On Rails with Windows Vista - Best Setup?
https://stackoverflow.com/search?q=ruby+on+windows
RubyMine is supposed to be a top notch IDE. JetBrains always makes great products.
NetBeans or e as IDEs
Here's my incredibly detailed setup guide for Windows Server 2003, which works essentially unchanged on XP Pro and Vista. See this general installation list, and modify the instructions if you get different results. They're meant for people new to programming, so they'll probably be overly explicit for your purposes.
IMO, the one thing you definitely need is a *nix-style shell. This has nothing to do with whether you like dir or ls - you need to be able to run shell scripts or you won't get very far.
git bash (comes with msysgit) is my beacon in the storm of cmd.exe windows. It's essentially bash on Windows, and lets you run almost any script that you can run on *nix. This includes all the gem command line executables.
It gets weird in a few places.
File permissions - there just isn't a great way to map between Windows ACLs and POSIX file permissions. The Cygwin people have devoted years to solving it, but it still doesn't work all the time. git bash's approach is to just not do anything when asked to do a (for example) FileUtils.chmod. That means you may need to create a few more directories by hand, and you do need to be very aware of when something is changing file permissions.
For example, when I installed the Heroku gem on Windows, it tried to set the permissions of my Heroku credentials file, which has my Heroku password in plaintext, to u+r go-rwx. You'd definitely want to change the ACLs on that file if you're on a shared machine.
Scripts vs. .bat files - I wanted to change git's default editor from vi to SCiTE (not that I don't like vi; this was for a new-user workshop and I didn't want to explain editing modes). I had to create a .bat file that was actually a shell script. See the full explanation here:
How can I set up an editor to work with Git on Windows
I am using Netbeans, which is a good overall editor (at least for me).
For simple projects I use JEdit.
You can find the link at
NetBeans IDE
You can find JEdit at JEdit
git is available on Windows: http://code.google.com/p/msysgit/ or http://kerneltrap.org/Linux/Git_on_Windows
Basically, you need to decide whether you are going to go the Cygwin route or the MingW route. Both will provide you with Bash as well.
GVim works great. I use the native port rather than the Cygwin version.
If your development life is switching to Windows then you may want your employer to invest in this:
Ruby In Steel by SapphireSteel Software
I've used it in the past when I started tinkering with Ruby on Rails, quite nice and reasonably mature now. Also it's built on Visual Studio which I still think is one of the premier development environments around.
Maybe bring a LiveCD to work with you every morning..
you can even put it on a usb flash drive, if you use a small enough distro/big enough drive...
Cygwin as command line tool
The two best RoR IDE's I've used are NetBeans and Aptana Studio. However, for the most part I stick with Notepad++ and its various plugins (Explorer and HTML tags being two important ones).
This may not be applicable in your situation (IT restrictions, etc), but another option might be virtualization. You could install VirtualBox, VMWare, or some equivalent, and run Ubuntu (or your preferred Linux distribution, of course) that way, gaining access to the full UNIX toolset.
You didn't say whether you're using Windows voluntarily. However, this line suggests to me that maybe that's the case:
"If you think that I've completely lost my mind, then feel free to tell me too"
If you have any choice in the matter, I strongly recommend using a Unix-based system instead of Windows. If you have to go through inconvenience, spend money, or jump through hoops to avoid doing Ruby/Rails development on Windows, it will be worth it.
I've had to cope with Ruby and Rails on Windows a lot recently due to legacy systems and other developers' preferences. Rails development on a Unix-based system is much more efficient. The difference is not subtle.
That said, as others have mentioned, installing mysysgit even if you aren't using Git is helpful because it comes with Git Bash which gives you a usable bash command line.
As for text editors, I like Notepad++.
NetBeans is a really nice IDE for Rails development. Decent syntax highlighting, code completion, error highlighting. Handy keyboard shortcuts for navigation. It's pretty good.
IntelliJ IDEA
I developed in RoR under Windows for a few years, it's bearable, but Linux (or Mac) is much better for this. Lots of gems and plugins are considerably harder to install on Windows (quixml, for example).
My favorite text editor under Windows is Textpad, Eclipse is also pretty good.
If you want to use ls, find, grep... in Windows console, just download some package of their Win32 ports, install them and add to your PATH (Cygwin is definitely better, but also harder to install). You might also try out Powershell, it's supposed to be a replacement for unix command line by Microsoft.
I use virtual box, putty, and xming to do the development in an isolated linux environment. I blogged the full setup here
I've struggled a lot with Rails development on Windows. At some point I needed a specific gem that didn't work on Windows. I prefer working with a VM using Vagrant
Here's a blog post I wrote, how I setup my projects with the use of Chef and Vagrant

Resources for setting up Flex projects with Hudson

I'm looking into setting up a CI environment for our flex projects. I have very little experience in setting up an environment like this, but have read a lot about it and think we could benefit a lot from this in our projects. I do have experience with ANT and we're currently using it for our building. I've been looking at Hudson for a while and it looks really nice and simple while still having the power to support a proper CI environment.
So basically, my question is if anyone has experience in setting up Flex projects with Hudson? If so, please do share some info on issues, cost/benefit as well what kind of effort is required per project to get up and running with Hudson. I've googled for a while and can proudly say that I know more about both the Fast lexical analyzer and the Hudson River, but little more about the topic of this post =)
Just about anything that can be executed from a command line can be executed via hudson. If your flex app can be built via ant from the command line; it will work just fine in hudson.
This might be helpful:
http://www.subotnik.com/blog/?p=100

Resources