Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/napsy/gitw
a small tool that automatically clones and builds local GIT repositories on changes
https://github.com/napsy/gitw
Last synced: 8 days ago
JSON representation
a small tool that automatically clones and builds local GIT repositories on changes
- Host: GitHub
- URL: https://github.com/napsy/gitw
- Owner: napsy
- License: bsd-3-clause
- Created: 2011-12-18T17:06:48.000Z (almost 13 years ago)
- Default Branch: develop
- Last Pushed: 2012-10-01T08:15:01.000Z (about 12 years ago)
- Last Synced: 2024-06-20T08:09:46.201Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.05 MB
- Stars: 15
- Watchers: 5
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
gitw
==============Why not other tools?
minimalism: requires one JSON file per repository
easily extensible: support for unit tests and stress-testing (long-running tests)
Features:- watch multiple svn/git repositories, located locally on the host machine or on a remote host,
- notify the repository owners with an e-mail on failures,
- browse repository status from a web interface with access to log files.What's missing:
- dependency checks
- support for benchmarks/stress-testing: this requires a new tool to control the stress-testing as well support in gitw-http to dinamically show the test status and system state.
- Setting up the Go compilergitw requires a Go compiler from http://golang.org. Get it with mercurial (version weekly.2012-02-07 works). There are no other external dependencies.
$ hg clone -u weekly.2012-02-07 https://go.googlecode.com/hg/ go
Then, set up your environmental variables for Goexport GOHOME=$HOME/go
export GOBIN=$GOHOME/bin
export GOARCH=amd64
export GOOS=linux
export PATH=$PATH:$GOBIN:$GOBIN/tool
$ cd $GOHOME/src
$ ./all.bash
6g and 6l are the Go compiler and linker for 64-bit systems. Binaries are installed in $GOBIN.---------------------------------------
Compiling and configuring gitw
---------------------------------------Move to gitw source tree.
Compiling gitw - the CI server
---------------------------------------$ 6g gitw.go && 6l -o gitw gitw.6
The gitw server will listen on port 9988.Compiling gitw-http - the web interface
$ 6g gitw-http.go && 6l -o gitw-http gitw-http.6
Edit config.json:{
"RepositoriesRoot" : "repositories",
"MailAddress" : "[email protected]",
"MailHost" : "smtp.example.com",
"MailUsername" : "[email protected]",
"MailPassword" : "mypassword"
}
Key explanations:- RepositoriesRoot: the directory where the repositories JSON files are stored,
- MailAddress: email to use for sending out notifications,
- MailHost: email server hostname,
- MailUsername: username for the email,
- MailPassword: email password.
- The gitw-http HTTP server will listen on port 12345Adding repositories
Example project repository:
{
"repository" : "svn",
"source" : "remote",
"name" : "example",
"location" : "https://localhost/svn/example",
"build" : "make",
"test" : "/some/path/run.sh",
"outputdirectory" : "/some/path/",
"notifyemail" : "[email protected]",
"description" : "Build Example and then run unit tests, then a long test"
}Key explanations:
- repository: either svn or git,
- source: remote or local. You can name a branch by appending / to the usual text.
- name: name of the repository,
- location: if source is set to local, enter a valid local path to repository, or an URL if source is remote,
- build: the command to execute after code checkout is done,
- test: the command to execute after build is done,
- outputdirectory: path where to out output files for checkout, build and test. The filename is composed of {name}-{checkout|build|test}-output.txt
- notifyemail - the email to use when sending fail notices or an empty string for no notifications
- description - a short description of the repository, mainly used by gitw-http.Configuring Subversion for gitw
----------------------------------Using gitw (https://github.com/napsy/gitw), automated testing could be done:
Navigate to your repository's hooks directory. This is almost always a directory cleverly named 'hooks' right inside the top level of your repository:
cd /Users/mwest/svn/my_repository/hooks/
Use the subversion-post-commit.example file (located in repository) for the post-commit script. The script will notify the gitw server whenever a commit will occur on the SVN server. Rename the file to 'post-commit' after putting it into the 'hooks' directory.
Make sure the file is executable and owned by the right user.