Jenkins: Build error - jenkins

I recently encountered this build error in Jenkins:
Started by upstream project "sampapp-web-qa-build" build number 1445
originally caused by:
Started by user John Santiago
Started by upstream project "sampapp-web-qa-build" build number 1445
originally caused by:
Started by user John Santiago
Building on master in workspace C:\Program Files (x86)\Jenkins\workspace\sampapp-web-qa-update-db
> C:\Program Files (x86)\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> C:\Program Files (x86)\Git\bin\git.exe config remote.origin.url git#git.sampapp.com:sampapp/sampapp.git # timeout=10
Fetching upstream changes from git#git.sampapp.com:sampapp/sampapp.git
> C:\Program Files (x86)\Git\bin\git.exe --version # timeout=10
> C:\Program Files (x86)\Git\bin\git.exe -c core.askpass=true fetch --tags --progress git#git.samapp.com:sampapp/sampapp.git +refs/heads/*:refs/remotes/origin/*
> C:\Program Files (x86)\Git\bin\git.exe rev-parse "refs/remotes/origin/testing^{commit}" # timeout=10
> C:\Program Files (x86)\Git\bin\git.exe rev-parse "refs/remotes/origin/origin/testing^{commit}" # timeout=10
Checking out Revision 3a23984ab747c25102bf5a2cbda83288565cd75a (refs/remotes/origin/testing)
> C:\Program Files (x86)\Git\bin\git.exe config core.sparsecheckout # timeout=10
> C:\Program Files (x86)\Git\bin\git.exe checkout -f 3a23984ab747c25102bf5a2cbda83288565cd75a
> C:\Program Files (x86)\Git\bin\git.exe rev-list 3a23984ab747c25102bf5a2cbda83288565cd75a # timeout=10
[sampapp-web-qa-update-db] $ cmd /c call C:\Users\Jenkins\AppData\Local\Temp\hudson8340343356667040511.bat
C:\Program Files (x86)\Jenkins\workspace\sampapp-web-qa-update-db>cd sampapp-web && npm install
npm WARN package.json MyFinancialsOnline#1.0.0 No repository field.
npm WARN package.json MyFinancialsOnline#1.0.0 No README data
[sampapp-web-qa-update-db] $ cmd /c call C:\Users\Jenkins\AppData\Local\Temp\hudson7963468173587450282.bat
C:\Program Files (x86)\Jenkins\workspace\sampapp-web-qa-update-db>cd sampapp-web && grunt update_db
[4mRunning "liquibase:update_mfp" (liquibase) task[24m
INFO 8/6/17 6:47 AM: liquibase: Successfully acquired change log lock
INFO 8/6/17 6:47 AM: liquibase: Reading from [dbo].[DATABASECHANGELOG]
INFO 8/6/17 6:47 AM: liquibase: Successfully released change log lock
Unexpected error running Liquibase: Validation Failed:
1 change sets check sum
../samp-db/scripts/2017_06/changelog.xml::20170619_TCompany_Add_CabinetPath1::a.smith is now: 7:f4bbb21c04dcd157e94b19835b6ba71d
SEVERE 8/6/17 6:47 AM: liquibase: Validation Failed:
1 change sets check sum
../samp-db/scripts/2017_06/changelog.xml::20170619_TCompany_Add_CabinetPath1::a.smith is now: 7:f4bbb21c04dcd157e94b19835b6ba71d
liquibase.exception.ValidationFailedException: Validation Failed:
1 change sets check sum
../samp-db/scripts/2017_06/changelog.xml::20170619_TCompany_Add_CabinetPath1::a.smith is now: 7:f4bbb21c04dcd157e94b19835b6ba71d
at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:196)
at liquibase.Liquibase.update(Liquibase.java:196)
at liquibase.integration.commandline.Main.doMigration(Main.java:1032)
at liquibase.integration.commandline.Main.run(Main.java:177)
at liquibase.integration.commandline.Main.main(Main.java:96)
For more information, use the --logLevel flag
[33mWarning: spawn OK Use --force to continue.[39m
[31mAborted due to warnings.[39m
Build step 'Execute Windows batch command' marked build as failure
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
Finished: FAILURE
I see timeout in the error messages, could this be a timeout error?
I also see a validation failed message, could this be the cause of
the build error?
Could Git be the problem or have my files been corrupted somehow due to the validation error?

Related

Can't run Cypress successfully in Jenkins build on Windows

In Jenkins build, I set up the build environment as Node.JS, and executed windows batch command "npm install --global yarn&yarn add cypress --dev &yarn cypress:run --reporter=spec"the same way I ran in my local. All the tests can run successfully, but in Jenkins all are failed with error."Oops...we found an error preparing this test file: Error: ENOENT: no such file or directory, stat 'C:\Windows\system32\config\systemprofile\AppData\Roaming\Cypress\cy\production\projects\esgr-portal2-sso-dev-cypress-b7dad7110500bea68385ec2d48f2d9df\bundles\cypress\support\e2e.js'. This occurred while Cypress was compiling and bundling your test code. This is usually caused by: A missing file or dependency. A syntax error in the file or one of its dependencies. Fix the error in your code and re-run your tests."
The console log is here:
Started by user Billy
Running as SYSTEM
Building in workspace C:\Program Files (x86)\Jenkins\workspace\project-sso-dev-cypress
using credential 78bcddd4-13b9-4582-a4fc-e86abb9ebeaa
> C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> C:\Program Files\Git\bin\git.exe config remote.origin.url https://github.com/project-cypress.git # timeout=10
Fetching upstream changes from https://github.com/project-cypress.git
> C:\Program Files\Git\bin\git.exe --version # timeout=10
using GIT_ASKPASS to set credentials Token as password
> C:\Program Files\Git\bin\git.exe fetch --tags --force --progress -- https://github.com/project-cypress.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> C:\Program Files\Git\bin\git.exe rev-parse "refs/remotes/origin/main^{commit}" # timeout=10
> C:\Program Files\Git\bin\git.exe rev-parse "refs/remotes/origin/origin/main^{commit}" # timeout=10
Checking out Revision 56ab032de063bbf0e04a7bbf7482b9f795be79d4 (refs/remotes/origin/main)
> C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10
> C:\Program Files\Git\bin\git.exe checkout -f 56ab032de063bbf0e04a7bbf7482b9f795be79d4 # timeout=10
Commit message: "Merge branch 'main' of https://github.com/project-cypress"
> C:\Program Files\Git\bin\git.exe rev-list --no-walk 4cd7cdcec00da10e04193706d9741f2d0a9a231e # timeout=10
[esgr-portal2-sso-dev-cypress] $ cmd /c call C:\Windows\TEMP\jenkins1758996358505508646.bat
C:\Program Files (x86)\Jenkins\workspace\project-sso-dev-cypress>npm cache clean --force & npm install & npm install cypress & npm install --global yarn & yarn add cypress --dev & npm install cypress-react-selector & yarn cypress:run --reporter=spec
npm WARN using --force Recommended protections disabled.
added 168 packages, removed 3 packages, and audited 169 packages in 15s
28 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
up to date, audited 169 packages in 705ms
28 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
changed 1 package in 490ms
yarn add v1.22.19
warning package.json: No license field
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
warning No license field
success Saved 1 new dependency.
info Direct dependencies
└─ cypress#12.2.0
info All dependencies
└─ cypress#12.2.0
Done in 10.71s.
added 3 packages, changed 8 packages, and audited 172 packages in 4s
28 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
yarn run v1.22.19
warning package.json: No license field
$ cypress run --reporter=spec
�[90m====================================================================================================�[39m
�[0m (�[4m�[1mRun Starting�[22m�[24m)�[0m
�[90m ┌�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m��[39m
�[90m │�[39m �[90mCypress:�[39m 12.2.0 �[90m│�[39m
�[90m │�[39m �[90mBrowser:�[39m Electron 106 �[90m(headless)�[39m �[90m│�[39m
�[90m │�[39m �[90mNode Version:�[39m �[0mv19.3.0 �[90m(C:\Program Files (x86)\Jenkins\tools\jenkins.plugins.nodejs.tool�[0m �[90m│�[39m
�[90m │�[39m �[0ms.NodeJSInstallation\Node19\node.exe)�[39m�[0m �[90m│�[39m
�[90m │�[39m �[90mSpecs:�[39m �[0m30 found (1-getting-started/todo.cy.js, 2-advanced-examples/actions.cy.js, 2-a�[0m �[90m│�[39m
�[90m │�[39m �[0mdvanced-examples/aliasing.cy.js, 2-advanced-examples/assertions.cy.js, 2-advan�[0m �[90m│�[39m
�[90m │�[39m �[0mced-examples/connectors.cy.js, 2-advanced-examples/cookies.cy.js, 2-advanced-e�[0m �[90m│�[39m
�[90m │�[39m �[0mxamples/cypress_api.cy....)�[0m �[90m│�[39m
�[90m │�[39m �[90mSearched:�[39m �[0mcypress/e2e/**/*.cy.{js,jsx,ts,tsx}�[0m �[90m│�[39m
�[90m └�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m┘�[39m
�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m�[90m─�[39m
Running: �[90m1-getting-started/todo.cy.js�[39m �[90m(1 of 30)�[39m
�[31mOops...we found an error preparing this test file:�[39m
�[31m�[39m
�[31m�[90m > �[31m�[94mcypress\e2e\1-getting-started\todo.cy.js�[31m�[39m
�[31m�[39m
�[31mThe error was:�[39m
�[31m�[39m
�[31m�[33mError: ENOENT: no such file or directory, stat 'C:\Windows\system32\config\systemprofile\AppData\Roaming\Cypress\cy\production\projects\esgr-portal2-sso-dev-cypress-b7dad7110500bea68385ec2d48f2d9df\bundles\cypress\e2e\1-getting-started\todo.cy.js'�[31m�[39m
�[31m�[39m
�[31mThis occurred while Cypress was compiling and bundling your test code. This is usually caused by:�[39m
�[31m�[39m
�[31m- A missing file or dependency�[39m
�[31m- A syntax error in the file or one of its dependencies�[39m
�[31m�[39m
�[31mFix the error in your code and re-run your tests.�[39m

Build error for missing Nuget package even though "nuget restore" ran

I'm trying to set up a Jenkins server to build an ASP Core project. I have my Jenkins project configured to use the MSBuild from my installed Visual Studio 2017. I downloaded Nuget v5.3.1 and added it to my PATH.
My Jenkins project is configured with two build steps. The first step is to run nuget restore. The second step is "Build a Visual Studio project or solution using MSBuild" on my solution file (AspCore.sln)
When I try to build the project in Jenkins, I get the following error. However, it appears that all of the Nuget packages were downloaded successfully.
C:\Program Files\dotnet\sdk\2.1.509\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error NETSDK1064: Package Microsoft.VisualStudio.Web.CodeGeneration, version 2.1.9 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. [C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\AspCore.csproj]
Here's the full Jenkins build log.
Started by user Ben Rubin
Running as SYSTEM
Building in workspace C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment
using credential 633afff1-dea9-4aab-a44a-0a4d127afd1b
> git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git.exe config remote.origin.url git#github.com:Toreth/AspCoreTest.git # timeout=10
Fetching upstream changes from git#github.com:Toreth/AspCoreTest.git
> git.exe --version # timeout=10
using GIT_SSH to set credentials
> git.exe fetch --tags --force --progress -- git#github.com:Toreth/AspCoreTest.git +refs/heads/*:refs/remotes/origin/*
> git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
> git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
Checking out Revision c0e95238b58d6648c51fac0a817fa5d3e60ce615 (refs/remotes/origin/master)
> git.exe config core.sparsecheckout # timeout=10
> git.exe checkout -f c0e95238b58d6648c51fac0a817fa5d3e60ce615
Commit message: "Initial commit."
> git.exe rev-list --no-walk c0e95238b58d6648c51fac0a817fa5d3e60ce615 # timeout=10
[Windows Service Deployment] $ cmd /c call C:\Windows\TEMP\jenkins4544019004588734090.bat
C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment>nuget restore
MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin'.
Restoring packages for C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\AspCore.csproj...
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.design/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.design/index.json 45ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.design/2.1.9/microsoft.visualstudio.web.codegeneration.design.2.1.9.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.design/2.1.9/microsoft.visualstudio.web.codegeneration.design.2.1.9.nupkg 31ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegenerators.mvc/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegenerators.mvc/index.json 42ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegenerators.mvc/2.1.9/microsoft.visualstudio.web.codegenerators.mvc.2.1.9.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegenerators.mvc/2.1.9/microsoft.visualstudio.web.codegenerators.mvc.2.1.9.nupkg 30ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration/index.json 44ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration/2.1.9/microsoft.visualstudio.web.codegeneration.2.1.9.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration/2.1.9/microsoft.visualstudio.web.codegeneration.2.1.9.nupkg 29ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.entityframeworkcore/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.entityframeworkcore/index.json 58ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.entityframeworkcore/2.1.9/microsoft.visualstudio.web.codegeneration.entityframeworkcore.2.1.9.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.entityframeworkcore/2.1.9/microsoft.visualstudio.web.codegeneration.entityframeworkcore.2.1.9.nupkg 29ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.core/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.core/index.json 41ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.core/2.1.9/microsoft.visualstudio.web.codegeneration.core.2.1.9.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.core/2.1.9/microsoft.visualstudio.web.codegeneration.core.2.1.9.nupkg 30ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.templating/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.templating/index.json 42ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.templating/2.1.9/microsoft.visualstudio.web.codegeneration.templating.2.1.9.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.templating/2.1.9/microsoft.visualstudio.web.codegeneration.templating.2.1.9.nupkg 29ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.utils/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.utils/index.json 60ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.utils/2.1.9/microsoft.visualstudio.web.codegeneration.utils.2.1.9.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.utils/2.1.9/microsoft.visualstudio.web.codegeneration.utils.2.1.9.nupkg 30ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.contracts/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.contracts/index.json 61ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.contracts/2.1.9/microsoft.visualstudio.web.codegeneration.contracts.2.1.9.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.contracts/2.1.9/microsoft.visualstudio.web.codegeneration.contracts.2.1.9.nupkg 32ms
Installing Microsoft.VisualStudio.Web.CodeGeneration.Contracts 2.1.9.
Installing Microsoft.VisualStudio.Web.CodeGeneration.Utils 2.1.9.
Installing Microsoft.VisualStudio.Web.CodeGeneration.Templating 2.1.9.
Installing Microsoft.VisualStudio.Web.CodeGeneration.Core 2.1.9.
Installing Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore 2.1.9.
Installing Microsoft.VisualStudio.Web.CodeGeneration 2.1.9.
Installing Microsoft.VisualStudio.Web.CodeGenerators.Mvc 2.1.9.
Installing Microsoft.VisualStudio.Web.CodeGeneration.Design 2.1.9.
Committing restore...
Generating MSBuild file C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\obj\AspCore.csproj.nuget.g.props.
Generating MSBuild file C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\obj\AspCore.csproj.nuget.g.targets.
Writing assets file to disk. Path: C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\obj\project.assets.json
Restore completed in 3.73 sec for C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\AspCore.csproj.
NuGet Config files used:
C:\Windows\system32\config\systemprofile\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
https://api.nuget.org/v3/index.json
Installed:
8 package(s) to C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\AspCore.csproj
C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment>exit 0
Path To MSBuild.exe: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe
Executing the command cmd.exe /C " chcp 1252 & "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe" AspCore.sln " && exit %%ERRORLEVEL%% from C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment
[Windows Service Deployment] $ cmd.exe /C " chcp 1252 & "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe" AspCore.sln " && exit %%ERRORLEVEL%%
Active code page: 1252
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 10/27/2019 4:54:18 PM.
Project "C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Project "C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore.sln" (1) is building "C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\AspCore.csproj" (2) on node 1 (default targets).
C:\Program Files\dotnet\sdk\2.1.509\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error NETSDK1064: Package Microsoft.VisualStudio.Web.CodeGeneration, version 2.1.9 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. [C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\AspCore.csproj]
Done Building Project "C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\AspCore.csproj" (default targets) -- FAILED.
Done Building Project "C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore.sln" (default targets) -- FAILED.
Build FAILED.
"C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore.sln" (default target) (1) ->
"C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\AspCore.csproj" (default target) (2) ->
(ResolvePackageAssets target) ->
C:\Program Files\dotnet\sdk\2.1.509\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error NETSDK1064: Package Microsoft.VisualStudio.Web.CodeGeneration, version 2.1.9 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. [C:\Program Files (x86)\Jenkins\workspace\Windows Service Deployment\AspCore\AspCore.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.44
Build step 'Build a Visual Studio project or solution using MSBuild' marked build as failure
Finished: FAILURE
Please take a look at this solution, it worked for me:
'dotnet build' command not finding NuGet packages (they exist)
so you just need to call this build command defining the nuget path in the jenkinsfile:
sh 'dotnet build --packages ./.nuget/packages'

Load test run in Jenkins with Jmeter does not end

I'm trying to run load tests on Jenkins through Jmeter (with Blazemeter). I've installed:
Install Jenkins on a machine that you have access to
Install the Jenkins Performance Plugin on the machine with Jenkins
Install Taurus on the Jenkins machine
Install Apache JMeter™ on our local machine
The only file that initially exists in the project folder is the blazedemo_script. jmx script generated in Jmeter and that works perfectly in this software.
The execution never ends. And I also don't understand why you can't find the modified file it generates if you enter it in the same directory.
Thank you very much.
I get the following log:
Lanzada por el usuario e73dbef17ee24d5c96bb99b8c598de0c
Ejecutando.en el espacio de trabajo C:\Program Files (x86)\Jenkins\workspace\blazermeter
[WARNING] Performance test: Job workspace contains spaces in path. Virtualenv does not support such path. Creating temporary workspace for virtualenv.
Performance test: Checking global bzt installation...
[blazermeter] $ bzt --help
Performance test: Found global bzt installation.
Performance test: run [bzt, blazedemo_script.jmx, C:\Program Files (x86)\Jenkins\workspace\blazermeter\jenkins-report.yml]
[blazermeter] $ bzt blazedemo_script.jmx "C:\Program Files (x86)\Jenkins\workspace\blazermeter\jenkins-report.yml"
13:24:19 INFO: Taurus CLI Tool v1.10.5
13:24:19 INFO: Starting with configs: ['C:\\Program Files (x86)\\Jenkins\\workspace\\blazermeter\\jenkins-report.yml', 'c:\\windows\\temp\\jmx_52sdqz.json']
13:24:19 INFO: Configuring...
13:24:19 INFO: Artifacts dir: C:\Program Files (x86)\Jenkins\workspace\blazermeter\2018-02-20_13-24-19.717000
13:24:19 INFO: Preparing...
13:24:20 WARNING: Failed to detect plugins for C:\Program Files (x86)\Jenkins\workspace\blazermeter\modified_blazedemo_script-1.jmx: [Error 2] El sistema no puede encontrar el archivo especificado
13:24:20 INFO: Starting...
13:24:20 INFO: Waiting for results...
Finally I have solved the problem using the following command and script in jenkins:
Shell Script -- bzt xxxx.yml -o scenarios.xxxx-webapp.variables.port-number=8080 -o scenarios.xxxx-webapp.variables.server-name=xxxx-es-web-stable-12-app -o scenarios.xxxx-mobile.variables.port-number=8080 -o scenarios.xxxx-mobile.variables.server-name=xxxx-es-web-stable-12-app -o modules.console.disable=true -o settings.artifacts-dir=./results --
Attached the configuration yml file:
execution:
- scenario: xxxxxx-webapp
- scenario: xxxxxx-mobile
scenarios:
xxxxxx-webapp:
script: ./xxxxxx_WEBAPP/xxxxxx_WEBAPP.jmx
variables:
server-name: localhost
port-number: 9090
num-users: 1
ramp: 10
xxxxxx-mobile:
script: ./xxxxxx_ANDROIDAPP/xxxxxx_ANDROIDAPP.jmx
variables:
server-name: localhost
port-number: 9090
num-users: 3
ramp: 10

Permission denied while running maven command jenkins

I am facing permission denied issues while running a maven clean test on a pom.xml present in /home/tes/pom.xml from jenkins. Any suggestions
Building in workspace /var/lib/jenkins/workspace/jenkins
[jenkins] $ /usr/share/maven/bin/mvn -f /home/tes/pom.xml clean test
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project (/home/tes/pom.xml) has 1 error
[ERROR] Non-readable POM /home/tes/pom.xml: /home/tes/pom.xml (Permission denied)
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
Just grant read access for all to the pom.xml file:
chmod +r /home/tes/pom.xml
The moderator has deleted my previous answer; I know that it has passed some time since this first post, but I ended up exactly in the same place. I insist in complementing all the answers because I've found what was the problem in my case,having the same result as reported in this case.
I'd like to comment that, in my case, the reason was that I did not have JDK, but just JRE configured in JAVA_HOME of the Global Tool Configuration > JDK > JDK Installation. As a matter of fact Jenkins warns you that the path is not pointing to something containing a JDK.
JDK is needed for some Plugins, like Maven Integration or Docker Pipeline, as Java requirements section in Jenkins documentation states. So this must checked because it surprisingly results in the weird error:
> git rev-parse refs/remotes/origin/celsus_0-1-0^{commit} # timeout=10
Checking out Revision 0c533cf2327a416a254afa2348abafe7790ba67f (refs/remotes/origin/celsus_0-1-0)
> git config core.sparsecheckout # timeout=10
> git checkout -f 0c533cf2327a416a254afa2348abafe7790ba67f # timeout=10
Commit message: "first embrio of container image"
> git rev-list --no-walk 0c533cf2327a416a254afa2348abafe7790ba67f # timeout=10
Parsing POMs
Established TCP socket on 40251
[build] $ /usr/lib/jvm/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.13.jar:/usr/share/maven/boot/plexus-classworlds-2.x.jar:/usr/share/maven/conf/logging jenkins.maven3.agent.Maven35Main /usr/share/maven /var/cache/jenkins/war/WEB-INF/lib/remoting-4.5.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.13.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.13.jar 40251
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "/usr/lib/jvm/bin/java" (in directory "/var/lib/jenkins/workspace/build"): error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at hudson.Proc$LocalProc.<init>(Proc.java:252)
at hudson.Proc$LocalProc.<init>(Proc.java:221)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:996)
at hudson.Launcher$ProcStarter.start(Launcher.java:508)
at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:280)
at hudson.maven.ProcessCache.get(ProcessCache.java:236)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:802)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
at hudson.model.Run.execute(Run.java:1907)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 13 more
Finished: FAILURE
Similar case as originated this case, as the different nature of the solutions proposed points out. I'd like to bring the attention that these errors having to do with permissions, or parsing of the pom might hide the real root cause, and error messages are not always as explicit and clear as they should be.
Hope it helps others bumping into the same issue.
I installed maven plugin for jenkins and provided the fully qualified path of pom.xml in root pom.xml and it fixed the issue
I think the reason this happens is maven has the right to run pom.xml ie. mvn command can be run through terminal but not through jenkins.
So we will need to add the current user to jenkins for it to work.
Follow this blogpost. It worked for me:
blogpost

git.exe init # timeout=10 ERROR: Error cloning remote repo 'origin' hudson.plugins.git

Need your help in resolving the below error.
I am able to run git clone command from my pc, but when I am trying to run it from jenkins I am getting below error.
Error:
Building in workspace C:\Tools\Jenkins\jobs\project A\workspace
Cloning the remote Git repository
Cloning repository git#github.com:scmgalaxy/helloworld-java-maven.git
> git.exe init C:\Tools\Jenkins\jobs\project A\workspace # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init C:\Tools\Jenkins\jobs\project A\workspace
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:656)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:463)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1039)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1079)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.plugins.git.GitException: Error performing command: git.exe init C:\Tools\Jenkins\jobs\project A\workspace
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1726)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1695)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1691)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1321)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:654)
... 12 more
Caused by: java.io.IOException: Cannot run program "git.exe" (in directory "C:\Tools\Jenkins\jobs\project A\workspace"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:815)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1715)
... 16 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 22 more
ERROR: null
Finished: FAILURE
You have to set the path to git.exe in Jenkins:
You have to go to http://yourjenkinsserver:8080/configureTools/
There should be a field next to Path to Git executable.
Put in that field the path to your C:\Program Files\Git\mingw64\bin\git.exe.
Fix.
1. There is a space in project name. So removed the space.
2. There should be a field next to Path to Git executable
3. Put in that field the path to your git.exe.
4. Define JAVA_HOME
If you are running on windows slave, you need to add git tool location under Node Properties.
Make sure to give git executable path along with git.exe
Except for step answered by kristian, you need config your node properties for your server side, the Tool Locations if your local is windows system, refer to below screenshot:
tool location for your server side :

Resources