Managing Azure pipelines

The pipeline command provides multiple subcommands to work with the CI/CD pipelines used by Hulk

Run this command to see the full api: hulk pipeline --help

hulk-pipeline
Azure Pipeline commands

USAGE:
    hulk pipeline [OPTIONS] <SUBCOMMAND>

OPTIONS:
    -h, --help     Print help information
    -q, --quiet    Suppress all warnings from the output

SUBCOMMANDS:
    create
    help        Print this message or the help of the given subcommand(s)
    validate

Create

This command creates a pipeline for Azure Devops based on your main.json file. It will add deployment steps for all of your configured environments.

Run this command to see the full api: hulk pipeline create --help

hulk-pipeline-create

USAGE:
    hulk pipeline create [OPTIONS] <SRC_FILE>

ARGS:
    <SRC_FILE>    The path to your main.json to create the pipeline from

OPTIONS:
    -h, --help     Print help information
    -q, --quiet    Suppress all warnings from the output

Arguments

KeyValueDescription
SRC_FILE (required)filesystem pathThe path to your main.json to create the pipeline from

Options

NameValueDescription
-h, --helpfilesystem pathPrint help information
-q, --quietboolSupress all warnings from the output

Validate

This command is used to validate the syntax of a specific pipeline file (created by the framework). It parses the YML structure but ensures that specific fields are present. Note that this command is only present to help debug specific cases where the YML file would become invalid as it is not meant to be manually edited. Normally you regenerate it based on the changes you made in your main.json file.

Here is a sample of a pipeline:

extends:
    template: /_common/hulk-deploy.yml
    parameters:
        pathHulkJson: /argvengers/hulk-webhook/main.json
        environments:
            - environment: prod
              displayName: prod
              rg: argvengerstools-prod-rg

The only fields that change on a per project basis are:

  • pathHulkJson: This field is used to identify the path of the main file you want to deploy
  • environments: This field contains all the environment specific configurations (the target resource group and the environment names)

Run this command to view the full api: hulk pipeline validate --help

hulk-pipeline-validate

USAGE:
    hulk pipeline validate [OPTIONS] --pipeline-file <PIPELINE_FILE> <SRC_FILE>

ARGS:
    <SRC_FILE>    The path to your main.json to base the validation on

OPTIONS:
    -h, --help                             Print help information
    -n, --no-perm                          Skip rg permission validation
    -p, --pipeline-file <PIPELINE_FILE>    The path to the yaml pipeline file
    -q, --quiet                            Suppress all warnings from the output

Arguments

KeyValueDescription
SRC_FILE (required)filesystem pathThe path to your main.json file to base the validation on

Options

NameValueDescription
-p, --pipeline-file (required)filesystem pathThe path to the yaml pipeline file
-h, --helpboolPrint help information
-n, --no-permboolSkip the resource group validation (for debugging)
-q, --quietboolSupress all warnings from the output