Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Atlassian Pipelines and Angular CLI

Trying to set up pipelines with Angular CLI and running into an issue when calling ng build.

pipelines:
   default:
     - step:
        script: # Modify the commands below to build your repository.
          - npm --version
          - npm install
          - ng build

angular-cli is a dev dependency in my package.json, but ng cannot be found.

bash: ng: command not found

What step did I miss or doing wrong? Thank-you

like image 917
Thibs Avatar asked Jul 05 '16 15:07

Thibs


People also ask

How do I generate a pipe in angular CLI?

The Angular CLI ng generate pipe command registers the pipe automatically. Implement the PipeTransform interface in your custom pipe class to perform the transformation. Angular invokes the transform method with the value of a binding as the first argument, and any parameters as the second argument in list form, and returns the transformed value.

Can we use GitLab as a continuous integration pipeline for angular?

We can use GitLab as a Saas or else Self-managed installation on our own host with Linux for free. In this article, I will explain how we can set up CI (Continuous Integration) pipeline with GitLab for an Angular frontend application. In this setup, I’m going to use an already developed angular application.

What is the minimum node version required for angular CLI?

The Angular CLI requires a minimum Node.js version of either v12.14 or v14.15. · Issue #2 · TakuroFukamizu/atlassian-pipeline-awscli-node · GitHub My pipeline was working OK until today This is part of my pipeline: `script: - node --version - npm install - npm install -g @angular/[email protected] - ng build --configuration ${ENVIRONMENT}`

What can you do with Atlassian?

Orchestrate actions between Atlassian tools and third-party apps or data sources. Go from Confluence to Jira, a database to Confluence, Bamboo to Bitbucket to Slack — the possibilities are endless. Automatically move massive amounts of data to and from Atlassian apps, databases, files, and more.


2 Answers

Looks like it had to be called from npm context. I ended up calling npm build and added the script for it in the package.json

"build": "ng build"
like image 136
Thibs Avatar answered Nov 11 '22 17:11

Thibs


After including npm build as suggested above, things seemed to run successfully but it did actually not do anything. I had to replace it with $(npm bin)/ng build in order to work.

like image 28
Steven Müllener Avatar answered Nov 11 '22 17:11

Steven Müllener