Continuous Integration: Actions Jenkins Pipeline

From Gcube Wiki
Jump to: navigation, search

gCubeActions Pipeline Project

A pipeline to execute configurable actions over a list of Git repositories.

The pipeline project is available at:


  • Git Root: The URL of the parent organization that includes all the listed repositories.
  • List of Repositories: A plain text file, one line for each Git repository name to update.
  • Action Root: The root URL of the Bash script to execute.
  • Action File: The relative path under the Action Root of a script to execute.


Jenkins action pipeline params.png

Sample Action

The following Action adds the file to the Git repository:

#!/usr/bin/env bash
if [[ ! -f ]]; then
    curl <my URL>/ -o
    git add
    git commit -m "Add"

How does it work

Upon passing valid parameters, the pipeline performs the following steps:

1. clones one repository at the time from Git Root/Repo Name

2. downloads the action file from Action Root/Action File in the root folder of the repository

3. runs the action file using the root folder of the repository as working dir

4. pushes the repository back to Gitea

Every change to the Git repository **MUST** be done by the action file. The pipeline is in charge only to push the repository to the remote origin.


No triggers are defined because the pipeline is expected to be manually launched by the Release Manager.

Jenkins Pipeline Definition

Git Repository

The definition of the gCube release pipeline is maintained in this Git Repository:

Actions and repo lists are defined in this Git repository: But in theory, they could be stored in any location accessible via HTTP/HTTPS.

Requirements on Jenkins

Jenkins Pipeline Execution

Given the following list of repositories:


the execution page will look like the following:

Jenkins action pipeline execution.png

Action Report

If the pipeline execution succeeds, it sends a report to the release manager.

The report includes the following information for each Git repository where the action was executed:

  • repo name
  • SCM url
  • result (completed or failed)

Here's an example of a tag report:


Back to the CI guide.