griddynamics / mpl

[IT-36925] Jenkins Shared Modular Pipeline Library
https://blog.griddynamics.com/developing-a-modular-pipeline-library-to-improve-devops-collaboration/
Apache License 2.0
156 stars 97 forks source link

[BUG] Found error during execution the MPLPipeline on the latest jenkins #64

Closed sparshev closed 4 years ago

sparshev commented 4 years ago

CI found the next error https://app.circleci.com/pipelines/github/griddynamics/mpl/75/workflows/93aabf7f-936a-4c72-aa58-4e38db286ebb/jobs/566 :

--> setting agent port for jnlp
--> setting agent port for jnlp... done
Started
Checking out git https://github.com/griddynamics/mpl.git into /var/jenkins_home/workspace/mpl-build@script to read Jenkinsfile
No credentials specified
Cloning the remote Git repository
Cloning repository https://github.com/griddynamics/mpl.git
 > git init /var/jenkins_home/workspace/mpl-build@script # timeout=10
Fetching upstream changes from https://github.com/griddynamics/mpl.git
 > git --version # timeout=10
 > git fetch --tags --force --progress -- https://github.com/griddynamics/mpl.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/griddynamics/mpl.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/griddynamics/mpl.git # timeout=10
Fetching upstream changes from https://github.com/griddynamics/mpl.git
 > git fetch --tags --force --progress -- https://github.com/griddynamics/mpl.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git rev-parse 4ca95b9d157c39ebaea063691bb247d390846aff^{commit} # timeout=10
Checking out Revision 4ca95b9d157c39ebaea063691bb247d390846aff (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 4ca95b9d157c39ebaea063691bb247d390846aff # timeout=10
Commit message: "MPL-59 Fix for local project modules"
First time build. Skipping changelog.
Running in Durability level: MAX_SURVIVABILITY
Loading library mpl@4ca95b9d157c39ebaea063691bb247d390846aff
Attempting to resolve 4ca95b9d157c39ebaea063691bb247d390846aff from remote references...
 > git --version # timeout=10
 > git ls-remote -h -- https://github.com/griddynamics/mpl.git # timeout=10
Found match: refs/heads/master revision 4ca95b9d157c39ebaea063691bb247d390846aff
No credentials specified
Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
Cloning repository https://github.com/griddynamics/mpl.git
 > git init /var/jenkins_home/workspace/mpl-build@libs/mpl # timeout=10
Fetching upstream changes from https://github.com/griddynamics/mpl.git
 > git --version # timeout=10
 > git fetch --no-tags --force --progress -- https://github.com/griddynamics/mpl.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/griddynamics/mpl.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/griddynamics/mpl.git # timeout=10
Fetching without tags
Fetching upstream changes from https://github.com/griddynamics/mpl.git
 > git fetch --no-tags --force --progress -- https://github.com/griddynamics/mpl.git +refs/heads/*:refs/remotes/origin/* # timeout=10
Checking out Revision 4ca95b9d157c39ebaea063691bb247d390846aff (master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 4ca95b9d157c39ebaea063691bb247d390846aff # timeout=10
Commit message: "MPL-59 Fix for local project modules"
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /var/jenkins_home/workspace/mpl-build
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Checkout)
[Pipeline] { (MPL: Checkout/Checkout)
[Pipeline] { (MPL: Checkout/DefaultCheckout)
[Pipeline] checkout
No credentials specified
Cloning the remote Git repository
Cloning repository https://github.com/griddynamics/mpl.git
 > git init /var/jenkins_home/workspace/mpl-build # timeout=10
Fetching upstream changes from https://github.com/griddynamics/mpl.git
 > git --version # timeout=10
 > git fetch --tags --force --progress -- https://github.com/griddynamics/mpl.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/griddynamics/mpl.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/griddynamics/mpl.git # timeout=10
Fetching upstream changes from https://github.com/griddynamics/mpl.git
 > git fetch --tags --force --progress -- https://github.com/griddynamics/mpl.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git rev-parse 4ca95b9d157c39ebaea063691bb247d390846aff^{commit} # timeout=10
Checking out Revision 4ca95b9d157c39ebaea063691bb247d390846aff (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 4ca95b9d157c39ebaea063691bb247d390846aff # timeout=10
Commit message: "MPL-59 Fix for local project modules"
[Pipeline] }
[Pipeline] }
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] { (MPL: Build/Build)
[Pipeline] { (MPL: Build/MavenBuild)
[Pipeline] tool
Invalid tool ID 3.6.1
[Pipeline] withEnv
[Pipeline] {
[Pipeline] sh
+ mvn -B '-DargLine=-Xmx1024m -XX:MaxPermSize=1024m' clean install
/var/jenkins_home/workspace/mpl-build@tmp/durable-5e268131/script.sh: line 1: mvn: not found
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] }
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Deploy)
Stage "Deploy" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Test)
Stage "Test" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Declarative: Post Actions)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
hudson.remoting.ProxyException: com.griddynamics.devops.mpl.MPLModuleException: Found error during execution of the module 'library:mpl/resources/com/griddynamics/devops/mpl/modules/Build/Build.groovy#null':
com.griddynamics.devops.mpl.MPLModuleException: Found error during execution of the module 'library:mpl/resources/com/griddynamics/devops/mpl/modules/Build/MavenBuild.groovy#null':
hudson.AbortException: script returned exit code 127
    at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.handleExit(DurableTaskStep.java:658)
    at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:604)
    at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:548)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE
Error found: testJenkinsfileBuild(MPLPipelineTest): Assertion failed: 

assert build.getResult().toString() == 'SUCCESS'
       |     |           |          |
       |     FAILURE     FAILURE    false
       mpl-build #1

Most probably it's some change in the jenkins, that break backward compatibility for tool system.

sparshev commented 4 years ago

Jenkinsbro run:

--> INFO: JenkinsBRO running
--> INFO: Reading configuration secrets...
--> WARN:   secrets not found, skipping
--> INFO: Reading the jenkins configuration...
--> INFO: Loading helpers...
--> INFO:   binding next helpers: isPluginActive, addGlobalEnvVariable, getCredentials
--> INFO: Loading interfaces...
--> INFO:   next bindings are available for modules: info, warn, error, CONFIG, JENKINSBRO_DIR, helpers, pluginsActive
--> INFO: Processing modules...
--> INFO: Found not configured modules: kubernetes, credentials, gitlab, ldap, config_file_provider, role_strategy
--> INFO: Processing module global ...
--> INFO: Set number of executors on master
--> INFO: Set quiet period
--> INFO: Set checkout retry
--> INFO: Disable Jenkins CLI
--> INFO: Enable jenkins CSRF protection
--> INFO: Configure Slave to Master access control
--> INFO: Set list JNLP protocols
--> INFO: Set jenkins root url to http://172.17.0.2:8080/
--> INFO: Skipping E-mail configuration...
--> INFO: Setting system message...
--> INFO: added global environment variable JENKINS_BUILD_VERSION
--> INFO: Set system message to:
    This Jenkins instance configured by JenkinsBRO

    Avoid any manual changes since they will be discarded with next deployment.
    Jenkins docker image version: local build
    Deployment date: 04/09/2020 06:04:48

--> INFO: Setting global env variables...
--> INFO: Processing module pipeline_libraries ...
--> INFO: Configuring Pipeline shared groovy library: mpl ...
--> INFO: Processing module tools ...
--> INFO: Processing tool type Maven...
--> INFO: Processing tool Maven->Maven 3
--> INFO: Processing installer for Maven->Maven 3: [name:Install from Apache, params:[3.6.1]]
--> INFO: Processing module tests ...
--> INFO: JenkinsBRO finished his work
2020-04-09 06:04:51.332+0000 [id=27]    INFO    j.util.groovy.GroovyHookScript#execute: Executing /var/jenkins_home/init.groovy.d/tcp-slave-agent-port.groovy
--> INFO: JenkinsBro tests started, status file: `/var/jenkins_home/jenkinsBro/tests_status`, reports dir: `/var/jenkins_home/jenkinsBro/junit_report`
--> INFO: JenkinsBro tests: waiting for Jenkins initialization...
2020-04-09 06:04:51.407+0000 [id=27]    INFO    jenkins.InitReactorRunner$1#onAttained: Completed initialization
2020-04-09 06:04:51.600+0000 [id=19]    INFO    hudson.WebAppMain$3#run: Jenkins is fully up and running
--> INFO: JenkinsBro tests: loading required classes
--> INFO: JenkinsBro tests: preparing junit
--> INFO: Init test suite: MPLPipelineTest.groovy...
--> INFO: Running test suite: MPLPipelineTest.groovy...
Suite started: MPLPipelineTest, tests: 1
.
sparshev commented 4 years ago

Looks like the maven version 3.6.1 is not available anymore...