Browse Source

Update nodejs example pipeline

Signed-off-by: Taylor Silva <tsilva@pivotal.io>
Co-Authored-by: Alex Kennedy <alexander.kennedy@parlamind.com>
pull/3/head
Taylor Silva 5 years ago
parent
commit
05181ee575
  1. 46
      pipelines/nodejs-app-testing.yml

46
pipelines/nodejs-app-testing.yml

@ -1,32 +1,46 @@
---
resources:
- name: nodejs.org-git
- name: repo
type: git
icon: github
source:
uri: https://github.com/nodejs/nodejs.org.git
- name: node-image
type: registry-image
source:
repository: node
tag: 13.10.1-stretch
jobs:
- name: test
public: true
plan:
- get: nodejs.org-git
- get: node-image
- get: repo
trigger: true
- task: run-tests
- task: install
image: node-image
config:
inputs:
- name: repo
outputs:
- name: dependencies
path: repo/node_modules
platform: linux
image_resource:
type: registry-image
source: { repository: node }
run:
path: npm
args: ["install"]
dir: repo
- task: test
image: node-image
config:
inputs:
- name: nodejs.org-git
- name: repo
- name: dependencies
path: repo/node_modules
platform: linux
run:
path: /bin/sh
args:
- -c
- |
echo "Node Version: $(node --version)"
echo "NPM Version: $(npm --version)"
cd nodejs.org-git
npm install
npm test
path: npm
args: ["run", "test"]
dir: repo
Loading…
Cancel
Save