1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-22 06:02:51 +00:00
catalog/task/npm/0.1
PuneetPunamiya 5a3e5f630f Adds category field as an annotation as tekton.dev/categories
- Initially all tags were mapped to categories in Hub,
     for e.g. config.yaml: https://github.com/tektoncd/hub/blob/master/config.yaml,
     so whenever a new tag was added in a task it was mapped to a category called `others`.
     Hence before every release we had to manually map these new tags to some category,
     hence after the discussion in Catalog and Hub WG, a proposal was created for adding
     a category as an annotation.

   - PR to update the TEP-0003-Tekton Catalog Organization: https://github.com/tektoncd/community/pull/352

Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
2021-07-26 13:15:08 +01:00
..
tests Add npm cli task 2021-01-26 16:08:41 +00:00
npm.yaml Adds category field as an annotation as tekton.dev/categories 2021-07-26 13:15:08 +01:00
README.md Update self reference from master to main 🧙 2021-03-19 11:09:49 +00:00

NPM CLI

This task can be used to run npm goals on a source code with the default environment as CI=true and has some pre-defined scripts in package.json file.

Install the Task

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/npm/0.1/npm.yaml

Parameters

  • PATH_CONTEXT: The path where package.json of the project is defined. (Default: ".")

  • ARGS: The npm goals you want to run. (Default: version)

  • IMAGE: The node image you want to use. (Default: docker.io/library/node:12-alpine@sha256:12048cdfd75d944df35f3144132d9bdeee78015fbd6df765edad1be46599b110)

Workspaces

  • source: The place which consists of the project.

Usage

  1. Apply the git-clone task which will help to clone the repository.

  2. Apply the sample run.yaml which will clone the tektoncd/hub repo and perform few npm goals:-

    • install dependencies using npm clean-install
    • perform eslint check on the source code using npm run lint.
    • run unit tests using npm run test
    • run build tests using npm run build