-
Notifications
You must be signed in to change notification settings - Fork 9
Build
The implementation is built using Maven:
mvn clean package
This will run a set of unit tests. There's a few things to watch out for:
- The tests will touch the default registry files area
/var/opt/ldregistry
that directory needs to exist and be writeable for the tests to succeed. - Some of the tests involve attempting to reconfigure an nginx front end. You do not need an nginx installation for the tests to succeed. However, if you do have one then a
sudo
call will be attempted to request nginx re-consult its configuration. In an interactive shell this will result in a request for sudo password. - The tests may sometimes fail due to timing issues. They involve a number of cycles of starting an embedded web server instance, testing the web api and stopping the web server. Some effort is made to wait for the web server to start up before accessing it and to ensure it has shutdown cleanly before starting the next one, but this is not yet 100% reliable. So you may get an occasional test error, which disappears if you run again.
The registry-core war is intended to be independent of specific deployments, which should perform all their configuration external to the war. This means that deployments can be made just by access to the war artefact, with no need to rebuild the registry-core.
To simplify this we release versions of registry-core to a publicly readable S3 bucket which acts a Maven repository: ukgovld
. This has folders for release
and snapshot
builds.
Thus the first release of the registry-core war is downloadable from: https://s3-eu-west-1.amazonaws.com/ukgovld/release/com/github/ukgovld/registry-core/0.0.1/registry-core-0.0.1.war
To upload a release or snapshot requires credentials for access to the S3 bucket. Contact the UKGovLD maintainers for this. They need to be placed in your .m2/settings.xml
file:
<server>
<id>ukgovld-s3-snapshot</id>
<username>DEPLOYER-ACCESS-KEY</username>
<passphrase>DEPLOYER-SECRET-KEY</passphrase>
</server>
<server>
<id>ukgovld-s3-release</id>
<username>DEPLOYER-ACCESS-KEY</username>
<passphrase>DEPLOYER-SECRET-KEY</passphrase>
</server>
To create and release a snapshot build use:
mvn deploy
To perform a full release use:
mvn release:prepare
mvn release:perform
git push