2

I am new to Jenkins but have done a few builds/deployment jobs of .net project successfully.

Now I am trying to build/deploy Vue.js project through Jenkins but just cannot get through...

I can build the project directly on a server using command prompt. It builds and creates files for deployment in a right directory.

When I am trying to do it in Jenkins job (using the same npm commands) it does not give any error messages, says it built successfully but it does NOT create any files for deployment.

Does anybody encounter this problem? Did anybody build Vue js project through Jenkins? Any help appreciated. Thanks!

In execute windows batch command I run:

cd myworkdirectory
npm install
npm run build

1 Answer 1

2

Not too complex, as I found.

  1. Create freestyle project.
  2. In section Source Code Management please define your repository.
  3. In section Build Triggers please define triggers
  4. In section Build define either Execute Windows batch command or Execute shell within sections like (my choice in the moment - windows):
    1. git checkout develop
    2. npm -g install
    3. npm run build
    4. del /s /f /q c:\applications\frontend-app-build\*.*
    5. for /f %%f in ('dir /ad /b c:\applications\frontend-app-build\') do rd /s /q c:\applications\frontend-app-build\%%f
    6. robocopy dist c:\applications\frontend-app-build\ /E
Sign up to request clarification or add additional context in comments.

1 Comment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.