Inspiration

We've have started using Bamboo some time ago to build our Adobe Experience Manager projects. The builds create a zipfile that needs to be uploaded to an AEM instance. For this we created a Bamboo plugin thats does this in a configurable way and automates flushing of the dispatcher cache afterwards.

What it does

The plugin adds two additional tasks to Bamboo:

Upload CRX package Upload one or more AEM packages to an instance via HTTP.

  • Regex matching for package names
  • Instance details like the host and port are configurable
  • Support for authentication
  • Support for the force upload option (overwrite existing packages with the same name/version - useful for snapshots)
  • Support for recursive installation (when working with embedded subpackages)
  • Configurable delay when installing multiple packages
  • Possibility to uninstall or delete existing packages beforehand based on their group name

Flush dispatcher cache Flush the dispatcher cache after the installation of packages. This is often needed to be able to see the changes from the build.

  • Dispatcher url and port are configurable
  • Invalidation url is configurable (useful when working with vhosts)
  • Path to flush is configurable (to allow partial invalidation)

How I built it

Plain old Java with the Apache Commons HTTP client and Jackson for working with Json responses.

Challenges I ran into

AEM supports different ways of uploading packages, had to figure out the most appropriate one. Also it seems that the HTTP response code returned is 200, even when an error occurs. One needs to look at the json response instead, which contains an error code. Also documentation on the templating language used by the SDK could be a bit more extensive.

Accomplishments that I'm proud of

It works! ;-)

What I learned

The SDK is easy to use!

What's next for Bamboo AEM plugin

I have a few things in mind to add:

  • Support for HTTPS
  • Automating other tasks like flushing clientlib cache / rebuilding the clientlibs and the JSP cache.

Built With

Share this project:

Updates