2

I am creating build of angular 4 project using Jenkins and then publishing build on ftp.

Following is command that i am running

npm install && npm run dev

I have created dev as following in package.json.

"dev": "ng build"

When jenkins build run, build is created and uploaded on the ftp. All the content is uploaded on the ftp except the content which is in angular-cli.json assets

"assets": [
    "assets",
    "favicon.ico",
    ".htaccess"
  ],

Assets, favicon and htaccess files are not getting uploaded on the ftp.

Sandhu
  • 348
  • 5
  • 23
  • I checked folder C:\Program Files (x86)\Jenkins\workspace\DEVHMS\dist, in this folder assets folder is not created. – Sandhu Jun 06 '18 at 11:54

2 Answers2

4

Figured it out. Issue was with folder name (Program Files (x86)). Installed jenkins to another directory(programs) and it worked

Sandhu
  • 348
  • 5
  • 23
1

You can also just change the workspace directory in Jenkins->Manage Jenkins->Configure System (click advanced)

I set mine to c:\workspace/${ITEM_FULL_NAME}

(ref: How to change workspace and build record Root Directory on Jenkins?)

CaffGeek
  • 21,856
  • 17
  • 100
  • 184