Application services


The redpesk factory supports the concept of services. Services can be used to automate actions before the application’s build starts.
For example the download_sources service can be enabled to automatically download source files which are specified via a http, https or ftp url in SourceX statement in spec file.
This section aims to provide information regarding how to configure your application services in order to ease application management through redpesk.


First of all, services are related to the current application active branch.
For each service the following attributes will be given:

  • Service handle: the actual service name that has to be given to redpesk-cli when creating/updating an application.
  • Service parameters: the argument given to the service to perform an action.

Sub-chapters below describe all available services knowing that redpesk factory may support more or less services.

Download Specfile sources

Download the sources expressed, in the application spec file, with a URL.

  • Service handle: download_sources
  • Service parameters:
    • Download sources:
      • handle: download
      • type: boolean
      • default: False
    • Overwrite sources:
      • handle: overwrite
      • type: boolean
      • Default: False

When the download parameter is enabled, this service is triggered each time the application spec file is updated. When the overwrite parameter is activated along with the download parameter, each time the spec file is updated, the sources expressed with a URL in your specfile will be overwritten.

Exclude architecture(s) from builds

Exclude architectures, defined in the project, from later builds.

  • Service handle: excludearch
  • Service parameters:
    • Array of architectures:
      • handle: arches
      • type: array
      • default: empty

For each entry in the array of architectures, an ExcludeArch is written in the specfile.

Use rpmlint v1.10 as a specfile linter

This service aims to lint your application spec file thanks to the rpmlint tool.

  • Service handle: rpmlint
  • Service parameters:
    • Activate linting:
      • handle: rpmlint
      • type: boolean
      • default: True

The spec file lint can be enabled/disabled by setting this service parameter value.

Automatic version/release update of an application

Service responsible for how your package version and release evolve.

  • Service handle: setverrel
  • Service parameters:
    • Automatic version:
      • handle: version
      • type: boolean
      • default: False
    • Automatic release:
      • handle: release
      • type: boolean
      • default: False

When automatic version is enabled, the package version will be written according to the source URL given in the application settings. To be more precise, the version reflects the nearest tag from the revision specified, matching the following regular expression: r"^v{0,1}(\d+(\.\d+){0,2})$". When disabled, the package version will be the version written in the spec file.

When automatic release is enabled, the package release will be increased each time a build is relaunched and the previous one succeed. When disabled, the package release will be the release written in the spec file.


The previous described services can be found in each application settings tab, in a section named Application Services located in the Advanced settings block.



Here is an example of retrieving and updating a service’s value with command line tool named redpesk-cli.

# Retrieve application services value
devel@redpesk-devel: rp-cli applications get helloworld-binding -v
Name:			 Helloworld binding
Package Name:		 helloworld-binding

 - Name: download_sources
 - Parameters:
    download:	 false
    force:	 false

 - Name: excludearch
 - Parameters:
    arches:	 []

 - Name: import_reference
 - Parameters:
    name:	 ""
    ref:	 ""
    url:	 ""

 - Name: rpmlint
 - Parameters:
    rpmlint:	 true

 - Name: setverrel
 - Parameters:
    release:	 false
    version:	 false

# Set automatic version in the setverrel service
devel@redpesk-devel: rp-cli applications update helloworld-binding --service "setverrel={'version':true}"
-- Application update requested by user --
Processing the distribution(s) settings...		[OK]
Update of "Helloworld binding" application...	[OK]