Closed skreddy6673 closed 4 years ago
This pipeline once worked with image 0.10.0.
Thanks for the bug report.
Please set the configuration parameter __debug
to true
and run the resource again.
The verbose output might provide some insights into this bug.
Adding _debug: true
under resource didn't display any additional output.
It's __debug: true
(notice that there are two underscores in front of the key!!)
Should have mentioned that before. It's always a bit confusing...
Sorry got pulled into other things, @headcr4sh Actually debug option woked, my bad i didn't notice two underscores.
- name: validate-pr
plan:
- get: pull-request
trigger: true
version: every
- get: pipeline-source
- params:
path: pull-request
status: pending
put: pull-request
- get: scm-source
- config:
caches:
- path: maven
container_limits: {}
image_resource:
source:
repository: maven
tag: 3.6-jdk-8
type: docker-image
inputs:
- name: pull-request
- name: pipeline-source
outputs:
- name: sonarqube-analysis-input
platform: linux
run:
args:
- -xce
- |
M2_HOME="${HOME}/.m2"
M2_CACHE="$(pwd)/maven"
ln -s $M2_CACHE $M2_HOME
cd pull-request
ls
mvn --batch-mode -s maven_settings.xml clean package
cd ..
cp -r pull-request/* sonarqube-analysis-input
cd sonarqube-analysis-input
# ls
path: /bin/sh
on_failure:
params:
comment: Maven build FAILED for this pull request
path: pull-request
status: failure
put: pull-request
task: unit-test
- params:
additional_properties:
sonar.scm.disabled: true
project_key: submissions-api
project_path: sonarqube-analysis-input
maven_settings_file: sonarqube-analysis-input/maven_settings.xml
sources:
- .
put: code-analysis
public: true
This is my job and after adding the maven_settings_file location path it's able to pick it up but somehow failing with following error
[ERROR] Error executing Maven.
java.io.FileNotFoundException: The specified user settings file does not exist: /tmp/build/put/sonarqube-analysis-input/sonarqube-analysis-input/maven_settings.xml
I don't know why it's looking for sonarqube-analysis-input/sonarqube-analysis-input/
at the same location twice.
maven_settings_file: sonarqube-analysis-input/maven_settings.xml
Did you try removing sonarqube-analysis-input
from above line?
@xsorifc28 I tried removing sonarqube-analysis-input
and this time it is failing during Preparing SonarQube scanner
itself.
+ echo 'error: Maven settings file not found: "maven_settings.xml".'
error: Maven settings file not found: "maven_settings.xml".
+ exit 1
If i don't remove this line the preparing Sonarqube step passes but fails later in execution with the error from my previous comment.
Very curious. I currently don't have the time to dig further into this issue (this is an example unpaid open source project after all), but I'll try to find a solution (should be easy to find the cause of this issue, I hope) as soon as possible. Might take a week or two, though.
In the meantime... if anyone else comes up with a fix, I'll gladly accept a patch. :-)
I was browsing the open issues because I've gone deep in the code here lately for out. I opened issue #65 without realizing this issue was opened. The workaround until it is fixed is to prefix the maven_setttings_file location with /tmp/build/put. Right before running the maven command the code cds into the maven project folder. The problem is the maven file path is relatively pathed to /tmp/build/put by concourse. Setting the maven_settings_file to an absolute path of /tmp/build/put/sonarqube-analysis-input/maven_settings.xml works around the problem but doesn't seem very concourse like.
Concourse pipeline failing with following errors, Any help would be helpful.