Node

Example Node Pipeline

Example Yaml configuration for a project building a Node application.

Scenario

User is looking to create a pipeline that builds an artifact on any event or branch pushed to source control.

Steps

The following pipeline concepts are being used in the pipeline below:

version: "1"

steps:
  - name: install
    image: node:latest
    pull: always
    commands:
      - node install

  - name: lint
    image: node:latest
    pull: always
    commands:
      - node test

  - name: build
    image: node:latest
    pull: always
    commands:
      - node build

Stages

The following pipeline concepts are being used in the pipeline below:

version: "1"

stages:
  install:
    steps:
      - name: install
        image: node:latest
        pull: always
        commands:
          - node install

  test:
    needs: [ install ]
    steps:
      - name: test
        image: node:latest
        pull: always
        commands:
          - node test

  build:
    needs: [ install ]
    steps:
      - name: build
        image: node:latest
        pull: always
        commands:
          - node build