Application services
Introduction
Applications in redpesk have gathered services providing features regarding various fields of application management. This section aims to provide information regarding how to configure your application services in order to ease application management through redpesk.
Presentation
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 version: the service version for which the documentation is written for.
- 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 version: 1.0.0
- Service parameters:
- Download sources:
- handle: download
- type: boolean
- default: False
- Overwrite sources:
- handle: overwrite
- type: boolean
- Default: False
- Download sources:
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 version: 1.0.0
- Service parameters:
- Array of architectures:
- handle: arches
- type: array
- default: empty
- Array of architectures:
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 version: 1.0.0
- Service parameters:
- Activate linting:
- handle: rpmlint
- type: boolean
- default: True
- Activate linting:
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 version: 1.0.0
- Service parameters:
- Automatic version:
- handle: version
- type: boolean
- default: False
- Automatic release:
- handle: release
- type: boolean
- default: False
- Automatic version:
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.
Import a Git reference into a redpesk application
This service allows one to import, in an existing redpesk application, an external reference, resulting in a new branch in the application. You can either import a git reference such as a tag or a branch, or you can import an SRPM.
- Service handle: import_reference
- Service version: 1.0.0
- Service parameters:
- URL:
- handle: url
- type: string
- default: empty
- Name:
- handle: name
- type: string
- default: empty
- Reference:
- handle: ref
- type: string
- default: empty
The
url
parameters correspond to the external reference imported in redpesk.The
name
corresponds to the redpesk application branch name, which results of the import.The
reference
is the git reference name imported. - URL:
Import a Gitpkg into redpesk environment
This service allows one to import a whole external repository, instead of creating one in the usual workflow, and make it your application package source.
- Service handle: import_gitpkg
- Service version: 1.0.0
- Service parameters:
- URL:
- handle: url
- type: string
- default: empty
- URL:
Note : this service is triggered/used only one time during the initial application creation.
WebUI
The previous described services can be found in each application settings tab, in a section named Services Configuration
located in the Advanced settings
block.
redpesk-cli
Here is an example of retrieving and updating a service’s value with command line tool named repdesk-cli.
# Retrieve application services value
devel@redpesk-devel: rp-cli applications get helloworld-binding -v
Name: Helloworld binding
Package Name: helloworld-binding
[...]
Services:
- 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]