0
votes

We need to build an Angular 6 front end project on IBM Cloud using the DevOps pipeline, but the project requires at least Node v8, while IBM Cloud DevOps pipeline only support v6.7. How can we build our project? Is it possible to upgrade or customize a Node version in DevOps pipeline environment?

2

2 Answers

5
votes

It is true that IBM's DevOps Toolchains currently export up to node 6.7.0 as detailed here https://console.bluemix.net/docs/services/ContinuousDelivery/pipeline_deploy_var.html#deliverypipeline_environment.

But you are free to install any version of node. To do so, add the following to your build job and remove any existing export to node supplied by the pipeline.

#!/bin/bash

npm config delete prefix
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.2/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 8.9.0

node --version

# build instructions follow

This approach uses Node Version Manager.

0
votes

Another different solutions is using a custom Docker image with the Node version required by your service.

So, to configure your Pipeline Step, you need to select as Compilator Type a "Custom Docker image" and then, in the input field for the container name, select one for your Node version, for example "node:10.15.2"

enter image description here