Nort: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 16: Line 16:


<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
:<br>https://github.com/NovaOrdis/novaordis-release-tools<br><br>
:<br>https://github.com/NovaOrdis/nort<br><br>
</blockquote>
</blockquote>



Revision as of 20:46, 26 November 2016

Internal

Overview

"novaordis-release-tools" (NORT) exists because working with code involves complex coordination between the local workarea of a project, build tools, such as Maven, GitHub, and external Maven and binary repositories. We always prefer to formalize logic and let computers do repetitive steps.

"novaordis-release-tools" started as a set of shell scripts, but the lack of friendly unit testing in bash, more than anything, and the lack of support for advanced data structures determined its migration to Java.

"novaordis-release-tools" knows how to interact with local build tools, such as Maven and its configuration, and external resources such as GitHub. It provide extended operational capabilities for Nova Ordis projects: runtime wrappers, building released artifacts ready for distribution, upload releases in binary repositories, etc., local and remote installation, etc.

In the future, the utilities will gain the capability of driving Go projects as well, offering a unified command line interface for Java and Go projects.

GitHub


https://github.com/NovaOrdis/nort

Nova Ordis Release Tools User Manual

Nova Ordis Release Tools User Manual

Usage

TODO: Coalesce https://github.com/NovaOrdis/novaordis-release-tools/blob/master/README.md with this content.


In-line help is available with:

operations

which is the original name of the script and it should be available in the ./bin subdirectory.

The latest output:

NOMBP2:events ovidiu$ operations
Nova Ordis Release Tools

Usage:

    <command> [global-options] <command-arguments> | operations [global-options] <command> <command-arguments>

Global Options:

    -v | --verbose - verbose execution.

Commands:

    install [-f|--force]

    release <snapshot|minor|major|patch|"version-string">

        Makes a release by incrementing the release information appropriately, running all tests, building the final
        artifact and installing the artifact in the appropriate repository. If a version string is used, the string
        is checked for consistency. The release process will fail if the version string is invalid or represents an
        older version than the current version.

     test - internal release tools testing shortcut. Advanced users only.

Installation:

    ./src/main/bash/operations install-release-tools <project-home-directory>

        The installation functionality can currently only be accessed from the original repository.
        'install-release-tools' installs the release tools into the 'bin' subdirectory of the specified project home
        directory. A target directory qualifies as "project home directory" if it has a Maven pom.xml in it. If an
        older version of the release tools is already installed, 'install-release-tools' will upgrade in place.

Per-Project Configuration:

    Create an operations.conf in the directory the release tools were installed into and configure local project
    properties.

Usage from the Project's README.md

TODO integrate:


    1. `install`

Bash script that exposes a unified command interface for installing the project's artifacts locally or remotely. Usage details are available with:

   ./install --help
   Provider of a uniform command set to build the installable artifact and install it locally or
   remotely.
       ./install [--verbose|-v] [--force] [--clean] [--no-tests] [--zip-only] [environment-name]
   Where:
       --force -   if the version being installed is already installed, the script will stop,  unless
           --force is specified.
       environment-name -   the name of the environment to install into.  If  not  specified  install
           locally.  A list  of  environments  and  associated  configuration  can  be  found  in the
           ./util/environments directory.
   Other Options:
       --help
       --clean - performs an maven clean before attempting to build
       --no-tests
       --zip-only - does not perform the last step of actually installing the zip, just builds it and
           leaves it in the ./target directory.
    1. run wrapper

The run wrapper contains the logic required to parse standard command line arguments such as --debug or --verbose, to build the classpath and to provide a command line entry point for the application. It is designed to work correctly even if the name chages from 'run' to whatever the application requires.

`install` script will identify the main class automatically and update `run` (or whatever the name of the wrapper script is) with it.


User Manual

Releases

A release consists in a tag in the repository plus a series of binary artifacts that are automatically uploaded into a binary repository. If the project produces a a Java library, that binary repository is usually a Maven repository. If the project produces an executable, the binary repository is GitHub's "release" facility. Running the "release" command consists, in order, of the following steps:

  1. Increment the local version information (in the pom.xml file, for example).
  2. run tests
  3. produce the distributable binaries
  4. tag the repository (TODO)
  5. upload the distributable binaries into the binary repository (TODO)
  6. increment the local version to reflect the next snapshot (working version) (TODO)

Development

novaordis-release-tools TODO