pipeline-parser

module
v0.1.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2022 License: Apache-2.0

README

Pipeline Parser

Test Pipeline Parser License go-report-card coverage report

Description

Pipeline Parser is Argon's solution for parsing and analyzing pipeline files of popular CI yaml files in order to create a generic pipeline entity that can be used across platforms.

Supported Platforms:
Platform
GitHub Workflows
GitLab CI
Azure Pipelines

Usage

Package Usage
import "github/argonsecurity/pipeline-parser/pkg/handler"

// Read the pipeline data as bytes array
buf, err := ioutil.ReadFile("/path/to/workflow.yml")
if err != nil {
    return nil
}

// Parse the pipeline from the specific platform to the common pipeline object
pipeline, err := handler.Handle(buf, consts.GitHubPlatform)
CLI Usage
Parse GitHub Workflow yaml
pipeline-parser -p github workflow.yml
Parse GitLab CI yaml
pipeline-parser -p gitlab .gitlab-ci.yml
Parse Azure Pipelines yaml
pipeline-parser -p azure .azure-pipelines.yml
Parse multiple files in one execution
pipeline-parser -p github workflow-1.yml workflow-2.yml workflow-3.yml

Local Development

First, execute the following command to enable the client's git hooks:

git config core.hooksPath .githooks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL