1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
catalog/task/npm/0.1
vinamra28 e763a4473e Use latest git-clone in Task's tests
With git-clone version 0.8 and onwards, it started running as non-root
and GKE clusters were having some issues, so, we temporarily moved all
tasks to use git-clone version 0.7. Ref: https://github.com/tektoncd/catalog/pull/1079

Since we have now moved to kind clusters in our CI, this issue is now
resolved and thus moving all tasks to use latest version of git-clone

Signed-off-by: vinamra28 <jvinamra776@gmail.com>
2023-09-22 09:32:22 +01:00
..
tests Use latest git-clone in Task's tests 2023-09-22 09:32:22 +01:00
npm.yaml Add platforms annotation to several tasks 2021-10-18 15:35:34 +01:00
README.md [TEP-0110] Update Tekton Catalog installation instructions 2022-08-16 16:25:52 +01: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://api.hub.tekton.dev/v1/resource/tekton/task/npm/0.1/raw

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.

Platforms

The Task can be run on linux/amd64, linux/s390x, and linux/ppc64le platforms.

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