Couchlock those running pipelines!
This is currently the way we are trying to get global locks into our CD pipelines. Historically tried different Jenkins plugins for mutexes/semaphores and hacks by using jobs as locks.
Lock that shared resource!
docker run -it --rm tomologic/couchlock \
--couchdb "https://USER.cloudant.com/couchlock" \
--lock shared_resource \
--name $BUILD_TAG \ # Unique identifier, example Jenkins $BUILD_TAG
lock
## Do crazy things with shared resource
docker run -it --rm tomologic/couchlock \
--couchdb "https://USER.cloudant.com/couchlock" \
--lock shared_resource \
--name $BUILD_TAG \ # Unique identifier, example Jenkins $BUILD_TAG
unlock
Couchlock is provided through our homebrew tap for OSX and linux users.
brew install tomologic/tap/couchlock
Travis CI Gimme is used to cross-compile couchlock.
$ brew install gimme
$ make build
$ make build_darwin
$ make build_linux
Effing Package Management - fpm is used for packaging.
$ brew install gnu-tar
$ brew install rpm
$ gem install fpm
$ make package
$ make package_deb
$ make package_rpm
If you don't have couchdb internally then totally try this out with Cloudant which has a great free tier.
All files in data directory is packed with go-bindata.
go get -u github.com/jteeuwen/go-bindata/...
go-bindata data/...
Content type
Image
Digest
sha256:44264c338…
Size
5 MB
Last updated
over 3 years ago
docker pull tomologic/couchlock