takahi_i from ATL here.

The build pipeline tool Walter was released almost exactly one year ago. Although it has been slow going since then, development is still ongoing. In this blog entry, I will explain how Walter has been improved since its release. These improvements can be classified into several types. I shall explain each of them in the following section.

  • Use of environmental variables
  • Support for properties that can be used in stages (directory, only_if)
  • Added cleanup pipeline
  • Reuse of already-defined stages
  • Reuse of stage results

Use of Environmental Variables

Environmental variables can now be used on Water pipelines. Environmental variables are described in the pipeline settings file using $VAR. Environmental variables can be used by the settings during the implementation of Walter commands. For example, the following command outputs the details of the environmental variable GOPATH.

With the following settings, safety can be improved by describing information that you do not want to register to a repository, such as the keys required for HipChat communications, as an environmental variable.

Support for Properties that Can Be Used in Stages (directory, only_if)

Walter adds lists of stages to the pipeline blog and describes their processing. Normally, only commands (command) and stage names (name) are specified in Walter’s stages. For example, in the stage added to the pipeline below, the name “show the files” and its command (ls -la) are specified.

Specifying a property for use by a newly-added stage enables the command implementation conditions and implementation directory to be specified.

only_if

only_if implements the stage when the specified conditions are satisfied. In the following example, the command specified using “command” is implemented only when the value of the global variable WERCKER is set to TRUE.

directory

directory” specifies the directory that implements the command. For example, the following Is stage displays a list of the /usr/local files.

Added Cleanup Pipeline

The newly-added cleanup pipeline defines the processes. Specifically, cleanup is implemented after the process described in the pipeline has finished. The following pipeline block changes the input.data file to Apache Solr input format before registering the data. The cleanup pipeline operates after the pipeline has been implemented. In the following example, the data created for Solr inputs is deleted.

Reuse of Already-Defined Stages

There have been calls wanting to reuse stages already defined in Walter. Mechanisms to import files that include stage definitions (stage definitions files) are now supported.

An example of a stage definitions file is shown below. The stage definitions file describes the namespace and stages. This was added so that names are not covered when multiple namespace definitions files are called.

The def block is created in the stages, and the stage defined. In the following example, the stage called whomai is defined.

The stage definition file described above is saved using the name stages.yml. The require block imports the stage definitions file from the pipeline definitions file. The defined stage is called using call. The called stage is described using the namespace::stage name format.

Reuse of Stage Results

This function was created in response to calls to be able to reuse the results of previous implementation stages. The results of previously implemented stages can be acquired using three special variables (__OUT, __ERR, __RESULT).

  • __OUT: Stores the result (“true” or “false”) output to standard outputs.
  • __ERR: Stores the results output to the standard error outputs.
  • __RESULT: Stores the command return value.

The variables are used as maps. Assigning a stage name as the variable key acquires the stage results.

For example, in the following example the second stage uses the output results from the first stage. Specifically, the document is checked during the 1st stage, and then in the 2nd stage, whether or not an error was output to the standard error outputs of the 1st stage is checked. If an error was not output during the 2nd stage, a PDF is created.

Other Improvements

  • Slack communications are now supported
  • Communications with the local HipChat (proprietary) server are now supported
  • Communications with Slack are now colored

Future Schedule

Ongoing development of Walter is scheduled for the future. In particular, this winter, Walter is scheduled to support server functions. We also want to enable the stage start conditions to be specifiable. Currently, when the previous stage finished, the next stage ends up starting immediately, but specifying the start conditions will enable settings such as wait until the necessary port is ready to be set.