Comments (2)
I've been looking at how this might be implemented and wanted to share the different approaches.
The first approach is to just tack these options on to the current add_project script. This is the simplest solution to implement but introduces additional complexity to the add_project script that will only be related to SCM. For example, if we wanted to do some simple argument checking to inform a user that the :watch_for_changes_in switch won't work for them in SVN, we'd need to do a big if statement that branched on the SCM choice in add_project.
To dry that up, I tried dropping in Trollop instead of optsparse because it allows for git-style subcommands. The first issue with this is that the interface would need to change. Instead of cruise add [project_name] -r [repo] -s [scm]
it would be cruise add [project_name] [scm] [scm_options]
or cruise add [scm] [project_name] [scm_options]
. This does not seem incredibly bad to me but it would change how we do some things.
Finally, the other option I was thinking about was to not touch the add_project command and to create an configure_project command that would allow the user to modify a project from the command line. I'm not sure what all of the implications of this are, especially after a project has been created and run a few times.
@bguthrie You got some guidance for this?
Code for the trollop method: #74
from cruisecontrol.rb.
I like the idea of switching to Trollop rather than extending the existing mess. I'm a little leery about going the subcommand route--are the different options really THAT different? If they are, then this seems like a reasonable way to do it, and a reasonable way to extend the cruise command to boot.
Obviously I can't merge the pull request without a bit more testing but I like where you're going.
You should be able to configure as well as add from the command line, but I don't think adding that in removes the need to improve the existing add command.
from cruisecontrol.rb.
Related Issues (20)
- builder exits, cruise process still up HOT 1
- Change default git branch HOT 4
- Builder doesn't understand parameterized rake tasks HOT 1
- Email notification sent when test is still running HOT 2
- site_config.rb seems to be ignored HOT 2
- Nil error with empty commit messages HOT 1
- Download links broken, there's nowhere to download the project from anymore. HOT 4
- Wildcards in branch name for testing feature branches HOT 3
- Todo HOT 10
- test errors introduced by a merge
- Not work send emails after cruise update to latest version
- Is this project still active? HOT 4
- Looks like link to docs is broken HOT 4
- Code browser route unreachable
- Allow "Build Now" when disable_admin_ui is enabled HOT 3
- Builder exits unexpectedly HOT 2
- Upgrade to Rails 3.2.x HOT 7
- Test fails but build passes HOT 1
- Cruisecontrol.rb on top of Amazon EC2
- Running cruise add --help starts builders for existing projects
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cruisecontrol.rb.