Skip to main content
Version: 6.12.0

Pipeline Trigger

Introduction

The Pipeline Trigger is the first pillar of creation and is responsible for initiating the pipeline when new code is committed to the repository and collecting the necessary dependencies.

Using the Pipeline

Step 1: Include the Pipeline Configuration

To use the Pillars of Creation, add the following configuration to your project’s .gitlab-ci.yml file:

variables:
UPSTREAM_BRANCH: main

include:
- project: Structsure/Pipelines/pillars2
file: pipeline/pipeline.yaml
ref: ${UPSTREAM_BRANCH}

Explanation

  • variables:

    • UPSTREAM_BRANCH: Defines the branch of the Pillars of Creation pipeline to use. By default, it is set to main. You can modify this to target a different branch or tag as needed.
  • include:

    • The include keyword imports the pipeline configuration from a specified external project.
    • project: Points to the location of the Pillars of Creation pipeline. In this case, Structsure/Pipelines/pillars2 is the group and project name. Verify that the path is correct in your GitLab instance.
    • file: Specifies the path to the pipeline configuration file within the project. In this case, it’s pipeline/pipeline.yaml.
    • ref: References the branch or tag to be used, dynamically set by the UPSTREAM_BRANCH variable.
note

Replace Structsure/Pipelines/pillars2 with your actual project path if different.

Step 2: Trigger the Pipeline

You can trigger the pipeline by creating a branch, pushing changes, and creating a merge request. The pipeline will automatically execute the defined stages and jobs.

  1. Create a new branch:

    git checkout -b <branch-name>
  2. Make changes to your code, commit them, and push the branch to GitLab:

    git add .
    git commit -m "Add new feature"
    git push origin <branch-name>
  3. Create a merge request (MR) by navigating to the repository in GitLab and selecting Merge request. This will initiate the pipeline for the changes in the MR.