abac amdgpu-pro bluetooth cern Credit default doctrine economics Fake commercials Fake war hdd headphones Market economics mobile banking NATO infringements OS streamline backup peripherals Public casualty public hotspot quantitative easing Radio broadcast show RPG Smartphone infringements sme steam Targeted economy

Jenkins doesn’t synthetically collide ant $PATHs

Gay like clubs are Facebook social routine legacy, only allowing to indicate social norm discrepancies like runaways from marriage on an ordinary basis, leaving no space for dispute nor for investigation.

Weird it is, but it’s designed to work not – the famous (although already deprecated largely) Jenkins PHP job template is not including $PATH variable into consideration, leaving developer to sort it out himself – which is weird, however, compared to the scarcity of forum posts and Stack Overflow issues.

Polluting build.xml with

<property environment="env"/>

and the informative header indicating the $PATH included variables

 <!-- By default, we assume all tools to be on the $PATH -->

Evolved something into like Covid19 (COVID19) – coronavirus – Corona sample:

<property name="php" value="/opt/lampp/bin/php"/>
        <property name="pdepend" value="${php} /home/povilas/.config/composer/vendor/bin/pdepend"/>
        <property name="phpcpd" value="${php} /home/povilas/php//phpcpd"/>
        <property name="phpcs" value="${php} /home/povilas/php//phpcs"/>
        <property name="phpdox" value="${php} /home/povilas/php//phpdox"/>
        <property name="phploc" value="${php} /home/povilas/php/phploc.phar"/>
        <property name="phpmd" value="${php} /home/povilas/php//phpmd"/>
        <property name="phpunit" value="${php} ${basedir}/vendor/bin/phpunit"/>

See the best iteration over phploc example – it’s already calling .phar. extended executable, not the symlink to it as supposed to be without a prefixed php binary call in advance.

Git Jenkins history:

Jenkins CI git integrated job

The ordinary – regular – that means, erroneous, as all of them failed, none was OK – build log looks like that:

11:05:29 Pradėjo naudotojas Povilas Brilius
11:05:29 Running as SYSTEM
11:05:29 Vykdomas darbalaukyje /var/lib/jenkins/workspace/pbloop.site
11:05:29 [WS-CLEANUP] Deleting project workspace...
11:05:29 [WS-CLEANUP] Deferred wipeout is used...
11:05:29 [WS-CLEANUP] Done
11:05:29 The recommended git tool is: NONE
11:05:29 using credential 61960e39-4e2f-4a1a-af65-05aa07686aed
11:05:29 Cloning the remote Git repository
11:05:29 Cloning repository git@bitbucket.org:pixelpitch/pbloop.site.git
11:05:29  > git init /var/lib/jenkins/workspace/pbloop.site # timeout=10
11:05:29 Fetching upstream changes from git@bitbucket.org:pixelpitch/pbloop.site.git
11:05:29  > git --version # timeout=10
11:05:29  > git --version # 'git version 2.17.1'
11:05:29 using GIT_SSH to set credentials 
11:05:29  > git fetch --tags --progress -- git@bitbucket.org:pixelpitch/pbloop.site.git +refs/heads/*:refs/remotes/origin/* # timeout=10
11:05:33  > git config remote.origin.url git@bitbucket.org:pixelpitch/pbloop.site.git # timeout=10
11:05:33  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
11:05:33 Avoid second fetch
11:05:33 Seen branch in repository origin/develop
11:05:33 Seen branch in repository origin/feature/PBL-3-launch-backend-modeling
11:05:33 Seen branch in repository origin/hotfix/PBL-15-jenkins-ci
11:05:33 Seen branch in repository origin/master
11:05:33 Seen 4 remote branches
11:05:33  > git show-ref --tags -d # timeout=10
11:05:34 Checking out Revision fca4c4ff79f2b1bd06da9a58369af027992f10ee (origin/develop)
11:05:34  > git config core.sparsecheckout # timeout=10
11:05:34  > git checkout -f fca4c4ff79f2b1bd06da9a58369af027992f10ee # timeout=10
11:05:34 Commit message: ".phar suffix added to executable."
11:05:34  > git rev-list --no-walk 1855fbe01c47466e55b1c395c99c0c5edec8b2c9 # timeout=10
11:05:34 [pbloop.site] $ ant
11:05:34 Buildfile: /var/lib/jenkins/workspace/pbloop.site/build.xml
11:05:36 
11:05:36 clean:
11:05:36 
11:05:36 prepare:
11:05:36     [mkdir] Created dir: /var/lib/jenkins/workspace/pbloop.site/build/api
11:05:36     [mkdir] Created dir: /var/lib/jenkins/workspace/pbloop.site/build/coverage
11:05:36     [mkdir] Created dir: /var/lib/jenkins/workspace/pbloop.site/build/logs
11:05:36     [mkdir] Created dir: /var/lib/jenkins/workspace/pbloop.site/build/pdepend
11:05:36     [mkdir] Created dir: /var/lib/jenkins/workspace/pbloop.site/build/phpdox
11:05:36 
11:05:36 lint:
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Application/Actions/Action.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Application/Actions/ActionError.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Application/Actions/ActionPayload.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Application/Actions/User/ListUsersAction.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Application/Actions/User/UserAction.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Application/Actions/User/ViewUserAction.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Application/Handlers/HttpErrorHandler.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Application/Handlers/ShutdownHandler.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Application/Middleware/SessionMiddleware.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Application/ResponseEmitter/ResponseEmitter.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Domain/DomainException/DomainException.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Domain/DomainException/DomainRecordNotFoundException.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Domain/User/User.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Domain/User/UserNotFoundException.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Domain/User/UserRepository.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/src/Infrastructure/Persistence/User/InMemoryUserRepository.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/tests/Application/Actions/ActionTest.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/tests/Application/Actions/User/ListUserActionTest.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/tests/Application/Actions/User/ViewUserActionTest.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/tests/Domain/User/UserTest.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/tests/Infrastructure/Persistence/User/InMemoryUserRepositoryTest.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/tests/TestCase.php
11:05:37      [lint] No syntax errors detected in /var/lib/jenkins/workspace/pbloop.site/tests/bootstrap.php
11:05:37 
11:05:37 phploc-ci:
11:05:37 
11:05:37 BUILD FAILED
11:05:37 /var/lib/jenkins/workspace/pbloop.site/build.xml:102: Execute failed: java.io.IOException: Cannot run program "/opt/lampp/bin/php /home/povilas/php/phploc.phar" (in directory "/var/lib/jenkins/workspace/pbloop.site"): error=2, Toks failas ar aplankas neegzistuoja
11:05:37 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
11:05:37 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
11:05:37 	at java.base/java.lang.Runtime.exec(Runtime.java:592)
11:05:37 	at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
11:05:37 	at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:424)
11:05:37 	at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:438)
11:05:37 	at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:630)
11:05:37 	at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
11:05:37 	at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:497)
11:05:37 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
11:05:37 	at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
11:05:37 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:05:37 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
11:05:37 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
11:05:37 	at org.apache.tools.ant.Task.perform(Task.java:350)
11:05:37 	at org.apache.tools.ant.Target.execute(Target.java:449)
11:05:37 	at org.apache.tools.ant.Target.performTasks(Target.java:470)
11:05:37 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
11:05:37 	at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
11:05:37 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
11:05:37 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
11:05:37 	at org.apache.tools.ant.Main.runBuild(Main.java:834)
11:05:37 	at org.apache.tools.ant.Main.startAnt(Main.java:223)
11:05:37 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
11:05:37 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
11:05:37 Caused by: java.io.IOException: error=2, Toks failas ar aplankas neegzistuoja
11:05:37 	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
11:05:37 	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
11:05:37 	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
11:05:37 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
11:05:37 	... 24 more
11:05:37 
11:05:37 Total time: 2 seconds
11:05:37 Build step 'Invoke Ant' marked build as failure
11:05:37 Post-build clean running...
11:05:37 Skipping roaming project.
11:05:37 Post-build clean completed.
11:05:37 [WARNINGS] Parsing warnings in console log with parser PHP Runtime
11:05:37 The recommended git tool is: NONE
11:05:37 using credential 61960e39-4e2f-4a1a-af65-05aa07686aed
11:05:37 <Git Blamer> Using GitBlamer to create author and commit information for all warnings.
11:05:37 <Git Blamer> GIT_COMMIT=fca4c4ff79f2b1bd06da9a58369af027992f10ee, workspace=/var/lib/jenkins/workspace/pbloop.site
11:05:37 [CHECKSTYLE] Collecting checkstyle analysis files...
11:05:37 [CHECKSTYLE] Searching for all files in /var/lib/jenkins/workspace/pbloop.site that match the pattern build/logs/checkstyle.xml
11:05:37 [CHECKSTYLE] No files found. Configuration error?
11:05:37 The recommended git tool is: NONE
11:05:37 using credential 61960e39-4e2f-4a1a-af65-05aa07686aed
11:05:37 <Git Blamer> Using GitBlamer to create author and commit information for all warnings.
11:05:37 <Git Blamer> GIT_COMMIT=fca4c4ff79f2b1bd06da9a58369af027992f10ee, workspace=/var/lib/jenkins/workspace/pbloop.site
11:05:37 [PMD] Collecting PMD analysis files...
11:05:37 [PMD] Searching for all files in /var/lib/jenkins/workspace/pbloop.site that match the pattern **/build/logs/pmd.xml
11:05:37 [PMD] No files found. Configuration error?
11:05:37 The recommended git tool is: NONE
11:05:37 using credential 61960e39-4e2f-4a1a-af65-05aa07686aed
11:05:37 <Git Blamer> Using GitBlamer to create author and commit information for all warnings.
11:05:37 <Git Blamer> GIT_COMMIT=fca4c4ff79f2b1bd06da9a58369af027992f10ee, workspace=/var/lib/jenkins/workspace/pbloop.site
11:05:37 [DRY] Collecting duplicate code analysis files...
11:05:37 [DRY] Searching for all files in /var/lib/jenkins/workspace/pbloop.site that match the pattern build/logs/pmd-cpd.xml
11:05:37 [DRY] No files found. Configuration error?
11:05:37 The recommended git tool is: NONE
11:05:37 using credential 61960e39-4e2f-4a1a-af65-05aa07686aed
11:05:38 <Git Blamer> Using GitBlamer to create author and commit information for all warnings.
11:05:38 <Git Blamer> GIT_COMMIT=fca4c4ff79f2b1bd06da9a58369af027992f10ee, workspace=/var/lib/jenkins/workspace/pbloop.site
11:05:38 Recording plot data
11:05:38 Publishing Clover coverage report...
11:05:38 Clover xml file does not exist in: /var/lib/jenkins/workspace/pbloop.site called: build/logs/clover.xml and will not be copied to: /var/lib/jenkins/jobs/pbloop.site/builds/26/cloverphp/clover.xml
11:05:38 Could not find 'build/coverage/build/logs/clover.xml'.  Did you generate the XML report for Clover?
11:05:38 [CRAP4J] Collecting Crap4J analysis files...
11:05:38 [CRAP4J] Searching for report files within build/logs/crap4j.xml
11:05:38 [CRAP4J] Using the new FileSetBuilder
11:05:38 [CRAP4J] No crap4j report files were found. Configuration error?
11:05:38 Build step 'Report Crap' marked build as failure
11:05:38 [htmlpublisher] Archiving HTML reports...
11:05:38 [htmlpublisher] Archiving at BUILD level /var/lib/jenkins/workspace/pbloop.site/build/api to /var/lib/jenkins/jobs/pbloop.site/builds/26/htmlreports/API_20Documentation
11:05:38 ERROR: Directory '/var/lib/jenkins/workspace/pbloop.site/build/api' exists but failed copying to '/var/lib/jenkins/jobs/pbloop.site/builds/26/htmlreports/API_20Documentation'.
11:05:38 INFO: Starting to record.
11:05:38 INFO: Processing PHPUnit-4.x (default)
11:05:38 ERROR: Step ‘Publish xUnit test result report’ failed: [PHPUnit-4.x (default)] - No test report file(s) were found with the pattern 'build/logs/junit.xml' relative to '/var/lib/jenkins/workspace/pbloop.site' for the testing framework 'PHPUnit-4.x (default)'.
11:05:38 Did you enter a pattern relative to (and within) the workspace directory?
11:05:38 Did you generate the result report(s) for 'PHPUnit-4.x (default)'?"
11:05:38 [JDepend] JDepend plugin is ready
11:05:38 [JDepend] Couldn't generate JDepend file at 'build/logs/jdepend.xml'java.nio.file.NoSuchFileException: /var/lib/jenkins/workspace/pbloop.site/build/logs/jdepend.xml
11:05:38 Finished: FAILURE

So the, famous PHP job template, added up workspace clean plugin, custom derivatives to Jenkins settings $PATH directives in addition to already defined build.xml sounds like infamous and notorious.

1 comment on “Jenkins doesn’t synthetically collide ant $PATHs

%d bloggers like this: