Skip to content

The CI environment Pipeline usage

CARMLPipelinePrincipal edited this page Aug 6, 2023 · 7 revisions

This section provides a guideline on how to use the CARML CI environment pipelines.


Navigation


Operate the module pipelines

To validate updates to a module template, you can perform the following steps:

  1. (Optionally) Update the module's test files to reflect your changes.
  2. Push the local changes to the repository (using a branch that is not main|master).
  3. On the DevOps platform, navigate to your pipelines and select the pipeline that was registered for the module you updated.
  4. Select the branch with your updated template.
  5. (Optionally) disable the Remove deployed module input parameter in case you don't want to apply the default behavior and want to skip the deletion of the test-deployed resources to check them post-deployment.
  6. (Optionally) adjust the Publish prerelease module flag in case you want to publish a prerelease version of your updated module from your development branch.

    Note: The module version is assigned a prerelease suffix.

  7. Trigger the pipeline.

Once the pipeline concludes, it will either be in a green (success) or red (failed) state, depending on how the module performed.

Pipeline logs are available for troubleshooting and provide detailed information in case of failures. If errors occur in the Static validation phase, you may only see the failed test and need to expand the error message. How this looks like depends on the DevOps platform you use.

Add a new module pipeline

To add a new module pipeline, we recommend to create a copy of a currently existing module pipeline and adjust all module-specific properties, e.g., triggers and module paths. The registration of the pipeline depends on the DevOps platform you're using.


DevOps-Tool-specific guidance

This section provides a step-by-step guideline on how to operate the pipelines based on the chosen DevOps platform, GitHub or Azure DevOps.

GitHub workflows

This section focuses on GitHub Actions & Workflows.

GitHub workflows

Trigger a workflow

To trigger a workflow in GitHub:

  1. Navigate to the 'Actions' tab in your repository.

    Actions tab
  2. Select the pipeline of your choice from the list on the left, followed by 'Run workflow' to the right. You can then select the branch of your choice and trigger the pipeline by clicking on the green 'Run workflow' button.

    Run workflow

Note: Depending on the pipeline you selected you may have additional input parameters you can provide aside from the branch. An outline can be found in the Module pipeline inputs section.

Register a workflow

To register a workflow in GitHub you have to create the workflow file (.yml) and store it inside the .github/workflows folder.

Note: Once merged to main|master, GitHub will automatically list the new workflow in the 'Actions' tab. Workflows are not registered from a branch unless you specify a temporal push trigger targeting your branch.

Azure DevOps pipelines

This section focuses on Azure DevOps pipelines.

Azure DevOps pipelines

Trigger a pipeline

To trigger a pipeline in Azure DevOps:

  1. Navigate to the 'Pipelines' section (blue rocket) and select the pipeline you want to trigger.

    Pipeline start step 1
  2. Once selected, click on the 'Run pipeline' button on the top right.

    Pipeline start step 2
  3. Now you can trigger the pipeline by selecting the 'Run' button on the bottom right.

    Pipeline start step 3

Note: Depending on the pipeline you selected you may have additional input parameters you can provide aside from the branch. An outline can be found in the Module pipeline inputs section.

Register a pipeline

To register a pipeline in Azure DevOps:

  1. Create a workflow file (.yml) and upload it to a repository of your choice (e.g., in Azure DevOps or GitHub).

  2. Navigate to the 'Pipelines' section (blue rocket) and select the 'New pipeline' button on the top right.

    Register new pipeline step 1
  3. Next, select the repository-type you stored your template in. Azure DevOps will then try to fetch all repositories you have access to.

    Register new pipeline step 2
  4. Now, we have to select the particular repository to get the pipeline file from.

    Register new pipeline step 3
  5. Following, choose 'Existing Azure Pipelines YAML file' on the bottom of the list.

    Register new pipeline step 4
  6. The previous action will open a new blade that asks you for the branch you stored the pipeline file in (e.g., master) and then asks for the relative path (from root of the repository) of the pipeline file.

    Register new pipeline step 5
  7. Finally, Azure DevOps should show you the pipeline file you created. The last thing you have to do is to either select 'Run' on the top right (which will save & run the pipeline), or click the little arrow next to it and just save the pipeline.

  8. Once saved you can also re-name / move the pipeline in the same view. However, this only works once you saved the pipeline at least once.

    Register new pipeline step 6
Clone this wiki locally