From b67ed73bb26d53606d3287ae29ae5f8d6f030f27 Mon Sep 17 00:00:00 2001 From: Itai Gendler Date: Wed, 28 Mar 2018 16:50:54 +0300 Subject: [PATCH] update pipeline V2spec --- docs/content/pipelines v2 (beta)/spec.md | 61 +++++++++++------------- package.json | 2 +- 2 files changed, 30 insertions(+), 33 deletions(-) diff --git a/docs/content/pipelines v2 (beta)/spec.md b/docs/content/pipelines v2 (beta)/spec.md index b90f45f2d..301913f16 100644 --- a/docs/content/pipelines v2 (beta)/spec.md +++ b/docs/content/pipelines v2 (beta)/spec.md @@ -2,37 +2,36 @@ title = "Spec" +++ -A Pipeline needs `.apiVersion`, `.kind`, and `.metadata` fields. +A Pipeline needs `.version`, `.kind`, and `.metadata` fields. A Pipeline also needs a `.spec` section. ### Examples -#### Pipeline which is stored entirely in Codefresh +#### Basic Pipeline ```yaml -apiVersion: "v1" +version: "1.0" kind: "pipeline" metadata: - name: "new-pipeline" + name: "basic-pipeline" description: "my description" labels: - repo: "ArikMaor/ping-server" key1: "value1" - project: "asd" - + key2: "value2" spec: triggers: - - type: "scm" - repo: "ArikMaor/ping-server" - events: ["push", "pullrequest"] + - type: "git" + kind: "github" + repo: "codefresh-io/cli" + events: ["push"] branchRegex: '.' contexts: [] variables: - key: "PORT" value: 3000 encrypted: false - - key: "PAPA" - value: "BLA BLA" + - key: "SECRET" + value: "secret-value" encrypted: true steps: clone_step: @@ -56,18 +55,17 @@ spec: ``` -#### Pipeline which is stored on a remote git +#### Pipeline with a remote spec template brought from a git repository ```yaml -apiVersion: "v1" +version: "1.0" kind: "pipeline" metadata: - name: "ew-pipeline-git" - labels: - repo: "ArikMaor/ping-server" + name: "my-pipeline-1" spec: triggers: - - type: "scm" - repo: "ArikMaor/ping-server" + - type: "git" + kind: "github" + repo: "codefresh-io/cli" events: ["push", "pullrequest"] branchRegex: '.' contexts: [] @@ -75,27 +73,26 @@ spec: - key: "PORT" value: 3000 encrypted: false - - key: "PAPA" - value: "BLA BLA" + - key: "SECRET" + value: "secret-value" encrypted: true - source: + specTemplate: location: "git" repo: "codefresh-io/cli" path: "codefresh.yml" ``` -#### Pipeline which is stored on a specific url +#### Pipeline with a remote spec template brought from a git repository ```yaml -apiVersion: "v1" +version: "1.0" kind: "pipeline" metadata: - name: "new-pipeline-url" - labels: - repo: "codefresh-io/cli" + name: "my-pipeline-1" spec: triggers: - - type: "scm" - repo: "ArikMaor/ping-server" + - type: "git" + kind: "github" + repo: "codefresh-io/cli" events: ["push", "pullrequest"] branchRegex: '.' contexts: [] @@ -103,10 +100,10 @@ spec: - key: "PORT" value: 3000 encrypted: false - - key: "PAPA" - value: "BLA BLA" + - key: "SECRET" + value: "secret-value" encrypted: true - source: + specTemplate: location: "url" url: "https://raw.githubusercontent.com/codefresh-io/cli/master/codefresh.yml" ``` diff --git a/package.json b/package.json index 82c160647..38d76f7aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codefresh", - "version": "0.8.41", + "version": "0.8.42", "description": "Codefresh command line utility", "main": "index.js", "preferGlobal": true,